mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-12 11:39:57 +01:00
Merge branch 'main' into attempt-163627v2
This commit is contained in:
@@ -19,3 +19,4 @@ vscode.db
|
||||
/cli/openssl
|
||||
product.overrides.json
|
||||
*.snap.actual
|
||||
.vscode-test
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
const path = require('path');
|
||||
const { defineConfig } = require('@vscode/test-cli');
|
||||
const os = require('os');
|
||||
|
||||
/**
|
||||
* A list of extension folders who have opted into tests, or configuration objects.
|
||||
* Edit me to add more!
|
||||
*
|
||||
* @type {Array<string | (Partial<import("@vscode/test-cli").TestConfiguration> & { label: string })>}
|
||||
*/
|
||||
const extensions = [
|
||||
{
|
||||
label: 'markdown-language-features',
|
||||
workspaceFolder: `extensions/markdown-language-features/test-workspace`,
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'ipynb',
|
||||
workspaceFolder: path.join(os.tmpdir(), `ipynb-${Math.floor(Math.random() * 100000)}`),
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'notebook-renderers',
|
||||
workspaceFolder: path.join(os.tmpdir(), `nbout-${Math.floor(Math.random() * 100000)}`),
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'github-authentication',
|
||||
workspaceFolder: path.join(os.tmpdir(), `msft-auth-${Math.floor(Math.random() * 100000)}`),
|
||||
mocha: { timeout: 60_000 }
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
const defaultLaunchArgs = process.env.API_TESTS_EXTRA_ARGS?.split(' ') || [
|
||||
'--disable-telemetry', '--skip-welcome', '--skip-release-notes', `--crash-reporter-directory=${__dirname}/.build/crashes`, `--logsPath=${__dirname}/.build/logs/integration-tests`, '--no-cached-data', '--disable-updates', '--use-inmemory-secretstorage', '--disable-extensions', '--disable-workspace-trust'
|
||||
];
|
||||
|
||||
module.exports = defineConfig(extensions.map(extension => {
|
||||
/** @type {import('@vscode/test-cli').TestConfiguration} */
|
||||
const config = typeof extension === 'object'
|
||||
? { files: `extensions/${extension.label}/out/**/*.test.js`, ...extension }
|
||||
: { files: `extensions/${extension}/out/**/*.test.js`, label: extension };
|
||||
|
||||
config.mocha ??= {};
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
let suite = '';
|
||||
if (process.env.VSCODE_BROWSER) {
|
||||
suite = `${process.env.VSCODE_BROWSER} Browser Integration ${config.label} tests`;
|
||||
} else if (process.env.REMOTE_VSCODE) {
|
||||
suite = `Remote Integration ${config.label} tests`;
|
||||
} else {
|
||||
suite = `Integration ${config.label} tests`;
|
||||
}
|
||||
|
||||
config.mocha.reporter = 'mocha-multi-reporters';
|
||||
config.mocha.reporterOptions = {
|
||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
testsuitesTitle: `${suite} ${process.platform}`,
|
||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (!config.platform || config.platform === 'desktop') {
|
||||
config.launchArgs = defaultLaunchArgs;
|
||||
config.useInstallation = {
|
||||
fromPath: process.env.INTEGRATION_TEST_ELECTRON_PATH || `${__dirname}/scripts/code.${process.platform === 'win32' ? 'bat' : 'sh'}`,
|
||||
};
|
||||
config.env = {
|
||||
...config.env,
|
||||
VSCODE_SKIP_PRELAUNCH: '1',
|
||||
};
|
||||
} else {
|
||||
// web configs not supported, yet
|
||||
}
|
||||
|
||||
return config;
|
||||
}));
|
||||
Vendored
+4
-3
@@ -3,9 +3,10 @@
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"GitHub.vscode-pull-request-github",
|
||||
"editorconfig.editorconfig",
|
||||
"github.vscode-pull-request-github",
|
||||
"ms-vscode.vscode-github-issue-notebooks",
|
||||
"ms-vscode.vscode-selfhost-test-provider"
|
||||
"ms-vscode.vscode-selfhost-test-provider",
|
||||
"ms-vscode.extension-test-runner"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+7
-1
@@ -6,6 +6,7 @@
|
||||
".build": true,
|
||||
".profile-oss": true,
|
||||
"**/.DS_Store": true,
|
||||
".vscode-test": true,
|
||||
"cli/target": true,
|
||||
"build/**/*.js": {
|
||||
"when": "$(basename).ts"
|
||||
@@ -34,7 +35,7 @@
|
||||
"src/vs/editor/test/node/diffing/fixtures/**": true,
|
||||
},
|
||||
"files.readonlyInclude": {
|
||||
"**/node_modules/**": true,
|
||||
"**/node_modules/**/*.*": true,
|
||||
"**/yarn.lock": true,
|
||||
"**/Cargo.lock": true,
|
||||
"src/vs/workbench/workbench.web.main.css": true,
|
||||
@@ -143,6 +144,11 @@
|
||||
"${workspaceFolder}/build/**/*.js"
|
||||
]
|
||||
},
|
||||
"extension-test-runner.debugOptions": {
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/extensions/*/out/**/*.js",
|
||||
]
|
||||
},
|
||||
"githubPullRequests.assignCreated": "${user}",
|
||||
"githubPullRequests.defaultMergeMethod": "squash",
|
||||
"githubPullRequests.ignoredPullRequestBranches": [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
disturl "https://electronjs.org/headers"
|
||||
target "25.8.4"
|
||||
ms_build_id "24154031"
|
||||
target "25.9.1"
|
||||
ms_build_id "24472542"
|
||||
runtime "electron"
|
||||
build_from_source "true"
|
||||
|
||||
@@ -138,6 +138,19 @@ steps:
|
||||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- script: mkdir $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)
|
||||
displayName: Make folder for SBOM
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_alpine_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_alpine_$(VSCODE_ARCH)_archive-unsigned
|
||||
displayName: Publish server archive
|
||||
|
||||
@@ -57,8 +57,10 @@ steps:
|
||||
Write-Host "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$env:VSCODE_CLI_APPLICATION_NAME"
|
||||
|
||||
Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
|
||||
displayName: Stage CLI
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME).exe
|
||||
includeRootFolder: false
|
||||
@@ -76,9 +78,11 @@ steps:
|
||||
echo "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$VSCODE_CLI_APPLICATION_NAME"
|
||||
|
||||
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$VSCODE_CLI_APPLICATION_NAME
|
||||
displayName: Stage CLI
|
||||
|
||||
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
|
||||
includeRootFolder: false
|
||||
@@ -91,6 +95,7 @@ steps:
|
||||
|
||||
- ${{ else }}:
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
|
||||
includeRootFolder: false
|
||||
@@ -101,3 +106,26 @@ steps:
|
||||
- publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
|
||||
artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
|
||||
|
||||
# Make a folder for the SBOM for the specific artifact
|
||||
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
|
||||
- powershell: mkdir $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Make folder for SBOM (Windows)
|
||||
|
||||
- ${{ else }}:
|
||||
- script: mkdir $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Make folder for SBOM (non-Windows)
|
||||
|
||||
# The if cases above are for different OSes,
|
||||
# but we're still in the branch where the cli is being published in general.
|
||||
# Generate and publish an SBOM.
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/cli
|
||||
BuildDropPath: $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
PackageName: Visual Studio Code CLI
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
|
||||
@@ -41,4 +41,5 @@ steps:
|
||||
displayName: Set asset id variable
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$(ASSET_ID).zip
|
||||
displayName: Publish signed artifact with ID $(ASSET_ID)
|
||||
artifact: $(ASSET_ID)
|
||||
|
||||
@@ -20,12 +20,13 @@ steps:
|
||||
|
||||
- ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download artifacts
|
||||
displayName: Download artifact
|
||||
inputs:
|
||||
artifact: ${{ target }}
|
||||
path: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}
|
||||
|
||||
- task: ExtractFiles@1
|
||||
displayName: Extract artifact
|
||||
inputs:
|
||||
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/*.zip
|
||||
destinationFolder: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
|
||||
@@ -42,7 +43,7 @@ steps:
|
||||
displayName: Find ESRP CLI
|
||||
|
||||
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/sign "*.exe"
|
||||
displayName: "Code sign"
|
||||
displayName: Codesign executable
|
||||
|
||||
- ${{ each target in parameters.VSCODE_CLI_ARTIFACTS }}:
|
||||
- powershell: |
|
||||
@@ -51,6 +52,7 @@ steps:
|
||||
displayName: Set asset id variable
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive signed files
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
|
||||
includeRootFolder: false
|
||||
@@ -58,4 +60,5 @@ steps:
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
|
||||
displayName: Publish signed artifact with ID $(ASSET_ID)
|
||||
artifact: $(ASSET_ID)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -34,14 +34,13 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
|
||||
case 'win32':
|
||||
switch (product) {
|
||||
case 'client': {
|
||||
const asset = arch === 'ia32' ? 'win32' : `win32-${arch}`;
|
||||
switch (type) {
|
||||
case 'archive':
|
||||
return `${asset}-archive`;
|
||||
return `win32-${arch}-archive`;
|
||||
case 'setup':
|
||||
return asset;
|
||||
return `win32-${arch}`;
|
||||
case 'user-setup':
|
||||
return `${asset}-user`;
|
||||
return `win32-${arch}-user`;
|
||||
default:
|
||||
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
|
||||
}
|
||||
@@ -50,12 +49,12 @@ function getPlatform(product: string, os: string, arch: string, type: string): s
|
||||
if (arch === 'arm64') {
|
||||
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
|
||||
}
|
||||
return arch === 'ia32' ? 'server-win32' : `server-win32-${arch}`;
|
||||
return `server-win32-${arch}`;
|
||||
case 'web':
|
||||
if (arch === 'arm64') {
|
||||
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
|
||||
}
|
||||
return arch === 'ia32' ? 'server-win32-web' : `server-win32-${arch}-web`;
|
||||
return `server-win32-${arch}-web`;
|
||||
case 'cli':
|
||||
return `cli-win32-${arch}`;
|
||||
default:
|
||||
|
||||
@@ -219,16 +219,17 @@ steps:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_client_darwin_$(VSCODE_ARCH)_sbom
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_darwin_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_server_darwin_$(VSCODE_ARCH)_sbom
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_server_darwin_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(CLIENT_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
|
||||
@@ -10,7 +10,7 @@ steps:
|
||||
- pwsh: |
|
||||
"machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$Home/_netrc" -Encoding ASCII
|
||||
condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))
|
||||
displayName: Setup distro auth
|
||||
displayName: Setup distro auth (Windows)
|
||||
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -26,7 +26,7 @@ steps:
|
||||
Expand-Archive -Path $ArchivePath -DestinationPath .build
|
||||
Rename-Item -Path ".build/microsoft-vscode-distro-$DistroVersion" -NewName distro
|
||||
condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))
|
||||
displayName: Download distro
|
||||
displayName: Download distro (Windows)
|
||||
|
||||
- script: |
|
||||
mkdir -p .build
|
||||
@@ -36,7 +36,7 @@ steps:
|
||||
password $(github-distro-mixin-password)
|
||||
EOF
|
||||
condition: and(succeeded(), not(contains(variables['Agent.OS'], 'windows')))
|
||||
displayName: Setup distro auth
|
||||
displayName: Setup distro auth (non-Windows)
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -53,4 +53,4 @@ steps:
|
||||
mv .build/microsoft-vscode-distro-$DistroVersion .build/distro
|
||||
cp remote/.yarnrc .build/distro/npm/remote/.yarnrc
|
||||
condition: and(succeeded(), not(contains(variables['Agent.OS'], 'windows')))
|
||||
displayName: Download distro
|
||||
displayName: Download distro (non-Windows)
|
||||
|
||||
@@ -144,7 +144,7 @@ steps:
|
||||
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
|
||||
${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-$(VSCODE_ARCH)
|
||||
displayName: Install dependencies
|
||||
displayName: Install dependencies (non-OSS)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
@@ -173,7 +173,7 @@ steps:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Install dependencies
|
||||
displayName: Install dependencies (OSS)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- script: |
|
||||
@@ -252,7 +252,7 @@ steps:
|
||||
- script: yarn gulp "transpile-client-swc" "transpile-extensions"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile
|
||||
displayName: Transpile client and extensions
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- template: product-build-linux-test.yml
|
||||
@@ -331,6 +331,7 @@ steps:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
|
||||
@@ -50,6 +50,19 @@ steps:
|
||||
echo "##vso[task.setvariable variable=SNAP_PATH]$SNAP_PATH"
|
||||
displayName: Prepare for publish
|
||||
|
||||
- script: mkdir -p $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)
|
||||
displayName: Make folder for SBOM
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Snap
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_linux_snap_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(SNAP_PATH)
|
||||
artifact: vscode_client_linux_$(VSCODE_ARCH)_snap
|
||||
displayName: Publish snap package
|
||||
|
||||
@@ -32,10 +32,6 @@ parameters:
|
||||
displayName: "🎯 Windows x64"
|
||||
type: boolean
|
||||
default: true
|
||||
- name: VSCODE_BUILD_WIN32_32BIT
|
||||
displayName: "🎯 Windows ia32"
|
||||
type: boolean
|
||||
default: true
|
||||
- name: VSCODE_BUILD_WIN32_ARM64
|
||||
displayName: "🎯 Windows arm64"
|
||||
type: boolean
|
||||
@@ -107,7 +103,7 @@ variables:
|
||||
- name: VSCODE_QUALITY
|
||||
value: ${{ parameters.VSCODE_QUALITY }}
|
||||
- name: VSCODE_BUILD_STAGE_WINDOWS
|
||||
value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}
|
||||
value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}
|
||||
- name: VSCODE_BUILD_STAGE_LINUX
|
||||
value: ${{ or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true)) }}
|
||||
- name: VSCODE_BUILD_STAGE_ALPINE
|
||||
@@ -252,15 +248,6 @@ stages:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true)) }}:
|
||||
- job: CLIWindowsX86
|
||||
pool: 1es-windows-2019-x64
|
||||
steps:
|
||||
- template: ./win32/cli-build-win32.yml
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_WIN32_32BIT: ${{ parameters.VSCODE_BUILD_WIN32_32BIT }}
|
||||
|
||||
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true)) }}:
|
||||
- stage: Windows
|
||||
dependsOn:
|
||||
@@ -334,22 +321,6 @@ stages:
|
||||
parameters:
|
||||
VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }}
|
||||
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
|
||||
VSCODE_BUILD_WIN32_32BIT: ${{ parameters.VSCODE_BUILD_WIN32_32BIT }}
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true)) }}:
|
||||
- job: Windows32
|
||||
timeoutInMinutes: 120
|
||||
variables:
|
||||
VSCODE_ARCH: ia32
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: ia32
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_RUN_UNIT_TESTS: true
|
||||
VSCODE_RUN_INTEGRATION_TESTS: true
|
||||
VSCODE_RUN_SMOKE_TESTS: true
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
|
||||
- job: WindowsARM64
|
||||
|
||||
@@ -103,22 +103,23 @@ steps:
|
||||
- script: yarn npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Compile & Hygiene
|
||||
displayName: Compile & Hygiene (OSS)
|
||||
- ${{ else }}:
|
||||
- script: yarn npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Compile & Hygiene
|
||||
displayName: Compile & Hygiene (non-OSS)
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
yarn --cwd test/smoke compile
|
||||
yarn --cwd test/integration/browser compile
|
||||
displayName: Compile test suites
|
||||
displayName: Compile test suites (non-OSS)
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Fetch secrets
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
scriptType: pscore
|
||||
@@ -136,10 +137,10 @@ steps:
|
||||
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
|
||||
AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
|
||||
node build/azure-pipelines/upload-sourcemaps
|
||||
displayName: Upload sourcemaps
|
||||
displayName: Upload sourcemaps to Azure
|
||||
|
||||
- script: ./build/azure-pipelines/common/extract-telemetry.sh
|
||||
displayName: Extract Telemetry
|
||||
displayName: Generate lists of telemetry events
|
||||
|
||||
- script: tar -cz --ignore-failed-read --exclude='.build/node_modules_cache' --exclude='.build/node_modules_list.txt' --exclude='.build/distro' -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out
|
||||
displayName: Compress compilation artifact
|
||||
@@ -153,7 +154,7 @@ steps:
|
||||
- script: yarn download-builtin-extensions-cg
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Built-in extensions component details
|
||||
displayName: Download component details of built-in extensions
|
||||
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: "Component Detection"
|
||||
|
||||
@@ -24,6 +24,7 @@ steps:
|
||||
displayName: Download all artifacts_processed text files
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Fetch secrets
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
scriptType: pscore
|
||||
@@ -35,6 +36,7 @@ steps:
|
||||
Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Fetch Mooncake secrets
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-mooncake-subscription"
|
||||
scriptType: pscore
|
||||
@@ -76,7 +78,7 @@ steps:
|
||||
|
||||
- publish: $(Pipeline.Workspace)/artifacts_processed_$(System.StageAttempt)/artifacts_processed_$(System.StageAttempt).txt
|
||||
artifact: artifacts_processed_$(System.StageAttempt)
|
||||
displayName: Publish what artifacts were published for this stage attempt
|
||||
displayName: Publish the artifacts processed for this stage attempt
|
||||
condition: always()
|
||||
|
||||
- pwsh: |
|
||||
|
||||
@@ -9,6 +9,7 @@ steps:
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Fetch secrets
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
scriptType: pscore
|
||||
@@ -26,3 +27,4 @@ steps:
|
||||
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
|
||||
AZURE_CLIENT_SECRET="$(AZURE_CLIENT_SECRET)" \
|
||||
node build/azure-pipelines/common/releaseBuild.js ${{ parameters.VSCODE_RELEASE }}
|
||||
displayName: Release build
|
||||
|
||||
@@ -80,4 +80,4 @@ steps:
|
||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE2"'"}' \
|
||||
https://slack.com/api/chat.postMessage
|
||||
|
||||
displayName: Send message on Slack
|
||||
displayName: Send message linking to changes on Slack
|
||||
|
||||
@@ -107,6 +107,7 @@ steps:
|
||||
displayName: Build
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Fetch secrets from Azure
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
scriptType: pscore
|
||||
@@ -151,6 +152,16 @@ steps:
|
||||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-web
|
||||
PackageName: Visual Studio Code Web
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-web/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_web
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_linux_standalone_archive-unsigned
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||
|
||||
@@ -2,9 +2,6 @@ parameters:
|
||||
- name: VSCODE_BUILD_WIN32
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_WIN32_32BIT
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_WIN32_ARM64
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -44,8 +41,6 @@ steps:
|
||||
- x86_64-pc-windows-msvc
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
|
||||
- aarch64-pc-windows-msvc
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
|
||||
- i686-pc-windows-msvc
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
- template: ../cli/cli-compile-and-publish.yml
|
||||
@@ -70,15 +65,3 @@ steps:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
|
||||
- template: ../cli/cli-compile-and-publish.yml
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: i686-pc-windows-msvc
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_ia32_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
@@ -3,8 +3,6 @@ parameters:
|
||||
type: boolean
|
||||
- name: VSCODE_BUILD_WIN32_ARM64
|
||||
type: boolean
|
||||
- name: VSCODE_BUILD_WIN32_32BIT
|
||||
type: boolean
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
@@ -52,5 +50,3 @@ steps:
|
||||
- unsigned_vscode_cli_win32_x64_cli
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
|
||||
- unsigned_vscode_cli_win32_arm64_cli
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
|
||||
- unsigned_vscode_cli_win32_ia32_cli
|
||||
|
||||
@@ -35,17 +35,14 @@ steps:
|
||||
- powershell: .\scripts\test.bat --build --tfs "Unit Tests"
|
||||
displayName: Run unit tests (Electron)
|
||||
timeoutInMinutes: 15
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: yarn test-node --build
|
||||
displayName: Run unit tests (node.js)
|
||||
timeoutInMinutes: 15
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: yarn test-browser-no-install --sequential --build --browser chromium --tfs "Browser Unit Tests"
|
||||
displayName: Run unit tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
|
||||
- powershell: |
|
||||
@@ -100,7 +97,6 @@ steps:
|
||||
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
||||
displayName: Run integration tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
@@ -109,7 +105,6 @@ steps:
|
||||
exec { .\scripts\test-web-integration.bat --browser firefox }
|
||||
displayName: Run integration tests (Browser, Firefox)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
@@ -122,7 +117,6 @@ steps:
|
||||
exec { .\scripts\test-remote-integration.bat }
|
||||
displayName: Run integration tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
|
||||
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
|
||||
@@ -145,14 +139,12 @@ steps:
|
||||
- powershell: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
displayName: Run smoke tests (Electron)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: yarn smoketest-no-compile --web --tracing --headless
|
||||
env:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)-web
|
||||
displayName: Run smoke tests (Browser, Chromium)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: yarn gulp compile-extension:vscode-test-resolver
|
||||
displayName: Compile test resolver extension
|
||||
@@ -163,7 +155,6 @@ steps:
|
||||
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)
|
||||
displayName: Run smoke tests (Remote)
|
||||
timeoutInMinutes: 20
|
||||
continueOnError: ${{ eq(parameters.VSCODE_ARCH, 'ia32') }}
|
||||
|
||||
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
|
||||
displayName: Diagnostics after smoke test run
|
||||
|
||||
@@ -152,7 +152,7 @@ steps:
|
||||
- powershell: yarn gulp "transpile-client-swc" "transpile-extensions"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile
|
||||
displayName: Transpile client and extensions
|
||||
|
||||
- ${{ else }}:
|
||||
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), eq(parameters.VSCODE_QUALITY, 'insider')) }}:
|
||||
@@ -241,7 +241,7 @@ steps:
|
||||
displayName: Find ESRP CLI
|
||||
|
||||
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(CodeSigningFolderPath) '*.dll,*.exe,*.node'
|
||||
displayName: Codesign
|
||||
displayName: Codesign executables and shared libraries
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'insider') }}:
|
||||
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows-appx $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(CodeSigningFolderPath) '*.appx'
|
||||
@@ -322,17 +322,18 @@ steps:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- publish: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_client_win32_$(VSCODE_ARCH)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_win32_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_server_win32_$(VSCODE_ARCH)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_server_win32_$(VSCODE_ARCH)
|
||||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- publish: $(CLIENT_PATH)
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
db3e9eb9f47f465bb63d15de486ea1d9274233b24bbe451038bfbaf48f9b0e39 *electron-v25.8.4-darwin-arm64-symbols.zip
|
||||
5d83e2094a26bfe22e4c80e660ab088ec94ae3cc2d518c6efcac338f48cc0266 *electron-v25.8.4-darwin-arm64.zip
|
||||
6fdd506328c65a9d8205425a463098210743c9ef79a546738b91a91d56100447 *electron-v25.8.4-darwin-x64-symbols.zip
|
||||
d4015cd251e58ef074d1f7f3e99bfbbe4cd6b690981f376fc642b2de955e8750 *electron-v25.8.4-darwin-x64.zip
|
||||
b46da627829a84cdf84b5570f95e044d38660fb0e58712757e834ff13b43c72d *electron-v25.8.4-linux-arm64-symbols.zip
|
||||
fbb6e06417b1741b94d59a6de5dcf3262bfb3fc98cffbcad475296c42d1cbe94 *electron-v25.8.4-linux-arm64.zip
|
||||
2569c260b4bb90894c5e63e175d3ee9665525e928d7c70158c6a9d98cb82f6a9 *electron-v25.8.4-linux-armv7l-symbols.zip
|
||||
6301e6fde3e7c8149a5eca84c3817ba9ad3ffcb72e79318a355f025d7d3f8408 *electron-v25.8.4-linux-armv7l.zip
|
||||
63580a081a4481eec2773606e9cd50c3468758741f11a14d6c47ab716c064896 *electron-v25.8.4-linux-x64-symbols.zip
|
||||
0cbbcaf90f3dc79dedec97d073ffe954530316523479c31b11781a141f8a87f6 *electron-v25.8.4-linux-x64.zip
|
||||
8860faaaabcc15a531733dd164c858a1cc1bffefdbba7ec54f7687db796f93f3 *electron-v25.8.4-win32-arm64-pdb.zip
|
||||
e909628b4c984b3472c58b3897214e59f55ce69bee99229cdf1451a281865176 *electron-v25.8.4-win32-arm64-symbols.zip
|
||||
1355293a73da3e5d3f06a6c95c81a5124c4f26be2ec1035ccfcfeccd4c766f5d *electron-v25.8.4-win32-arm64.zip
|
||||
597cbfd2b9d542a289296d792ed9be40c3e97499207675766265a710454f76f5 *electron-v25.8.4-win32-ia32-pdb.zip
|
||||
3a0ee0d1435382cfdf727ed70e6c8edd233363dcdadde5c1c6ec170fff243a99 *electron-v25.8.4-win32-ia32-symbols.zip
|
||||
13efcbfc4a0a62339b4450c5d71d14230978e25eb410dcc7d3408b413391eead *electron-v25.8.4-win32-ia32.zip
|
||||
fef9e5ec4d146e6b310137140cee2a1172964e7584540088b1bc7fd1df15f1ff *electron-v25.8.4-win32-x64-pdb.zip
|
||||
1227ec90ae2fb30e01d4c6814af1adae983b78ea832dea0520caaa8a05ac0390 *electron-v25.8.4-win32-x64-symbols.zip
|
||||
0bbe72439cab1e72dee5fb850fdb1b17ea16fef61aa3dae93c562687737084f1 *electron-v25.8.4-win32-x64.zip
|
||||
41e5b5392efcb1b47826f20e2f867dac6026dd435b92f50acb58bfae99b96e08 *ffmpeg-v25.8.4-darwin-arm64.zip
|
||||
bad5ed7f10eef768c95a134cbd6754e9c347eb8bfae871e65975afb96cc49b86 *ffmpeg-v25.8.4-darwin-x64.zip
|
||||
bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.8.4-linux-arm64.zip
|
||||
9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.8.4-linux-armv7l.zip
|
||||
edc7b1c9f1a0733f109a2c0375a4e40c5bfe0bf28b7f06dcc76e1ada0aa2f125 *ffmpeg-v25.8.4-linux-x64.zip
|
||||
84ec373f124f628ce7d8964e000e79cd1448acec05b92417207baecf9b0f039a *ffmpeg-v25.8.4-win32-arm64.zip
|
||||
ce6b46e5395f0f715ff694399580eded7e976c0dd8668304e4b087967fea711f *ffmpeg-v25.8.4-win32-ia32.zip
|
||||
7506346ff7a98377eca26464370a7c5a8c44d010d5c46a8357fa107980582fac *ffmpeg-v25.8.4-win32-x64.zip
|
||||
4a472f48b54e92855ad77606f11a620523f3abe4ee1bc2997a300ae72da4b2f5 *electron-v25.9.1-darwin-arm64-symbols.zip
|
||||
247daa6c9faf711162dc623832fcb189d3c1ef6a15884084cb45c8da3a037b6b *electron-v25.9.1-darwin-arm64.zip
|
||||
7d8ec9d3272dbe356deb09b47ccfda30c421b32f7e906f1186ea26f894b22dc1 *electron-v25.9.1-darwin-x64-symbols.zip
|
||||
35fc99808ea026a21afeca537c218ace398d299fba7ab73d2630be513f1e1617 *electron-v25.9.1-darwin-x64.zip
|
||||
bfcd6ac66f067cfec08b6d18ed80b519e6d70a96d9b1d31dc2cfcf86f4a9af96 *electron-v25.9.1-linux-arm64-symbols.zip
|
||||
1c8aa3f13ade23858664b687ad334634ccd698ec7d627554d16cbb596ffa7a0f *electron-v25.9.1-linux-arm64.zip
|
||||
dcfb4a1d6b2ceffa7a8d9a60b9de027d006753eae1278f07de907c474e71c270 *electron-v25.9.1-linux-armv7l-symbols.zip
|
||||
f4320f1888354e17595fb6901c03c383f45325bfba5e6e1b91b4200ff696049f *electron-v25.9.1-linux-armv7l.zip
|
||||
772dd276d328549e0111b93b43d395de51ff46eba550be48c649c386997125a8 *electron-v25.9.1-linux-x64-symbols.zip
|
||||
35529c411275791abf9aa46f0a2e216b0affa542757583afb438a76047f6b90c *electron-v25.9.1-linux-x64.zip
|
||||
5b0b4595691da19258ce0b2c09f58ba969987d24ae8160661a715eaadf42c16b *electron-v25.9.1-win32-arm64-pdb.zip
|
||||
1e67a35b41927962765a8d8cb01ce73e8c28db6453323f2661e63afd8fdf49e8 *electron-v25.9.1-win32-arm64-symbols.zip
|
||||
a378f5fc44e872f05d037c3ca7f03802ed3a9b2611f59741ce933f500557af7c *electron-v25.9.1-win32-arm64.zip
|
||||
b50f8675b12eda5d0717f83179e40b411ba3254f81bd7142821745c00b566560 *electron-v25.9.1-win32-x64-pdb.zip
|
||||
8ddaa416e51bac1e93c63d1223bec37b6dd78b00c860e5b91912da09af7ff7b5 *electron-v25.9.1-win32-x64-symbols.zip
|
||||
f6762a98193baa9877f443c9414b1f825f99b7cf1094be579d5202b72442b5be *electron-v25.9.1-win32-x64.zip
|
||||
a0c2566efff0a796f751cfc63cddd52d6c4153b35b6ad582bbdd15a2c4317bc9 *ffmpeg-v25.9.1-darwin-arm64.zip
|
||||
b8cd9d93cdf8ebbd3caf68581b6504529b8bf2dea984b6e5f637343ea9d61946 *ffmpeg-v25.9.1-darwin-x64.zip
|
||||
bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.9.1-linux-arm64.zip
|
||||
9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.9.1-linux-armv7l.zip
|
||||
edc7b1c9f1a0733f109a2c0375a4e40c5bfe0bf28b7f06dcc76e1ada0aa2f125 *ffmpeg-v25.9.1-linux-x64.zip
|
||||
2467f6567356340e8d9872753a3df486555334b7c868c0d12991f80f2353ce1f *ffmpeg-v25.9.1-win32-arm64.zip
|
||||
fe4676a13bf9d6f87353f3496e0fb37cd3db151fcea13dad7610a2835d238062 *ffmpeg-v25.9.1-win32-x64.zip
|
||||
|
||||
@@ -4,4 +4,3 @@ bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4 node-v18.15.0-
|
||||
ca2186313d3cbe5c67d0c08e931a6d290906f4f13c584e63fefa05a04dee9c58 node-v18.15.0-linux-armv7l.tar.gz
|
||||
b298a73a9fc07badfa9e4a2e86ed48824fc9201327cdc43e3f3f58b273c535e7 node-v18.15.0-linux-x64.tar.gz
|
||||
17fd75d8a41bf9b4c475143e19ff2808afa7a92f7502ede731537d9da674d5e8 win-x64/node.exe
|
||||
d78b2f981465a40a23b964b2db32a390db1970a0dd5371682e121ae2b7422697 win-x86/node.exe
|
||||
|
||||
@@ -30,9 +30,7 @@ const platformOpensslDirName =
|
||||
process.platform === 'win32' ? (
|
||||
process.arch === 'arm64'
|
||||
? 'arm64-windows-static-md'
|
||||
: process.arch === 'ia32'
|
||||
? 'x86-windows-static-md'
|
||||
: 'x64-windows-static-md')
|
||||
: 'x64-windows-static-md')
|
||||
: process.platform === 'darwin' ? (
|
||||
process.arch === 'arm64'
|
||||
? 'arm64-osx'
|
||||
|
||||
@@ -38,7 +38,6 @@ const REMOTE_FOLDER = path.join(REPO_ROOT, 'remote');
|
||||
// Targets
|
||||
|
||||
const BUILD_TARGETS = [
|
||||
{ platform: 'win32', arch: 'ia32' },
|
||||
{ platform: 'win32', arch: 'x64' },
|
||||
{ platform: 'darwin', arch: 'x64' },
|
||||
{ platform: 'darwin', arch: 'arm64' },
|
||||
@@ -185,9 +184,7 @@ function nodejs(platform, arch) {
|
||||
const untar = require('gulp-untar');
|
||||
const crypto = require('crypto');
|
||||
|
||||
if (arch === 'ia32') {
|
||||
arch = 'x86';
|
||||
} else if (arch === 'armhf') {
|
||||
if (arch === 'armhf') {
|
||||
arch = 'armv7l';
|
||||
} else if (arch === 'alpine') {
|
||||
platform = 'alpine';
|
||||
|
||||
@@ -18,7 +18,6 @@ const { existsSync, readdirSync } = require('fs');
|
||||
const root = path.dirname(__dirname);
|
||||
|
||||
const BUILD_TARGETS = [
|
||||
{ platform: 'win32', arch: 'ia32' },
|
||||
{ platform: 'win32', arch: 'x64' },
|
||||
{ platform: 'win32', arch: 'arm64' },
|
||||
{ platform: 'darwin', arch: null, opts: { stats: true } },
|
||||
|
||||
@@ -73,7 +73,6 @@ const vscodeResources = [
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.sh',
|
||||
'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',
|
||||
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
||||
'out-build/vs/workbench/services/voiceRecognition/electron-sandbox/voiceTranscriptionWorklet.js',
|
||||
'out-build/vs/**/markdown.css',
|
||||
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
||||
'!**/test/**'
|
||||
@@ -423,12 +422,10 @@ function patchWin32DependenciesTask(destinationFolderName) {
|
||||
const buildRoot = path.dirname(root);
|
||||
|
||||
const BUILD_TARGETS = [
|
||||
{ platform: 'win32', arch: 'ia32' },
|
||||
{ platform: 'win32', arch: 'x64' },
|
||||
{ platform: 'win32', arch: 'arm64' },
|
||||
{ platform: 'darwin', arch: 'x64', opts: { stats: true } },
|
||||
{ platform: 'darwin', arch: 'arm64', opts: { stats: true } },
|
||||
{ platform: 'linux', arch: 'ia32' },
|
||||
{ platform: 'linux', arch: 'x64' },
|
||||
{ platform: 'linux', arch: 'armhf' },
|
||||
{ platform: 'linux', arch: 'arm64' },
|
||||
|
||||
@@ -70,7 +70,6 @@ function buildWin32Setup(arch, target) {
|
||||
}
|
||||
|
||||
return cb => {
|
||||
const ia32AppId = target === 'system' ? product.win32AppId : product.win32UserAppId;
|
||||
const x64AppId = target === 'system' ? product.win32x64AppId : product.win32x64UserAppId;
|
||||
const arm64AppId = target === 'system' ? product.win32arm64AppId : product.win32arm64UserAppId;
|
||||
|
||||
@@ -101,12 +100,11 @@ function buildWin32Setup(arch, target) {
|
||||
TunnelApplicationName: product.tunnelApplicationName,
|
||||
ApplicationName: product.applicationName,
|
||||
Arch: arch,
|
||||
AppId: { 'ia32': ia32AppId, 'x64': x64AppId, 'arm64': arm64AppId }[arch],
|
||||
IncompatibleTargetAppId: { 'ia32': product.win32AppId, 'x64': product.win32x64AppId, 'arm64': product.win32arm64AppId }[arch],
|
||||
IncompatibleArchAppId: { 'ia32': x64AppId, 'x64': ia32AppId, 'arm64': ia32AppId }[arch],
|
||||
AppId: { 'x64': x64AppId, 'arm64': arm64AppId }[arch],
|
||||
IncompatibleTargetAppId: { 'x64': product.win32x64AppId, 'arm64': product.win32arm64AppId }[arch],
|
||||
AppUserId: product.win32AppUserModelId,
|
||||
ArchitecturesAllowed: { 'ia32': '', 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
||||
ArchitecturesInstallIn64BitMode: { 'ia32': '', 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
||||
ArchitecturesAllowed: { 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
||||
ArchitecturesInstallIn64BitMode: { 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
||||
SourceDir: sourcePath,
|
||||
RepoDir: repoPath,
|
||||
OutputDir: outputPath,
|
||||
@@ -116,7 +114,7 @@ function buildWin32Setup(arch, target) {
|
||||
};
|
||||
|
||||
if (quality === 'insider') {
|
||||
definitions['AppxPackage'] = `code_insiders_explorer_${arch === 'ia32' ? 'x86' : arch}.appx`;
|
||||
definitions['AppxPackage'] = `code_insiders_explorer_${arch}.appx`;
|
||||
definitions['AppxPackageFullname'] = `Microsoft.${product.win32RegValueName}_1.0.0.0_neutral__8wekyb3d8bbwe`;
|
||||
}
|
||||
|
||||
@@ -133,10 +131,8 @@ function defineWin32SetupTasks(arch, target) {
|
||||
gulp.task(task.define(`vscode-win32-${arch}-${target}-setup`, task.series(cleanTask, buildWin32Setup(arch, target))));
|
||||
}
|
||||
|
||||
defineWin32SetupTasks('ia32', 'system');
|
||||
defineWin32SetupTasks('x64', 'system');
|
||||
defineWin32SetupTasks('arm64', 'system');
|
||||
defineWin32SetupTasks('ia32', 'user');
|
||||
defineWin32SetupTasks('x64', 'user');
|
||||
defineWin32SetupTasks('arm64', 'user');
|
||||
|
||||
@@ -160,6 +156,5 @@ function updateIcon(executablePath) {
|
||||
};
|
||||
}
|
||||
|
||||
gulp.task(task.define('vscode-win32-ia32-inno-updater', task.series(copyInnoUpdater('ia32'), updateIcon(path.join(buildPath('ia32'), 'tools', 'inno_updater.exe')))));
|
||||
gulp.task(task.define('vscode-win32-x64-inno-updater', task.series(copyInnoUpdater('x64'), updateIcon(path.join(buildPath('x64'), 'tools', 'inno_updater.exe')))));
|
||||
gulp.task(task.define('vscode-win32-arm64-inno-updater', task.series(copyInnoUpdater('arm64'), updateIcon(path.join(buildPath('arm64'), 'tools', 'inno_updater.exe')))));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -277,7 +277,7 @@ function generateApiProposalNames() {
|
||||
eol = os.EOL;
|
||||
}
|
||||
|
||||
const pattern = /vscode\.proposed\.([a-zA-Z]+)\.d\.ts$/;
|
||||
const pattern = /vscode\.proposed\.([a-zA-Z\d]+)\.d\.ts$/;
|
||||
const proposalNames = new Set<string>();
|
||||
|
||||
const input = es.through();
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/voiceRecognition",
|
||||
"name": "vs/workbench/services/auxiliaryWindow",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
@@ -214,6 +214,10 @@
|
||||
"name": "vs/workbench/contrib/tags",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/speech",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/surveys",
|
||||
"project": "vscode-workbench"
|
||||
|
||||
@@ -681,6 +681,7 @@
|
||||
"--vscode-textCodeBlock-background",
|
||||
"--vscode-textLink-activeForeground",
|
||||
"--vscode-textLink-foreground",
|
||||
"--vscode-textPreformat-background",
|
||||
"--vscode-textPreformat-foreground",
|
||||
"--vscode-textSeparator-foreground",
|
||||
"--vscode-titleBar-activeBackground",
|
||||
@@ -695,6 +696,8 @@
|
||||
"--vscode-tree-indentGuidesStroke",
|
||||
"--vscode-tree-tableColumnsBorder",
|
||||
"--vscode-tree-tableOddRowsBackground",
|
||||
"--vscode-voiceRecording-background",
|
||||
"--vscode-voiceRecording-dimmedBackground",
|
||||
"--vscode-walkThrough-embeddedEditorBackground",
|
||||
"--vscode-walkthrough-stepTitle-foreground",
|
||||
"--vscode-welcomePage-background",
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"@types/byline": "^4.2.32",
|
||||
"@types/cssnano": "^4.0.0",
|
||||
"@types/debounce": "^1.0.0",
|
||||
"@types/debug": "4.1.5",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/fancy-log": "^1.3.0",
|
||||
"@types/fs-extra": "^9.0.12",
|
||||
"@types/glob": "^7.1.1",
|
||||
|
||||
+1
-19
@@ -1327,7 +1327,7 @@ begin
|
||||
#endif
|
||||
|
||||
#if "user" == InstallTarget
|
||||
#if "ia32" == Arch || "arm64" == Arch
|
||||
#if "arm64" == Arch
|
||||
#define IncompatibleArchRootKey "HKLM32"
|
||||
#else
|
||||
#define IncompatibleArchRootKey "HKLM64"
|
||||
@@ -1344,24 +1344,6 @@ begin
|
||||
end;
|
||||
#endif
|
||||
|
||||
if Result and IsWin64 then begin
|
||||
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleArchAppId}', 2, 38) + '_is1';
|
||||
|
||||
if '{#Arch}' = 'ia32' then begin
|
||||
Result := not RegKeyExists({#Uninstall64RootKey}, RegKey);
|
||||
ThisArch := '32';
|
||||
AltArch := '64';
|
||||
end else begin
|
||||
Result := not RegKeyExists({#Uninstall32RootKey}, RegKey);
|
||||
ThisArch := '64';
|
||||
AltArch := '32';
|
||||
end;
|
||||
|
||||
if not Result and not WizardSilent() then begin
|
||||
MsgBox('Please uninstall the ' + AltArch + '-bit version of {#NameShort} before installing this ' + ThisArch + '-bit version. Uninstalling will not delete settings.', mbInformation, MB_OK);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function WizardNotSilent(): Boolean;
|
||||
|
||||
@@ -38,13 +38,10 @@ async function downloadExplorerAppx(outDir, quality = 'stable', targetArch = 'x6
|
||||
}
|
||||
exports.downloadExplorerAppx = downloadExplorerAppx;
|
||||
async function main(outputDir) {
|
||||
let arch = process.env['VSCODE_ARCH'];
|
||||
const arch = process.env['VSCODE_ARCH'];
|
||||
if (!outputDir) {
|
||||
throw new Error('Required build env not set');
|
||||
}
|
||||
if (arch === 'ia32') {
|
||||
arch = 'x86';
|
||||
}
|
||||
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
||||
await downloadExplorerAppx(outputDir, product.quality, arch);
|
||||
}
|
||||
@@ -54,4 +51,4 @@ if (require.main === module) {
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwbG9yZXItYXBweC1mZXRjaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXhwbG9yZXItYXBweC1mZXRjaGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Z0dBR2dHO0FBRWhHLFlBQVksQ0FBQzs7O0FBRWIseUJBQXlCO0FBQ3pCLCtCQUErQjtBQUMvQix1Q0FBdUM7QUFDdkMsNkJBQTZCO0FBQzdCLHVDQUFpRDtBQUVqRCxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztBQUVuRCxNQUFNLENBQUMsR0FBRyxLQUFLLENBQUMsdUJBQXVCLENBQUMsQ0FBQztBQUVsQyxLQUFLLFVBQVUsb0JBQW9CLENBQUMsTUFBYyxFQUFFLFVBQWtCLFFBQVEsRUFBRSxhQUFxQixLQUFLO0lBQ2hILE1BQU0sY0FBYyxHQUFHLE9BQU8sS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDO0lBQ3hFLE1BQU0sUUFBUSxHQUFHLEdBQUcsY0FBYyxhQUFhLFVBQVUsTUFBTSxDQUFDO0lBRWhFLElBQUksTUFBTSxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLGVBQWUsQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUNoRSxPQUFPO0lBQ1IsQ0FBQztJQUVELElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNsQyxNQUFNLEVBQUUsQ0FBQyxTQUFTLENBQUMsTUFBTSxFQUFFLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7SUFDakQsQ0FBQztJQUVELENBQUMsQ0FBQyxlQUFlLFFBQVEsRUFBRSxDQUFDLENBQUM7SUFDN0IsTUFBTSxRQUFRLEdBQUcsTUFBTSxJQUFBLHNCQUFnQixFQUFDO1FBQ3ZDLFNBQVMsRUFBRSxJQUFJO1FBQ2YsT0FBTyxFQUFFLE9BQU87UUFDaEIsWUFBWSxFQUFFLFFBQVE7UUFDdEIsd0JBQXdCLEVBQUUsSUFBSTtRQUM5QixhQUFhLEVBQUU7WUFDZCxNQUFNLEVBQUUseUVBQXlFO1lBQ2pGLFNBQVMsRUFBRSxPQUFPO1lBQ2xCLGNBQWMsRUFBRSxRQUFRO1NBQ3hCO0tBQ0QsQ0FBQyxDQUFDO0lBRUgsQ0FBQyxDQUFDLGtCQUFrQixRQUFRLEVBQUUsQ0FBQyxDQUFDO0lBQ2hDLE1BQU0sT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLEdBQUcsRUFBRSxFQUFFLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUMzRCxDQUFDO0FBM0JELG9EQTJCQztBQUVELEtBQUssVUFBVSxJQUFJLENBQUMsU0FBa0I7SUFDckMsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztJQUV0QyxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7UUFDaEIsTUFBTSxJQUFJLEtBQUssQ0FBQyw0QkFBNEIsQ0FBQyxDQUFDO0lBQy9DLENBQUM7SUFFRCxJQUFJLElBQUksS0FBSyxNQUFNLEVBQUUsQ0FBQztRQUNyQixJQUFJLEdBQUcsS0FBSyxDQUFDO0lBQ2QsQ0FBQztJQUVELE1BQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxjQUFjLENBQUMsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQ3JGLE1BQU0sb0JBQW9CLENBQUMsU0FBUyxFQUFHLE9BQWUsQ0FBQyxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDdkUsQ0FBQztBQUVELElBQUksT0FBTyxDQUFDLElBQUksS0FBSyxNQUFNLEVBQUUsQ0FBQztJQUM3QixJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsRUFBRTtRQUNqQyxPQUFPLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ25CLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakIsQ0FBQyxDQUFDLENBQUM7QUFDSixDQUFDIn0=
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwbG9yZXItYXBweC1mZXRjaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXhwbG9yZXItYXBweC1mZXRjaGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Z0dBR2dHO0FBRWhHLFlBQVksQ0FBQzs7O0FBRWIseUJBQXlCO0FBQ3pCLCtCQUErQjtBQUMvQix1Q0FBdUM7QUFDdkMsNkJBQTZCO0FBQzdCLHVDQUFpRDtBQUVqRCxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztBQUVuRCxNQUFNLENBQUMsR0FBRyxLQUFLLENBQUMsdUJBQXVCLENBQUMsQ0FBQztBQUVsQyxLQUFLLFVBQVUsb0JBQW9CLENBQUMsTUFBYyxFQUFFLFVBQWtCLFFBQVEsRUFBRSxhQUFxQixLQUFLO0lBQ2hILE1BQU0sY0FBYyxHQUFHLE9BQU8sS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDO0lBQ3hFLE1BQU0sUUFBUSxHQUFHLEdBQUcsY0FBYyxhQUFhLFVBQVUsTUFBTSxDQUFDO0lBRWhFLElBQUksTUFBTSxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLGVBQWUsQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUNoRSxPQUFPO0lBQ1IsQ0FBQztJQUVELElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNsQyxNQUFNLEVBQUUsQ0FBQyxTQUFTLENBQUMsTUFBTSxFQUFFLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7SUFDakQsQ0FBQztJQUVELENBQUMsQ0FBQyxlQUFlLFFBQVEsRUFBRSxDQUFDLENBQUM7SUFDN0IsTUFBTSxRQUFRLEdBQUcsTUFBTSxJQUFBLHNCQUFnQixFQUFDO1FBQ3ZDLFNBQVMsRUFBRSxJQUFJO1FBQ2YsT0FBTyxFQUFFLE9BQU87UUFDaEIsWUFBWSxFQUFFLFFBQVE7UUFDdEIsd0JBQXdCLEVBQUUsSUFBSTtRQUM5QixhQUFhLEVBQUU7WUFDZCxNQUFNLEVBQUUseUVBQXlFO1lBQ2pGLFNBQVMsRUFBRSxPQUFPO1lBQ2xCLGNBQWMsRUFBRSxRQUFRO1NBQ3hCO0tBQ0QsQ0FBQyxDQUFDO0lBRUgsQ0FBQyxDQUFDLGtCQUFrQixRQUFRLEVBQUUsQ0FBQyxDQUFDO0lBQ2hDLE1BQU0sT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLEdBQUcsRUFBRSxFQUFFLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUMzRCxDQUFDO0FBM0JELG9EQTJCQztBQUVELEtBQUssVUFBVSxJQUFJLENBQUMsU0FBa0I7SUFDckMsTUFBTSxJQUFJLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztJQUV4QyxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7UUFDaEIsTUFBTSxJQUFJLEtBQUssQ0FBQyw0QkFBNEIsQ0FBQyxDQUFDO0lBQy9DLENBQUM7SUFFRCxNQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsY0FBYyxDQUFDLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQztJQUNyRixNQUFNLG9CQUFvQixDQUFDLFNBQVMsRUFBRyxPQUFlLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3ZFLENBQUM7QUFFRCxJQUFJLE9BQU8sQ0FBQyxJQUFJLEtBQUssTUFBTSxFQUFFLENBQUM7SUFDN0IsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUU7UUFDakMsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNuQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ2pCLENBQUMsQ0FBQyxDQUFDO0FBQ0osQ0FBQyJ9
|
||||
@@ -45,16 +45,12 @@ export async function downloadExplorerAppx(outDir: string, quality: string = 'st
|
||||
}
|
||||
|
||||
async function main(outputDir?: string): Promise<void> {
|
||||
let arch = process.env['VSCODE_ARCH'];
|
||||
const arch = process.env['VSCODE_ARCH'];
|
||||
|
||||
if (!outputDir) {
|
||||
throw new Error('Required build env not set');
|
||||
}
|
||||
|
||||
if (arch === 'ia32') {
|
||||
arch = 'x86';
|
||||
}
|
||||
|
||||
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
||||
await downloadExplorerAppx(outputDir, (product as any).quality, arch);
|
||||
}
|
||||
|
||||
+18
-18
@@ -400,10 +400,12 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.0.0.tgz#417560200331e1bb84d72da85391102c2fcd61b7"
|
||||
integrity sha1-QXVgIAMx4buE1y2oU5EQLC/NYbc=
|
||||
|
||||
"@types/debug@4.1.5":
|
||||
version "4.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd"
|
||||
integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==
|
||||
"@types/debug@^4.1.5":
|
||||
version "4.1.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.9.tgz#906996938bc672aaf2fb8c0d3733ae1dda05b005"
|
||||
integrity sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==
|
||||
dependencies:
|
||||
"@types/ms" "*"
|
||||
|
||||
"@types/events@*":
|
||||
version "1.2.0"
|
||||
@@ -533,6 +535,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4"
|
||||
integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==
|
||||
|
||||
"@types/ms@*":
|
||||
version "0.7.32"
|
||||
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.32.tgz#f6cd08939ae3ad886fcc92ef7f0109dacddf61ab"
|
||||
integrity sha512-xPSg0jm4mqgEkNhowKgZFBNtwoEwF6gJ4Dhww+GFpm3IgtNseHQZ5IqdNwnquZEoANxyDAKDRAdVo4Z72VvD/g==
|
||||
|
||||
"@types/node-fetch@^2.5.0":
|
||||
version "2.5.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.8.tgz#e199c835d234c7eb0846f6618012e558544ee2fb"
|
||||
@@ -1116,10 +1123,10 @@ css-what@^6.1.0:
|
||||
resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4"
|
||||
integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==
|
||||
|
||||
debug@4, debug@^4.1.0, debug@^4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
|
||||
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
|
||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
@@ -1130,13 +1137,6 @@ debug@^2.6.8:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^4.1.1, debug@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
decompress-response@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
|
||||
@@ -1657,9 +1657,9 @@ http-proxy-agent@^4.0.1:
|
||||
debug "4"
|
||||
|
||||
https-proxy-agent@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
|
||||
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
|
||||
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
|
||||
dependencies:
|
||||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
+2
-2
@@ -528,12 +528,12 @@
|
||||
"git": {
|
||||
"name": "electron",
|
||||
"repositoryUrl": "https://github.com/electron/electron",
|
||||
"commitHash": "415301c477b600502cf264e93318dda551288829"
|
||||
"commitHash": "805674fa8aae4d652b6956a96f8eadf9d9137457"
|
||||
}
|
||||
},
|
||||
"isOnlyProductionDependency": true,
|
||||
"license": "MIT",
|
||||
"version": "25.8.4"
|
||||
"version": "25.9.1"
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
|
||||
+9
-5
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
use crate::{
|
||||
constants::{get_default_user_agent, PRODUCT_NAME_LONG},
|
||||
constants::{get_default_user_agent, IS_INTERACTIVE_CLI, PRODUCT_NAME_LONG},
|
||||
debug, error, info, log,
|
||||
state::{LauncherPaths, PersistedState},
|
||||
trace,
|
||||
@@ -37,7 +37,7 @@ struct DeviceCodeResponse {
|
||||
expires_in: i64,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct AuthenticationResponse {
|
||||
access_token: String,
|
||||
refresh_token: Option<String>,
|
||||
@@ -76,7 +76,7 @@ impl AuthProvider {
|
||||
pub fn code_uri(&self) -> &'static str {
|
||||
match self {
|
||||
AuthProvider::Microsoft => {
|
||||
"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode"
|
||||
"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode"
|
||||
}
|
||||
AuthProvider::Github => "https://github.com/login/device/code",
|
||||
}
|
||||
@@ -84,7 +84,7 @@ impl AuthProvider {
|
||||
|
||||
pub fn grant_uri(&self) -> &'static str {
|
||||
match self {
|
||||
AuthProvider::Microsoft => "https://login.microsoftonline.com/common/oauth2/v2.0/token",
|
||||
AuthProvider::Microsoft => "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
|
||||
AuthProvider::Github => "https://github.com/login/oauth/access_token",
|
||||
}
|
||||
}
|
||||
@@ -670,7 +670,11 @@ impl Auth {
|
||||
}
|
||||
|
||||
async fn prompt_for_provider(&self) -> Result<AuthProvider, AnyError> {
|
||||
if std::env::var("VSCODE_CLI_ALLOW_MS_AUTH").is_err() {
|
||||
if !*IS_INTERACTIVE_CLI {
|
||||
info!(
|
||||
self.log,
|
||||
"Using Github for authentication, pass the `--provider` option to change this."
|
||||
);
|
||||
return Ok(AuthProvider::Github);
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ impl<'a> ServerBuilder<'a> {
|
||||
let (mut origin, listen_rx) =
|
||||
monitor_server::<SocketMatcher, PathBuf>(child, Some(log_file), plog, false);
|
||||
|
||||
let socket = match timeout(Duration::from_secs(8), listen_rx).await {
|
||||
let socket = match timeout(Duration::from_secs(30), listen_rx).await {
|
||||
Err(e) => {
|
||||
origin.kill().await;
|
||||
Err(wrap(e, "timed out looking for socket"))
|
||||
|
||||
@@ -21,6 +21,7 @@ use crate::util::http::{
|
||||
};
|
||||
use crate::util::io::SilentCopyProgress;
|
||||
use crate::util::is_integrated_cli;
|
||||
use crate::util::machine::kill_pid;
|
||||
use crate::util::os::os_release;
|
||||
use crate::util::sync::{new_barrier, Barrier, BarrierOpener};
|
||||
|
||||
@@ -29,6 +30,7 @@ use futures::FutureExt;
|
||||
use opentelemetry::trace::SpanKind;
|
||||
use opentelemetry::KeyValue;
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Stdio;
|
||||
use tokio::pin;
|
||||
use tokio::process::{ChildStderr, ChildStdin};
|
||||
@@ -51,9 +53,10 @@ use super::port_forwarder::{PortForwarding, PortForwardingProcessor};
|
||||
use super::protocol::{
|
||||
AcquireCliParams, CallServerHttpParams, CallServerHttpResult, ChallengeIssueParams,
|
||||
ChallengeIssueResponse, ChallengeVerifyParams, ClientRequestMethod, EmptyObject, ForwardParams,
|
||||
ForwardResult, FsStatRequest, FsStatResponse, GetEnvResponse, GetHostnameResponse,
|
||||
HttpBodyParams, HttpHeadersParams, ServeParams, ServerLog, ServerMessageParams, SpawnParams,
|
||||
SpawnResult, ToClientRequest, UnforwardParams, UpdateParams, UpdateResult, VersionResponse,
|
||||
ForwardResult, FsReadDirEntry, FsReadDirResponse, FsRenameRequest, FsSinglePathRequest,
|
||||
FsStatResponse, GetEnvResponse, GetHostnameResponse, HttpBodyParams, HttpHeadersParams,
|
||||
ServeParams, ServerLog, ServerMessageParams, SpawnParams, SpawnResult, SysKillRequest,
|
||||
SysKillResponse, ToClientRequest, UnforwardParams, UpdateParams, UpdateResult, VersionResponse,
|
||||
METHOD_CHALLENGE_VERIFY,
|
||||
};
|
||||
use super::server_bridge::ServerBridge;
|
||||
@@ -306,10 +309,54 @@ fn make_socket_rpc(
|
||||
|
||||
rpc.register_sync("ping", |_: EmptyObject, _| Ok(EmptyObject {}));
|
||||
rpc.register_sync("gethostname", |_: EmptyObject, _| handle_get_hostname());
|
||||
rpc.register_sync("fs_stat", |p: FsStatRequest, c| {
|
||||
rpc.register_sync("sys_kill", |p: SysKillRequest, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_sys_kill(p.pid)
|
||||
});
|
||||
rpc.register_sync("fs_stat", |p: FsSinglePathRequest, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_stat(p.path)
|
||||
});
|
||||
rpc.register_duplex(
|
||||
"fs_read",
|
||||
1,
|
||||
move |mut streams, p: FsSinglePathRequest, c| async move {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_read(streams.remove(0), p.path).await
|
||||
},
|
||||
);
|
||||
rpc.register_duplex(
|
||||
"fs_write",
|
||||
1,
|
||||
move |mut streams, p: FsSinglePathRequest, c| async move {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_write(streams.remove(0), p.path).await
|
||||
},
|
||||
);
|
||||
rpc.register_duplex(
|
||||
"fs_connect",
|
||||
1,
|
||||
move |mut streams, p: FsSinglePathRequest, c| async move {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_connect(streams.remove(0), p.path).await
|
||||
},
|
||||
);
|
||||
rpc.register_async("fs_rm", move |p: FsSinglePathRequest, c| async move {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_remove(p.path).await
|
||||
});
|
||||
rpc.register_sync("fs_mkdirp", |p: FsSinglePathRequest, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_mkdirp(p.path)
|
||||
});
|
||||
rpc.register_sync("fs_rename", |p: FsRenameRequest, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_rename(p.from_path, p.to_path)
|
||||
});
|
||||
rpc.register_sync("fs_readdir", |p: FsSinglePathRequest, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_fs_readdir(p.path)
|
||||
});
|
||||
rpc.register_sync("get_env", |_: EmptyObject, c| {
|
||||
ensure_auth(&c.auth_state)?;
|
||||
handle_get_env()
|
||||
@@ -820,16 +867,87 @@ fn handle_stat(path: String) -> Result<FsStatResponse, AnyError> {
|
||||
.map(|m| FsStatResponse {
|
||||
exists: true,
|
||||
size: Some(m.len()),
|
||||
kind: Some(match m.file_type() {
|
||||
t if t.is_dir() => "dir",
|
||||
t if t.is_file() => "file",
|
||||
t if t.is_symlink() => "link",
|
||||
_ => "unknown",
|
||||
}),
|
||||
kind: Some(m.file_type().into()),
|
||||
})
|
||||
.unwrap_or_default())
|
||||
}
|
||||
|
||||
async fn handle_fs_read(mut out: DuplexStream, path: String) -> Result<EmptyObject, AnyError> {
|
||||
let mut f = tokio::fs::File::open(path)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "file not found"))?;
|
||||
|
||||
tokio::io::copy(&mut f, &mut out)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "error reading file"))?;
|
||||
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
async fn handle_fs_write(mut input: DuplexStream, path: String) -> Result<EmptyObject, AnyError> {
|
||||
let mut f = tokio::fs::File::create(path)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "file not found"))?;
|
||||
|
||||
tokio::io::copy(&mut input, &mut f)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "error writing file"))?;
|
||||
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
async fn handle_fs_connect(
|
||||
mut stream: DuplexStream,
|
||||
path: String,
|
||||
) -> Result<EmptyObject, AnyError> {
|
||||
let mut s = get_socket_rw_stream(&PathBuf::from(path))
|
||||
.await
|
||||
.map_err(|e| wrap(e, "could not connect to socket"))?;
|
||||
|
||||
tokio::io::copy_bidirectional(&mut stream, &mut s)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "error copying stream data"))?;
|
||||
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
async fn handle_fs_remove(path: String) -> Result<EmptyObject, AnyError> {
|
||||
tokio::fs::remove_dir_all(path)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "error removing directory"))?;
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
fn handle_fs_rename(from_path: String, to_path: String) -> Result<EmptyObject, AnyError> {
|
||||
std::fs::rename(from_path, to_path).map_err(|e| wrap(e, "error renaming"))?;
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
fn handle_fs_mkdirp(path: String) -> Result<EmptyObject, AnyError> {
|
||||
std::fs::create_dir_all(path).map_err(|e| wrap(e, "error creating directory"))?;
|
||||
Ok(EmptyObject {})
|
||||
}
|
||||
|
||||
fn handle_fs_readdir(path: String) -> Result<FsReadDirResponse, AnyError> {
|
||||
let mut entries = std::fs::read_dir(path).map_err(|e| wrap(e, "error listing directory"))?;
|
||||
|
||||
let mut contents = Vec::new();
|
||||
while let Some(Ok(child)) = entries.next() {
|
||||
contents.push(FsReadDirEntry {
|
||||
name: child.file_name().to_string_lossy().into_owned(),
|
||||
kind: child.file_type().ok().map(|v| v.into()),
|
||||
});
|
||||
}
|
||||
|
||||
Ok(FsReadDirResponse { contents })
|
||||
}
|
||||
|
||||
fn handle_sys_kill(pid: u32) -> Result<SysKillResponse, AnyError> {
|
||||
Ok(SysKillResponse {
|
||||
success: kill_pid(pid),
|
||||
})
|
||||
}
|
||||
|
||||
fn handle_get_env() -> Result<GetEnvResponse, AnyError> {
|
||||
Ok(GetEnvResponse {
|
||||
env: std::env::vars().collect(),
|
||||
@@ -1110,13 +1228,7 @@ async fn wait_for_process_exit(
|
||||
mut process: tokio::process::Child,
|
||||
futs: FuturesUnordered<std::pin::Pin<Box<TokioCopyFuture>>>,
|
||||
) -> Result<SpawnResult, AnyError> {
|
||||
let closed = process.wait();
|
||||
pin!(closed);
|
||||
|
||||
let r = tokio::select! {
|
||||
_ = futures::future::join_all(futs) => closed.await,
|
||||
r = &mut closed => r
|
||||
};
|
||||
let (_, r) = tokio::join!(futures::future::join_all(futs), process.wait());
|
||||
|
||||
let r = match r {
|
||||
Ok(e) => SpawnResult {
|
||||
|
||||
@@ -133,17 +133,80 @@ pub struct GetEnvResponse {
|
||||
pub os_release: String,
|
||||
}
|
||||
|
||||
/// Method: `kill`. Sends a generic, platform-specific kill command to the process.
|
||||
#[derive(Deserialize)]
|
||||
pub struct FsStatRequest {
|
||||
pub struct SysKillRequest {
|
||||
pub pid: u32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct SysKillResponse {
|
||||
pub success: bool,
|
||||
}
|
||||
|
||||
/// Methods: `fs_read`/`fs_write`/`fs_rm`/`fs_mkdirp`/`fs_stat`
|
||||
/// - fs_read: reads into a stream returned from the method,
|
||||
/// - fs_write: writes from a stream passed to the method.
|
||||
/// - fs_rm: recursively removes the file
|
||||
/// - fs_mkdirp: recursively creates the directory
|
||||
/// - fs_readdir: reads directory contents
|
||||
/// - fs_stat: stats the given path
|
||||
/// - fs_connect: connect to the given unix or named pipe socket, streaming
|
||||
/// data in and out from the method's stream.
|
||||
#[derive(Deserialize)]
|
||||
pub struct FsSinglePathRequest {
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub enum FsFileKind {
|
||||
#[serde(rename = "dir")]
|
||||
Directory,
|
||||
#[serde(rename = "file")]
|
||||
File,
|
||||
#[serde(rename = "link")]
|
||||
Link,
|
||||
}
|
||||
|
||||
impl From<std::fs::FileType> for FsFileKind {
|
||||
fn from(kind: std::fs::FileType) -> Self {
|
||||
if kind.is_dir() {
|
||||
Self::Directory
|
||||
} else if kind.is_file() {
|
||||
Self::File
|
||||
} else if kind.is_symlink() {
|
||||
Self::Link
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Default)]
|
||||
pub struct FsStatResponse {
|
||||
pub exists: bool,
|
||||
pub size: Option<u64>,
|
||||
#[serde(rename = "type")]
|
||||
pub kind: Option<&'static str>,
|
||||
pub kind: Option<FsFileKind>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct FsReadDirResponse {
|
||||
pub contents: Vec<FsReadDirEntry>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct FsReadDirEntry {
|
||||
pub name: String,
|
||||
#[serde(rename = "type")]
|
||||
pub kind: Option<FsFileKind>,
|
||||
}
|
||||
|
||||
/// Method: `fs_reaname`. Renames a file.
|
||||
#[derive(Deserialize)]
|
||||
pub struct FsRenameRequest {
|
||||
pub from_path: String,
|
||||
pub to_path: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
|
||||
@@ -29,6 +29,18 @@ pub fn process_exists(pid: u32) -> bool {
|
||||
sys.refresh_process(Pid::from_u32(pid))
|
||||
}
|
||||
|
||||
pub fn kill_pid(pid: u32) -> bool {
|
||||
let mut sys = System::new();
|
||||
let pid = Pid::from_u32(pid);
|
||||
sys.refresh_process(pid);
|
||||
|
||||
if let Some(p) = sys.process(pid) {
|
||||
p.kill()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn wait_until_process_exits(pid: Pid, poll_ms: u64) {
|
||||
let mut s = System::new();
|
||||
let duration = Duration::from_millis(poll_ms);
|
||||
|
||||
@@ -53,11 +53,12 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
private static detectors = new Map<vscode.DebugSession, ServerReadyDetector>();
|
||||
private static terminalDataListener: vscode.Disposable | undefined;
|
||||
|
||||
private readonly stoppedEmitter = new vscode.EventEmitter<void>();
|
||||
private readonly onDidSessionStop = this.stoppedEmitter.event;
|
||||
private readonly disposables = new Set<vscode.Disposable>([]);
|
||||
private trigger: Trigger;
|
||||
private shellPid?: number;
|
||||
private regexp: RegExp;
|
||||
private disposables: vscode.Disposable[] = [];
|
||||
private lateDisposables = new Set<vscode.Disposable>([]);
|
||||
|
||||
static start(session: vscode.DebugSession): ServerReadyDetector | undefined {
|
||||
if (session.configuration.serverReadyAction) {
|
||||
@@ -75,6 +76,7 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
const detector = ServerReadyDetector.detectors.get(session);
|
||||
if (detector) {
|
||||
ServerReadyDetector.detectors.delete(session);
|
||||
detector.sessionStopped();
|
||||
detector.dispose();
|
||||
}
|
||||
}
|
||||
@@ -125,12 +127,11 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
|
||||
private internalDispose() {
|
||||
this.disposables.forEach(d => d.dispose());
|
||||
this.disposables = [];
|
||||
this.disposables.clear();
|
||||
}
|
||||
|
||||
override dispose() {
|
||||
this.lateDisposables.forEach(d => d.dispose());
|
||||
return super.dispose();
|
||||
public sessionStopped() {
|
||||
this.stoppedEmitter.fire();
|
||||
}
|
||||
|
||||
detectPattern(s: string): boolean {
|
||||
@@ -139,7 +140,6 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
if (matches && matches.length >= 1) {
|
||||
this.openExternalWithString(this.session, matches.length > 1 ? matches[1] : '');
|
||||
this.trigger.fire();
|
||||
this.internalDispose();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,6 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
}
|
||||
|
||||
private openExternalWithString(session: vscode.DebugSession, captureString: string) {
|
||||
|
||||
const args: ServerReadyAction = session.configuration.serverReadyAction;
|
||||
|
||||
let uri;
|
||||
@@ -228,14 +227,12 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
const stopListener = vscode.debug.onDidTerminateDebugSession(async (terminated) => {
|
||||
if (terminated === session) {
|
||||
stopListener.dispose();
|
||||
this.lateDisposables.delete(stopListener);
|
||||
await vscode.debug.stopDebugging(createdSession);
|
||||
}
|
||||
const stopListener = this.onDidSessionStop(async () => {
|
||||
stopListener.dispose();
|
||||
this.disposables.delete(stopListener);
|
||||
await vscode.debug.stopDebugging(createdSession);
|
||||
});
|
||||
this.lateDisposables.add(stopListener);
|
||||
this.disposables.add(stopListener);
|
||||
}
|
||||
|
||||
private startBrowserDebugSession(type: string, session: vscode.DebugSession, uri: string, trackerId?: string) {
|
||||
@@ -272,14 +269,12 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
const stopListener = vscode.debug.onDidTerminateDebugSession(async (terminated) => {
|
||||
if (terminated === session) {
|
||||
stopListener.dispose();
|
||||
this.lateDisposables.delete(stopListener);
|
||||
await vscode.debug.stopDebugging(createdSession);
|
||||
}
|
||||
const stopListener = this.onDidSessionStop(async () => {
|
||||
stopListener.dispose();
|
||||
this.disposables.delete(stopListener);
|
||||
await vscode.debug.stopDebugging(createdSession);
|
||||
});
|
||||
this.lateDisposables.add(stopListener);
|
||||
this.disposables.add(stopListener);
|
||||
}
|
||||
|
||||
private catchStartedDebugSession(predicate: (session: vscode.DebugSession) => boolean, cancellationToken: vscode.CancellationToken): Promise<vscode.DebugSession | undefined> {
|
||||
@@ -287,8 +282,8 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
const done = (value?: vscode.DebugSession) => {
|
||||
listener.dispose();
|
||||
cancellationListener.dispose();
|
||||
this.lateDisposables.delete(listener);
|
||||
this.lateDisposables.delete(cancellationListener);
|
||||
this.disposables.delete(listener);
|
||||
this.disposables.delete(cancellationListener);
|
||||
_resolve(value);
|
||||
};
|
||||
|
||||
@@ -300,8 +295,8 @@ class ServerReadyDetector extends vscode.Disposable {
|
||||
});
|
||||
|
||||
// In case the debug session of interest was never caught anyhow.
|
||||
this.lateDisposables.add(listener);
|
||||
this.lateDisposables.add(cancellationListener);
|
||||
this.disposables.add(listener);
|
||||
this.disposables.add(cancellationListener);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ suite('Tests for Emmet actions on html tags', () => {
|
||||
// #endregion
|
||||
|
||||
// #region remove tag
|
||||
test('remove tag with mutliple cursors', () => {
|
||||
test('remove tag with multiple cursors', () => {
|
||||
const expectedContents = `
|
||||
<div class="hello">
|
||||
<ul>
|
||||
@@ -227,7 +227,7 @@ suite('Tests for Emmet actions on html tags', () => {
|
||||
// #endregion
|
||||
|
||||
// #region split/join tag
|
||||
test('split/join tag with mutliple cursors', () => {
|
||||
test('split/join tag with multiple cursors', () => {
|
||||
const expectedContents = `
|
||||
<div class="hello">
|
||||
<ul>
|
||||
@@ -328,7 +328,7 @@ suite('Tests for Emmet actions on html tags', () => {
|
||||
// #endregion
|
||||
|
||||
// #region match tag
|
||||
test('match tag with mutliple cursors', () => {
|
||||
test('match tag with multiple cursors', () => {
|
||||
return withRandomFileEditor(contents, 'html', (editor, _) => {
|
||||
editor.selections = [
|
||||
new Selection(1, 0, 1, 0), // just before tag starts, i.e before <
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"vscode-tas-client": "^0.1.47"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "18.x",
|
||||
"@types/node-fetch": "^2.5.7"
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ export const enum ExtensionHost {
|
||||
Local
|
||||
}
|
||||
|
||||
interface IFlowQuery {
|
||||
export interface IFlowQuery {
|
||||
target: GitHubTarget;
|
||||
extensionHost: ExtensionHost;
|
||||
isSupportedClient: boolean;
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { ExtensionHost, GitHubTarget, IFlowQuery, getFlows } from '../flows';
|
||||
import { Config } from '../config';
|
||||
|
||||
const enum Flows {
|
||||
UrlHandlerFlow = 'url handler',
|
||||
LocalServerFlow = 'local server',
|
||||
DeviceCodeFlow = 'device code',
|
||||
PatFlow = 'personal access token'
|
||||
}
|
||||
|
||||
suite('getFlows', () => {
|
||||
let lastClientSecret: string | undefined = undefined;
|
||||
suiteSetup(() => {
|
||||
lastClientSecret = Config.gitHubClientSecret;
|
||||
Config.gitHubClientSecret = 'asdf';
|
||||
});
|
||||
|
||||
suiteTeardown(() => {
|
||||
Config.gitHubClientSecret = lastClientSecret;
|
||||
});
|
||||
|
||||
const testCases: Array<{ label: string; query: IFlowQuery; expectedFlows: Flows[] }> = [
|
||||
{
|
||||
label: 'VS Code Desktop. Local filesystem. GitHub.com',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.DotCom
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow,
|
||||
Flows.LocalServerFlow,
|
||||
Flows.DeviceCodeFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'VS Code Desktop. Local filesystem. GitHub Hosted Enterprise',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.HostedEnterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow,
|
||||
Flows.LocalServerFlow,
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'VS Code Desktop. Local filesystem. GitHub Enterprise Server',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.Enterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverful. GitHub.com',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Remote,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.DotCom
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow,
|
||||
Flows.DeviceCodeFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverful. GitHub Hosted Enterprise',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Remote,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.HostedEnterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow,
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverful. GitHub Enterprise',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Remote,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.Enterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverless. GitHub.com',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.WebWorker,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.DotCom
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverless. GitHub Hosted Enterprise',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.WebWorker,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.HostedEnterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.UrlHandlerFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'vscode.dev. serverless. GitHub Enterprise Server',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.WebWorker,
|
||||
isSupportedClient: true,
|
||||
target: GitHubTarget.Enterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Code - OSS. Local filesystem. GitHub.com',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: false,
|
||||
target: GitHubTarget.DotCom
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.LocalServerFlow,
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Code - OSS. Local filesystem. GitHub Hosted Enterprise',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: false,
|
||||
target: GitHubTarget.HostedEnterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.LocalServerFlow,
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Code - OSS. Local filesystem. GitHub Enterprise Server',
|
||||
query: {
|
||||
extensionHost: ExtensionHost.Local,
|
||||
isSupportedClient: false,
|
||||
target: GitHubTarget.Enterprise
|
||||
},
|
||||
expectedFlows: [
|
||||
Flows.DeviceCodeFlow,
|
||||
Flows.PatFlow
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
for (const testCase of testCases) {
|
||||
test(`gives the correct flows - ${testCase.label}`, () => {
|
||||
const flows = getFlows(testCase.query);
|
||||
|
||||
assert.strictEqual(
|
||||
flows.length,
|
||||
testCase.expectedFlows.length,
|
||||
`Unexpected number of flows: ${flows.map(f => f.label).join(',')}`
|
||||
);
|
||||
|
||||
for (let i = 0; i < flows.length; i++) {
|
||||
const flow = flows[i];
|
||||
|
||||
assert.strictEqual(flow.label, testCase.expectedFlows[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { LoopbackAuthServer } from '../../node/authServer';
|
||||
|
||||
suite('LoopbackAuthServer', () => {
|
||||
let server: LoopbackAuthServer;
|
||||
let port: number;
|
||||
|
||||
setup(async () => {
|
||||
server = new LoopbackAuthServer(__dirname, 'http://localhost:8080');
|
||||
port = await server.start();
|
||||
});
|
||||
|
||||
teardown(async () => {
|
||||
await server.stop();
|
||||
});
|
||||
|
||||
test('should redirect to starting redirect on /signin', async () => {
|
||||
const response = await fetch(`http://localhost:${port}/signin?nonce=${server.nonce}`, {
|
||||
redirect: 'manual'
|
||||
});
|
||||
// Redirect
|
||||
assert.strictEqual(response.status, 302);
|
||||
|
||||
// Check location
|
||||
const location = response.headers.get('location');
|
||||
assert.ok(location);
|
||||
const locationUrl = new URL(location);
|
||||
assert.strictEqual(locationUrl.origin, 'http://localhost:8080');
|
||||
|
||||
// Check state
|
||||
const state = locationUrl.searchParams.get('state');
|
||||
assert.ok(state);
|
||||
const stateLocation = new URL(state);
|
||||
assert.strictEqual(stateLocation.origin, `http://127.0.0.1:${port}`);
|
||||
assert.strictEqual(stateLocation.pathname, '/callback');
|
||||
assert.strictEqual(stateLocation.searchParams.get('nonce'), server.nonce);
|
||||
});
|
||||
|
||||
test('should return 400 on /callback with missing parameters', async () => {
|
||||
const response = await fetch(`http://localhost:${port}/callback`);
|
||||
assert.strictEqual(response.status, 400);
|
||||
});
|
||||
|
||||
test('should resolve with code and state on /callback with valid parameters', async () => {
|
||||
server.state = 'valid-state';
|
||||
const response = await fetch(
|
||||
`http://localhost:${port}/callback?code=valid-code&state=${server.state}&nonce=${server.nonce}`,
|
||||
{ redirect: 'manual' }
|
||||
);
|
||||
assert.strictEqual(response.status, 302);
|
||||
assert.strictEqual(response.headers.get('location'), '/');
|
||||
await Promise.race([
|
||||
server.waitForOAuthResponse().then(result => {
|
||||
assert.strictEqual(result.code, 'valid-code');
|
||||
assert.strictEqual(result.state, server.state);
|
||||
}),
|
||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 5000))
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -259,6 +259,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
||||
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
|
||||
|
||||
"@types/mocha@^9.1.1":
|
||||
version "9.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4"
|
||||
integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==
|
||||
|
||||
"@types/node-fetch@^2.5.7":
|
||||
version "2.5.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c"
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { ActivationFunction, OutputItem, RendererContext } from 'vscode-not
|
||||
import { createOutputContent, appendOutput, scrollableClass } from './textHelper';
|
||||
import { HtmlRenderingHook, IDisposable, IRichRenderContext, JavaScriptRenderingHook, OutputWithAppend, RenderOptions } from './rendererTypes';
|
||||
import { ttPolicy } from './htmlHelper';
|
||||
import { formatStackTrace } from './stackTraceHelper';
|
||||
|
||||
function clearContainer(container: HTMLElement) {
|
||||
while (container.firstChild) {
|
||||
@@ -172,8 +173,10 @@ function renderError(
|
||||
if (err.stack) {
|
||||
outputElement.classList.add('traceback');
|
||||
|
||||
const stackTrace = formatStackTrace(err.stack);
|
||||
|
||||
const outputScrolling = scrollingEnabled(outputInfo, ctx.settings);
|
||||
const content = createOutputContent(outputInfo.id, err.stack ?? '', { linesLimit: ctx.settings.lineLimit, scrollable: outputScrolling, trustHtml });
|
||||
const content = createOutputContent(outputInfo.id, stackTrace ?? '', { linesLimit: ctx.settings.lineLimit, scrollable: outputScrolling, trustHtml });
|
||||
const contentParent = document.createElement('div');
|
||||
contentParent.classList.toggle('word-wrap', ctx.settings.outputWordWrap);
|
||||
disposableStore.push(ctx.onDidChangeSettings(e => {
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export function formatStackTrace(stack: string) {
|
||||
let cleaned: string;
|
||||
// Ansi colors are described here:
|
||||
// https://en.wikipedia.org/wiki/ANSI_escape_code under the SGR section
|
||||
|
||||
// Remove background colors. The ones from IPython don't work well with
|
||||
// themes 40-49 sets background color
|
||||
cleaned = stack.replace(/\u001b\[4\dm/g, '');
|
||||
|
||||
// Also remove specific foreground colors (38 is the ascii code for picking one) (they don't translate either)
|
||||
// Turn them into default foreground
|
||||
cleaned = cleaned.replace(/\u001b\[38;.*?\d+m/g, '\u001b[39m');
|
||||
|
||||
// Turn all foreground colors after the --> to default foreground
|
||||
cleaned = cleaned.replace(/(;32m[ ->]*?)(\d+)(.*)\n/g, (_s, prefix, num, suffix) => {
|
||||
suffix = suffix.replace(/\u001b\[3\d+m/g, '\u001b[39m');
|
||||
return `${prefix}${num}${suffix}\n`;
|
||||
});
|
||||
|
||||
if (isIpythonStackTrace(cleaned)) {
|
||||
return linkifyStack(cleaned);
|
||||
}
|
||||
|
||||
return cleaned;
|
||||
}
|
||||
|
||||
const formatSequence = /\u001b\[.+?m/g;
|
||||
const fileRegex = /File\s+(?:\u001b\[.+?m)?(.+):(\d+)/;
|
||||
const lineNumberRegex = /((?:\u001b\[.+?m)?[ ->]*?)(\d+)(.*)/;
|
||||
const cellRegex = /(?<prefix>Cell\s+(?:\u001b\[.+?m)?In\s*\[(?<executionCount>\d+)\],\s*)(?<lineLabel>line (?<lineNumber>\d+)).*/;
|
||||
// older versions of IPython ~8.3.0
|
||||
const inputRegex = /(?<prefix>Input\s+?(?:\u001b\[.+?m)(?<cellLabel>In\s*\[(?<executionCount>\d+)\]))(?<postfix>.*)/;
|
||||
|
||||
function isIpythonStackTrace(stack: string) {
|
||||
return cellRegex.test(stack) || inputRegex.test(stack) || fileRegex.test(stack);
|
||||
}
|
||||
|
||||
function stripFormatting(text: string) {
|
||||
return text.replace(formatSequence, '');
|
||||
}
|
||||
|
||||
type cellLocation = { kind: 'cell'; path: string };
|
||||
type fileLocation = { kind: 'file'; path: string };
|
||||
|
||||
type location = cellLocation | fileLocation;
|
||||
|
||||
function linkifyStack(stack: string) {
|
||||
const lines = stack.split('\n');
|
||||
|
||||
let fileOrCell: location | undefined;
|
||||
|
||||
for (const i in lines) {
|
||||
|
||||
const original = lines[i];
|
||||
if (fileRegex.test(original)) {
|
||||
const fileMatch = lines[i].match(fileRegex);
|
||||
fileOrCell = { kind: 'file', path: stripFormatting(fileMatch![1]) };
|
||||
|
||||
continue;
|
||||
} else if (cellRegex.test(original)) {
|
||||
fileOrCell = {
|
||||
kind: 'cell',
|
||||
path: stripFormatting(original.replace(cellRegex, 'vscode-notebook-cell:?execution_count=$<executionCount>'))
|
||||
};
|
||||
lines[i] = original.replace(cellRegex, `$<prefix><a href=\'${fileOrCell.path}&line=$<lineNumber>\'>line $<lineNumber></a>`);
|
||||
|
||||
continue;
|
||||
} else if (inputRegex.test(original)) {
|
||||
fileOrCell = {
|
||||
kind: 'cell',
|
||||
path: stripFormatting(original.replace(inputRegex, 'vscode-notebook-cell:?execution_count=$<executionCount>'))
|
||||
};
|
||||
lines[i] = original.replace(inputRegex, `Input <a href=\'${fileOrCell.path}>\'>$<cellLabel></a>$<postfix>`);
|
||||
|
||||
continue;
|
||||
} else if (!fileOrCell || original.trim() === '') {
|
||||
// we don't have a location, so don't linkify anything
|
||||
fileOrCell = undefined;
|
||||
|
||||
continue;
|
||||
} else if (lineNumberRegex.test(original)) {
|
||||
lines[i] = original.replace(lineNumberRegex, (_s, prefix, num, suffix) => {
|
||||
return fileOrCell?.kind === 'file' ?
|
||||
`${prefix}<a href='${fileOrCell?.path}:${num}'>${num}</a>${suffix}` :
|
||||
`${prefix}<a href='${fileOrCell?.path}&line=${num}'>${num}</a>${suffix}`;
|
||||
});
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
@@ -451,5 +451,32 @@ suite('Notebook builtin output renderer', () => {
|
||||
|
||||
assert.equal(settingsChangedHandlers.length, handlerCount);
|
||||
});
|
||||
|
||||
const rawIPythonError = {
|
||||
name: "NameError",
|
||||
message: "name 'x' is not defined",
|
||||
stack: "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m" +
|
||||
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)" +
|
||||
"Cell \u001b[1;32mIn[2], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mmyfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n" +
|
||||
"Cell \u001b[1;32mIn[1], line 2\u001b[0m, in \u001b[0;36mmyfunc\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmyfunc\u001b[39m():\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mx\u001b[49m)\n" +
|
||||
"\u001b[1;31mNameError\u001b[0m: name 'x' is not defined"
|
||||
};
|
||||
|
||||
test(`Should clean up raw IPython error stack traces`, async () => {
|
||||
LinkDetector.injectedHtmlCreator = (value: string) => value;
|
||||
const context = createContext({ outputWordWrap: true, outputScrolling: true });
|
||||
const renderer = await activate(context);
|
||||
assert.ok(renderer, 'Renderer not created');
|
||||
|
||||
const outputElement = new OutputHtml().getFirstOuputElement();
|
||||
const outputItem = createOutputItem(JSON.stringify(rawIPythonError), errorMimeType);
|
||||
await renderer!.renderOutputItem(outputItem, outputElement);
|
||||
|
||||
const inserted = outputElement.firstChild as HTMLElement;
|
||||
assert.ok(inserted, `nothing appended to output element: ${outputElement.innerHTML}`);
|
||||
//assert.ok(false, `TextContent:\n ${outputElement.textContent}`);
|
||||
assert.ok(outputElement.innerHTML.indexOf('class="code-background-colored"') === -1, `inner HTML:\n ${outputElement.innerHTML}`);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { formatStackTrace } from '../stackTraceHelper';
|
||||
import * as assert from 'assert';
|
||||
|
||||
// The stack frames for these tests can be retreived by using the raw json for a notebook with an error
|
||||
suite('StackTraceHelper', () => {
|
||||
|
||||
test('Non Ipython stack trace is left alone', () => {
|
||||
const stack = 'DivideError: integer division error\n' +
|
||||
'Stacktrace:\n' +
|
||||
'[1] divide_by_zero(x:: Int64)\n' +
|
||||
'@Main c:\\src\\test\\3\\otherlanguages\\julia.ipynb: 3\n' +
|
||||
'[2] top - level scope\n' +
|
||||
'@c:\\src\\test\\3\\otherlanguages\\julia.ipynb: 1; ';
|
||||
assert.equal(formatStackTrace(stack), stack);
|
||||
});
|
||||
|
||||
const formatSequence = /\u001b\[.+?m/g;
|
||||
function stripAsciiFormatting(text: string) {
|
||||
return text.replace(formatSequence, '');
|
||||
}
|
||||
|
||||
test('IPython stack line numbers are linkified', () => {
|
||||
const stack =
|
||||
'\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n' +
|
||||
'\u001b[1;31mException\u001b[0m Traceback (most recent call last)\n' +
|
||||
'Cell \u001b[1;32mIn[3], line 2\u001b[0m\n' +
|
||||
'\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmyLib\u001b[39;00m\n' +
|
||||
'\u001b[1;32m----> 2\u001b[0m \u001b[43mmyLib\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mthrowEx\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n' +
|
||||
'\n' +
|
||||
'File \u001b[1;32mC:\\venvs\\myLib.py:2\u001b[0m, in \u001b[0;36mthrowEx\u001b[1;34m()\u001b[0m\n' +
|
||||
'\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mthrowEx\u001b[39m():\n' +
|
||||
'\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m\n\n' +
|
||||
'\u001b[1;31mException\u001b[0m\n:';
|
||||
|
||||
const formatted = stripAsciiFormatting(formatStackTrace(stack));
|
||||
assert.ok(formatted.indexOf('Cell In[3], <a href=\'vscode-notebook-cell:?execution_count=3&line=2\'>line 2</a>') > 0, 'Missing line link in ' + formatted);
|
||||
assert.ok(formatted.indexOf('<a href=\'vscode-notebook-cell:?execution_count=3&line=2\'>2</a>') > 0, 'Missing frame link in ' + formatted);
|
||||
assert.ok(formatted.indexOf('<a href=\'C:\\venvs\\myLib.py:2\'>2</a>') > 0, 'Missing frame link in ' + formatted);
|
||||
});
|
||||
|
||||
|
||||
|
||||
test('IPython stack line numbers are linkified for IPython 8.3', () => {
|
||||
// stack frames within functions do not list the line number, i.e.
|
||||
// 'Input In [1], in myfunc()' vs
|
||||
// 'Input In [2], in <cell line: 5>()'
|
||||
const stack =
|
||||
'\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n' +
|
||||
'\u001b[1;31mException\u001b[0m Traceback (most recent call last)\n' +
|
||||
'Input \u001b[1;32mIn [2]\u001b[0m, in \u001b[0;36m<cell line: 5>\u001b[1;34m()\u001b[0m\n' +
|
||||
'\u001b[0;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\'\u001b[39m\u001b[38;5;124mipykernel\u001b[39m\u001b[38;5;124m\'\u001b[39m, ipykernel\u001b[38;5;241m.\u001b[39m__version__)\n' +
|
||||
'\u001b[0;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\'\u001b[39m\u001b[38;5;124mipython\u001b[39m\u001b[38;5;124m\'\u001b[39m, IPython\u001b[38;5;241m.\u001b[39m__version__)\n' +
|
||||
'\u001b[1;32m----> 5\u001b[0m \u001b[43mmyfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n' +
|
||||
'\n\n' +
|
||||
'Input \u001b[1;32mIn [1]\u001b[0m, in \u001b[0;36mmyfunc\u001b[1;34m()\u001b[0m\n' +
|
||||
'\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmyfunc\u001b[39m():\n' +
|
||||
'\u001b[1;32m----> 4\u001b[0m \u001b[43mmyLib\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mthrowEx\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n' +
|
||||
'\n\n' +
|
||||
'File \u001b[1;32mC:\\venvs\\myLib.py:2\u001b[0m, in \u001b[0;36mthrowEx\u001b[1;34m()\u001b[0m\n' +
|
||||
'\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mthrowEx\u001b[39m():\n' +
|
||||
'\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m\n' +
|
||||
'\n' +
|
||||
'\u001b[1;31mException\u001b[0m:\n';
|
||||
|
||||
const formatted = stripAsciiFormatting(formatStackTrace(stack));
|
||||
assert.ok(formatted.indexOf('Input <a href=\'vscode-notebook-cell:?execution_count=2>\'>In [2]</a>, in <cell line: 5>') > 0, 'Missing cell link in ' + formatted);
|
||||
assert.ok(formatted.indexOf('Input <a href=\'vscode-notebook-cell:?execution_count=1>\'>In [1]</a>, in myfunc()') > 0, 'Missing cell link in ' + formatted);
|
||||
assert.ok(formatted.indexOf('<a href=\'vscode-notebook-cell:?execution_count=2&line=5\'>5</a>') > 0, 'Missing frame link in ' + formatted);
|
||||
});
|
||||
|
||||
test('IPython stack trace lines without associated location are not linkified', () => {
|
||||
const stack =
|
||||
'\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n' +
|
||||
'\u001b[1;31mException\u001b[0m Traceback (most recent call last)\n' +
|
||||
'Cell \u001b[1;32mIn[3], line 2\u001b[0m\n' +
|
||||
'\n' +
|
||||
'unknown source\n' +
|
||||
'\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mthrowEx\u001b[39m():\n' +
|
||||
'\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m\n\n' +
|
||||
'\u001b[1;31mException\u001b[0m\n:';
|
||||
|
||||
const formatted = formatStackTrace(stack);
|
||||
assert.ok(!/<a href=.*>\d<\/a>/.test(formatted), formatted);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -49,7 +49,7 @@
|
||||
"input.background": "#313131",
|
||||
"input.border": "#3C3C3C",
|
||||
"input.foreground": "#CCCCCC",
|
||||
"input.placeholderForeground": "#9D9D9D",
|
||||
"input.placeholderForeground": "#818181",
|
||||
"inputOption.activeBackground": "#2489DB82",
|
||||
"inputOption.activeBorder": "#2488DB",
|
||||
"keybindingLabel.foreground": "#CCCCCC",
|
||||
@@ -111,8 +111,10 @@
|
||||
"textBlockQuote.background": "#2B2B2B",
|
||||
"textBlockQuote.border": "#616161",
|
||||
"textCodeBlock.background": "#2B2B2B",
|
||||
"textLink.activeForeground": "#40A6FF",
|
||||
"textLink.foreground": "#40A6FF",
|
||||
"textLink.activeForeground": "#4daafc",
|
||||
"textLink.foreground": "#4daafc",
|
||||
"textPreformat.foreground": "#D0D0D0",
|
||||
"textPreformat.background": "#3C3C3C",
|
||||
"textSeparator.foreground": "#21262D",
|
||||
"titleBar.activeBackground": "#181818",
|
||||
"titleBar.activeForeground": "#CCCCCC",
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
"textCodeBlock.background": "#F8F8F8",
|
||||
"textLink.activeForeground": "#005FB8",
|
||||
"textLink.foreground": "#005FB8",
|
||||
"textPreformat.foreground": "#3B3B3B",
|
||||
"textPreformat.background": "#0000001F",
|
||||
"textSeparator.foreground": "#21262D",
|
||||
"titleBar.activeBackground": "#F8F8F8",
|
||||
"titleBar.activeForeground": "#1E1E1E",
|
||||
|
||||
@@ -859,6 +859,19 @@
|
||||
"zh-CN",
|
||||
"zh-TW"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"%typescript.locale.auto%",
|
||||
"Deutsch",
|
||||
"español",
|
||||
"English",
|
||||
"français",
|
||||
"italiano",
|
||||
"日本語",
|
||||
"한국어",
|
||||
"русский",
|
||||
"中文(简体)",
|
||||
"中文(繁體)"
|
||||
],
|
||||
"markdownDescription": "%typescript.locale%",
|
||||
"scope": "window"
|
||||
},
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
"configuration.tsserver.maxTsServerMemory": "The maximum amount of memory (in MB) to allocate to the TypeScript server process. To use a memory limit greater than 4 GB, use `#typescript.tsserver.nodePath#` to run TS Server with a custom Node installation.",
|
||||
"configuration.tsserver.experimental.enableProjectDiagnostics": "(Experimental) Enables project wide error reporting.",
|
||||
"typescript.locale": "Sets the locale used to report JavaScript and TypeScript errors. Defaults to use VS Code's locale.",
|
||||
"typescript.locale.auto": "Use VS Code's configured display language",
|
||||
"configuration.implicitProjectConfig.module": "Sets the module system for the program. See more: https://www.typescriptlang.org/tsconfig#module.",
|
||||
"configuration.implicitProjectConfig.target": "Set target JavaScript language version for emitted JavaScript and include library declarations. See more: https://www.typescriptlang.org/tsconfig#target.",
|
||||
"configuration.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing `jsconfig.json` or `tsconfig.json` files override this setting.",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as jsonc from 'jsonc-parser';
|
||||
import { posix } from 'path';
|
||||
import { isAbsolute, posix } from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
import { Utils } from 'vscode-uri';
|
||||
import { coalesce } from '../utils/arrays';
|
||||
@@ -95,6 +95,10 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
|
||||
}
|
||||
|
||||
private getFileTarget(document: vscode.TextDocument, node: jsonc.Node): vscode.Uri {
|
||||
if (isAbsolute(node.value)) {
|
||||
return vscode.Uri.file(node.value);
|
||||
}
|
||||
|
||||
return vscode.Uri.joinPath(Utils.dirname(document.uri), node.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
"license": "MIT",
|
||||
"enabledApiProposals": [
|
||||
"authSession",
|
||||
"chatAgents2",
|
||||
"chatVariables",
|
||||
"contribViewsRemote",
|
||||
"contribStatusBarItems",
|
||||
"createFileSystemWatcher",
|
||||
@@ -20,6 +22,7 @@
|
||||
"fileSearchProvider",
|
||||
"findTextInFiles",
|
||||
"fsChunks",
|
||||
"interactive",
|
||||
"mappedEditsProvider",
|
||||
"notebookCellExecutionState",
|
||||
"notebookDeprecated",
|
||||
@@ -42,7 +45,6 @@
|
||||
"tunnels",
|
||||
"testCoverage",
|
||||
"testObserver",
|
||||
"testMessageContextValue",
|
||||
"textSearchProvider",
|
||||
"timeline",
|
||||
"tokenInformation",
|
||||
@@ -165,6 +167,12 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"interactiveSession": [
|
||||
{
|
||||
"id": "provider",
|
||||
"label": "Provider"
|
||||
}
|
||||
],
|
||||
"notebooks": [
|
||||
{
|
||||
"type": "notebookCoreTest",
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import 'mocha';
|
||||
import { CancellationToken, chat, ChatAgentRequest, ChatVariableLevel, CompletionItemKind, Disposable, interactive, InteractiveProgress, InteractiveRequest, InteractiveResponseForProgress, InteractiveSession, InteractiveSessionState, Progress, ProviderResult } from 'vscode';
|
||||
import { assertNoRpc, closeAllEditors, DeferredPromise, disposeAll } from '../utils';
|
||||
|
||||
suite('chat', () => {
|
||||
let disposables: Disposable[] = [];
|
||||
setup(() => {
|
||||
disposables = [];
|
||||
});
|
||||
|
||||
teardown(async function () {
|
||||
assertNoRpc();
|
||||
await closeAllEditors();
|
||||
disposeAll(disposables);
|
||||
});
|
||||
|
||||
function getDeferredForRequest(): DeferredPromise<ChatAgentRequest> {
|
||||
disposables.push(interactive.registerInteractiveSessionProvider('provider', {
|
||||
prepareSession: (_initialState: InteractiveSessionState | undefined, _token: CancellationToken): ProviderResult<InteractiveSession> => {
|
||||
return {
|
||||
requester: { name: 'test' },
|
||||
responder: { name: 'test' },
|
||||
};
|
||||
},
|
||||
|
||||
provideResponseWithProgress: (_request: InteractiveRequest, _progress: Progress<InteractiveProgress>, _token: CancellationToken): ProviderResult<InteractiveResponseForProgress> => {
|
||||
return null;
|
||||
},
|
||||
|
||||
provideSlashCommands: (_session, _token) => {
|
||||
return [{ command: 'hello', title: 'Hello', kind: CompletionItemKind.Text }];
|
||||
},
|
||||
|
||||
removeRequest: (_session: InteractiveSession, _requestId: string): void => {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
}));
|
||||
|
||||
const deferred = new DeferredPromise<ChatAgentRequest>();
|
||||
const agent = chat.createChatAgent('agent', (request, _context, _progress, _token) => {
|
||||
deferred.complete(request);
|
||||
return null;
|
||||
});
|
||||
agent.slashCommandProvider = {
|
||||
provideSlashCommands: (_token) => {
|
||||
return [{ name: 'hello', description: 'Hello' }];
|
||||
}
|
||||
};
|
||||
disposables.push(agent);
|
||||
return deferred;
|
||||
}
|
||||
|
||||
test('agent and slash command', async () => {
|
||||
const deferred = getDeferredForRequest();
|
||||
interactive.sendInteractiveRequestToProvider('provider', { message: '@agent /hello friend' });
|
||||
const lastResult = await deferred.p;
|
||||
assert.deepStrictEqual(lastResult.slashCommand, { name: 'hello', description: 'Hello' });
|
||||
assert.strictEqual(lastResult.prompt, 'friend');
|
||||
});
|
||||
|
||||
test('agent and variable', async () => {
|
||||
disposables.push(chat.registerVariable('myVar', 'My variable', {
|
||||
resolve(_name, _context, _token) {
|
||||
return [{ level: ChatVariableLevel.Full, value: 'myValue' }];
|
||||
}
|
||||
}));
|
||||
|
||||
const deferred = getDeferredForRequest();
|
||||
interactive.sendInteractiveRequestToProvider('provider', { message: '@agent hi #myVar' });
|
||||
const lastResult = await deferred.p;
|
||||
assert.strictEqual(lastResult.prompt, 'hi [#myVar](values:myVar)');
|
||||
assert.strictEqual(lastResult.variables['myVar'][0].value, 'myValue');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,62 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import 'mocha';
|
||||
import { CancellationToken, CompletionItemKind, Disposable, interactive, InteractiveProgress, InteractiveRequest, InteractiveResponseForProgress, InteractiveSession, InteractiveSessionState, Progress, ProviderResult } from 'vscode';
|
||||
import { assertNoRpc, closeAllEditors, DeferredPromise, disposeAll } from '../utils';
|
||||
|
||||
suite('InteractiveSessionProvider', () => {
|
||||
let disposables: Disposable[] = [];
|
||||
setup(async () => {
|
||||
disposables = [];
|
||||
});
|
||||
|
||||
teardown(async function () {
|
||||
assertNoRpc();
|
||||
await closeAllEditors();
|
||||
disposeAll(disposables);
|
||||
});
|
||||
|
||||
function getDeferredForRequest(): DeferredPromise<InteractiveRequest> {
|
||||
const deferred = new DeferredPromise<InteractiveRequest>();
|
||||
disposables.push(interactive.registerInteractiveSessionProvider('provider', {
|
||||
prepareSession: (_initialState: InteractiveSessionState | undefined, _token: CancellationToken): ProviderResult<InteractiveSession> => {
|
||||
return {
|
||||
requester: { name: 'test' },
|
||||
responder: { name: 'test' },
|
||||
};
|
||||
},
|
||||
|
||||
provideResponseWithProgress: (request: InteractiveRequest, _progress: Progress<InteractiveProgress>, _token: CancellationToken): ProviderResult<InteractiveResponseForProgress> => {
|
||||
deferred.complete(request);
|
||||
return null;
|
||||
},
|
||||
|
||||
provideSlashCommands: (_session, _token) => {
|
||||
return [{ command: 'hello', title: 'Hello', kind: CompletionItemKind.Text }];
|
||||
},
|
||||
|
||||
removeRequest: (_session: InteractiveSession, _requestId: string): void => {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
}));
|
||||
return deferred;
|
||||
}
|
||||
|
||||
test('plain text query', async () => {
|
||||
const deferred = getDeferredForRequest();
|
||||
interactive.sendInteractiveRequestToProvider('provider', { message: 'hello' });
|
||||
const lastResult = await deferred.p;
|
||||
assert.strictEqual(lastResult.message, 'hello');
|
||||
});
|
||||
|
||||
test('slash command', async () => {
|
||||
const deferred = getDeferredForRequest();
|
||||
interactive.sendInteractiveRequestToProvider('provider', { message: '/hello' });
|
||||
const lastResult = await deferred.p;
|
||||
assert.strictEqual(lastResult.message, '/hello');
|
||||
});
|
||||
});
|
||||
+21
-18
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.84.0",
|
||||
"distro": "23fd0c979db23b5d166dea2195bfb3aa5fe1f390",
|
||||
"distro": "b30d9687a6941b0d17b73334fc5a0f12590bff90",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
@@ -13,6 +13,7 @@
|
||||
"test-browser": "npx playwright install && node test/unit/browser/index.js",
|
||||
"test-browser-no-install": "node test/unit/browser/index.js",
|
||||
"test-node": "mocha test/unit/node/index.js --delay --ui=tdd --timeout=5000 --exit",
|
||||
"test-extension": "vscode-test",
|
||||
"preinstall": "node build/npm/preinstall.js",
|
||||
"postinstall": "node build/npm/postinstall.js",
|
||||
"compile": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile",
|
||||
@@ -70,8 +71,8 @@
|
||||
"@parcel/watcher": "2.1.0",
|
||||
"@vscode/iconv-lite-umd": "0.7.0",
|
||||
"@vscode/policy-watcher": "^1.1.4",
|
||||
"@vscode/proxy-agent": "^0.17.4",
|
||||
"@vscode/ripgrep": "^1.15.5",
|
||||
"@vscode/proxy-agent": "^0.17.5",
|
||||
"@vscode/ripgrep": "^1.15.6",
|
||||
"@vscode/spdlog": "^0.13.11",
|
||||
"@vscode/sqlite3": "5.1.6-vscode",
|
||||
"@vscode/sudo-prompt": "9.3.1",
|
||||
@@ -80,8 +81,8 @@
|
||||
"@vscode/windows-process-tree": "^0.5.0",
|
||||
"@vscode/windows-registry": "^1.1.0",
|
||||
"graceful-fs": "4.2.11",
|
||||
"http-proxy-agent": "^2.1.0",
|
||||
"https-proxy-agent": "^2.2.3",
|
||||
"http-proxy-agent": "^7.0.0",
|
||||
"https-proxy-agent": "^7.0.2",
|
||||
"jschardet": "3.0.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"minimist": "^1.2.6",
|
||||
@@ -95,14 +96,14 @@
|
||||
"vscode-oniguruma": "1.7.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-textmate": "9.0.0",
|
||||
"xterm": "5.4.0-beta.27",
|
||||
"xterm-addon-canvas": "0.6.0-beta.27",
|
||||
"xterm": "5.4.0-beta.32",
|
||||
"xterm-addon-canvas": "0.6.0-beta.32",
|
||||
"xterm-addon-image": "0.6.0-beta.21",
|
||||
"xterm-addon-search": "0.14.0-beta.27",
|
||||
"xterm-addon-serialize": "0.12.0-beta.26",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.26",
|
||||
"xterm-addon-webgl": "0.17.0-beta.26",
|
||||
"xterm-headless": "5.4.0-beta.27",
|
||||
"xterm-addon-search": "0.14.0-beta.31",
|
||||
"xterm-addon-serialize": "0.12.0-beta.31",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.31",
|
||||
"xterm-addon-webgl": "0.17.0-beta.31",
|
||||
"xterm-headless": "5.4.0-beta.32",
|
||||
"yauzl": "^2.9.2",
|
||||
"yazl": "^2.4.3"
|
||||
},
|
||||
@@ -111,7 +112,7 @@
|
||||
"@swc/core": "1.3.62",
|
||||
"@types/cookie": "^0.3.3",
|
||||
"@types/cssnano": "^4.0.0",
|
||||
"@types/debug": "4.1.5",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/graceful-fs": "4.1.2",
|
||||
"@types/gulp-postcss": "^8.0.0",
|
||||
"@types/gulp-svgmin": "^1.2.1",
|
||||
@@ -135,8 +136,10 @@
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"@vscode/gulp-electron": "^1.36.0",
|
||||
"@vscode/l10n-dev": "0.0.21",
|
||||
"@vscode/telemetry-extractor": "^1.9.9",
|
||||
"@vscode/test-web": "^0.0.41",
|
||||
"@vscode/telemetry-extractor": "^1.9.10",
|
||||
"@vscode/test-cli": "^0.0.3",
|
||||
"@vscode/test-electron": "^2.3.5",
|
||||
"@vscode/test-web": "^0.0.42",
|
||||
"@vscode/vscode-perf": "^0.0.14",
|
||||
"ansi-colors": "^3.2.3",
|
||||
"asar": "^3.0.3",
|
||||
@@ -147,7 +150,7 @@
|
||||
"cssnano": "^4.1.11",
|
||||
"debounce": "^1.0.0",
|
||||
"deemon": "^1.8.0",
|
||||
"electron": "25.8.4",
|
||||
"electron": "25.9.1",
|
||||
"eslint": "8.36.0",
|
||||
"eslint-plugin-header": "3.1.1",
|
||||
"eslint-plugin-jsdoc": "^46.5.0",
|
||||
@@ -187,8 +190,8 @@
|
||||
"minimatch": "^3.0.4",
|
||||
"minimist": "^1.2.6",
|
||||
"mkdirp": "^1.0.4",
|
||||
"mocha": "^9.2.2",
|
||||
"mocha-junit-reporter": "^2.0.0",
|
||||
"mocha": "^10.2.0",
|
||||
"mocha-junit-reporter": "^2.2.1",
|
||||
"mocha-multi-reporters": "^1.5.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"opn": "^6.0.0",
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
"win32DirName": "Microsoft Code OSS",
|
||||
"win32NameVersion": "Microsoft Code OSS",
|
||||
"win32RegValueName": "CodeOSS",
|
||||
"win32AppId": "{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}",
|
||||
"win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}",
|
||||
"win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}",
|
||||
"win32UserAppId": "{{C6065F05-9603-4FC4-8101-B9781A25D88E}",
|
||||
"win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}",
|
||||
"win32arm64UserAppId": "{{3AEBF0C8-F733-4AD4-BADE-FDB816D53D7B}",
|
||||
"win32AppUserModelId": "Microsoft.CodeOSS",
|
||||
|
||||
+11
-11
@@ -7,16 +7,16 @@
|
||||
"@microsoft/1ds-post-js": "^3.2.13",
|
||||
"@parcel/watcher": "2.1.0",
|
||||
"@vscode/iconv-lite-umd": "0.7.0",
|
||||
"@vscode/proxy-agent": "^0.17.4",
|
||||
"@vscode/ripgrep": "^1.15.5",
|
||||
"@vscode/proxy-agent": "^0.17.5",
|
||||
"@vscode/ripgrep": "^1.15.6",
|
||||
"@vscode/spdlog": "^0.13.11",
|
||||
"@vscode/vscode-languagedetection": "1.0.21",
|
||||
"@vscode/windows-process-tree": "^0.5.0",
|
||||
"@vscode/windows-registry": "^1.1.0",
|
||||
"cookie": "^0.4.0",
|
||||
"graceful-fs": "4.2.11",
|
||||
"http-proxy-agent": "^2.1.0",
|
||||
"https-proxy-agent": "^2.2.3",
|
||||
"http-proxy-agent": "^7.0.0",
|
||||
"https-proxy-agent": "^7.0.2",
|
||||
"jschardet": "3.0.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"minimist": "^1.2.6",
|
||||
@@ -26,14 +26,14 @@
|
||||
"vscode-oniguruma": "1.7.0",
|
||||
"vscode-regexpp": "^3.1.0",
|
||||
"vscode-textmate": "9.0.0",
|
||||
"xterm": "5.4.0-beta.27",
|
||||
"xterm-addon-canvas": "0.6.0-beta.27",
|
||||
"xterm": "5.4.0-beta.32",
|
||||
"xterm-addon-canvas": "0.6.0-beta.32",
|
||||
"xterm-addon-image": "0.6.0-beta.21",
|
||||
"xterm-addon-search": "0.14.0-beta.27",
|
||||
"xterm-addon-serialize": "0.12.0-beta.26",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.26",
|
||||
"xterm-addon-webgl": "0.17.0-beta.26",
|
||||
"xterm-headless": "5.4.0-beta.27",
|
||||
"xterm-addon-search": "0.14.0-beta.31",
|
||||
"xterm-addon-serialize": "0.12.0-beta.31",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.31",
|
||||
"xterm-addon-webgl": "0.17.0-beta.31",
|
||||
"xterm-headless": "5.4.0-beta.32",
|
||||
"yauzl": "^2.9.2",
|
||||
"yazl": "^2.4.3"
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
"tas-client-umd": "0.1.8",
|
||||
"vscode-oniguruma": "1.7.0",
|
||||
"vscode-textmate": "9.0.0",
|
||||
"xterm": "5.4.0-beta.27",
|
||||
"xterm-addon-canvas": "0.6.0-beta.27",
|
||||
"xterm": "5.4.0-beta.32",
|
||||
"xterm-addon-canvas": "0.6.0-beta.32",
|
||||
"xterm-addon-image": "0.6.0-beta.21",
|
||||
"xterm-addon-search": "0.14.0-beta.27",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.26",
|
||||
"xterm-addon-webgl": "0.17.0-beta.26"
|
||||
"xterm-addon-search": "0.14.0-beta.31",
|
||||
"xterm-addon-unicode11": "0.7.0-beta.31",
|
||||
"xterm-addon-webgl": "0.17.0-beta.31"
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -68,32 +68,32 @@ vscode-textmate@9.0.0:
|
||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-9.0.0.tgz#313c6c8792b0507aef35aeb81b6b370b37c44d6c"
|
||||
integrity sha512-Cl65diFGxz7gpwbav10HqiY/eVYTO1sjQpmRmV991Bj7wAoOAjGQ97PpQcXorDE2Uc4hnGWLY17xme+5t6MlSg==
|
||||
|
||||
xterm-addon-canvas@0.6.0-beta.27:
|
||||
version "0.6.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.6.0-beta.27.tgz#2517f050d165b093a3c3e564e4420ccc3ccbad75"
|
||||
integrity sha512-mSxEJKPnXYKkD6/zQLdNH6kB+sr4B+4DMFzntWgxLjHJdyOO95wUSAtBFnhAUez2nNYvXbs/OXpEbdVdO7f2kQ==
|
||||
xterm-addon-canvas@0.6.0-beta.32:
|
||||
version "0.6.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.6.0-beta.32.tgz#c9e74dd72fcc981a2e0cbd0b82827676bc5c74b9"
|
||||
integrity sha512-Xw7oE4dbS+x+pu6cGW1bDSXcVviuorLz1OLaYw46jjmDezIqQIIEMhSMOprExFEWgeRQ9AEN4lPqw6aH87V74w==
|
||||
|
||||
xterm-addon-image@0.6.0-beta.21:
|
||||
version "0.6.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.6.0-beta.21.tgz#e3708bc504c56a23ff31f12a2eeb335331a92aac"
|
||||
integrity sha512-8/PTaXVPa4kQ0xzVeuZZk10OpbZBj2cgfwhM2B0ChSPvwrk0lX+ksnXdtDKH3tg+JYvo7fIhNXtkr4NwWt7VJQ==
|
||||
|
||||
xterm-addon-search@0.14.0-beta.27:
|
||||
version "0.14.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.14.0-beta.27.tgz#b6f81eac5047253a5c664349c47498a81b6ec168"
|
||||
integrity sha512-T4Exwf/rqoLHqGUUIta5Pw/i9PljvroZwLxc7RnVyDqpNsTifDn3675kS54CxwqPlv4owFhxujTDzJPCUEkM2A==
|
||||
xterm-addon-search@0.14.0-beta.31:
|
||||
version "0.14.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.14.0-beta.31.tgz#933ca5d2d642dacad29f2cfbd50830cff83bc274"
|
||||
integrity sha512-JRY1ukhoh32D0AMz78xpumQkLgkcP9d3GXj6gzVHZZsjLAMDaJYEubYq1bUhM7IGHUyg+x0sdRJyx7d6fJpiQg==
|
||||
|
||||
xterm-addon-unicode11@0.7.0-beta.26:
|
||||
version "0.7.0-beta.26"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.7.0-beta.26.tgz#f9606231a8f13e57dbdec5e884b044b0813931f5"
|
||||
integrity sha512-po+z1ayyrkWh8IGXKpbwCLKLKfcjotZVKqowU6PtHuDtJm/J8rlzvV2eJU1WQ/8ezpopU09ibWCvaf1a7EPuxA==
|
||||
xterm-addon-unicode11@0.7.0-beta.31:
|
||||
version "0.7.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.7.0-beta.31.tgz#abcba752172323f31312bd8a3f9b6a049dbca6e3"
|
||||
integrity sha512-vvBKJbBoLbeIf2++6D16VnOOwevZE3nyO/PDZ7cyTJK1eYR73rr8ZbjUrH92YoTu4Z8MpZFepGQOgK/vlAQMwQ==
|
||||
|
||||
xterm-addon-webgl@0.17.0-beta.26:
|
||||
version "0.17.0-beta.26"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.17.0-beta.26.tgz#aee4a043981d5d303b7112ef7049bc2865e75393"
|
||||
integrity sha512-N8CuAPZnoDlQ6yV7n4eXQ2ONPr/GdxiwgxrJjNks4CzzHiJREm23FQIv0fCTwKQS5xU3qoc4LlT3vZ1tKGjtQw==
|
||||
xterm-addon-webgl@0.17.0-beta.31:
|
||||
version "0.17.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.17.0-beta.31.tgz#3cd29b4858e3f4f6dd5a8dd969454e85e1f43baa"
|
||||
integrity sha512-vYHj+HlTcqUlFFVuoCTjlgh89/lIoSkZ7Nc87cwSFTrJsl07qoKutmpupqFXyjhbEA1fQY2SuQLx08Gmf2jWkQ==
|
||||
|
||||
xterm@5.4.0-beta.27:
|
||||
version "5.4.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.4.0-beta.27.tgz#f641ee045a65c9c8967fac534a202062706a8fa9"
|
||||
integrity sha512-gKqtrjy0RLk2123oFyPw5tkV96jGz4c/JkY8/XUvBXoMVsX4A7rVKpHlmHhmnuK1X5ERAkvCD21YE7LfB8WYkw==
|
||||
xterm@5.4.0-beta.32:
|
||||
version "5.4.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.4.0-beta.32.tgz#1b4242cf1c0c1a5a1070da58d3f11956b537130a"
|
||||
integrity sha512-mWTwEiNBFMF89oqVfi6qTM2Py5gC1Mwvslx1KxmI2Ukgh9v3CrqKDhj29eY1ZeAo0uuYknFWKyuexqp+3SHJCA==
|
||||
|
||||
+44
-120
@@ -58,26 +58,26 @@
|
||||
resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48"
|
||||
integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==
|
||||
|
||||
"@vscode/proxy-agent@^0.17.4":
|
||||
version "0.17.4"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.4.tgz#e3ffb63357353a428436f15a69de3453a5061f0c"
|
||||
integrity sha512-tX8eidofoJlZFRWzdiiW3wyu26hgIRk8HvM/RoP1wVSu3U/As36EgGIZYG6pPnqiythRqTcsddniVNA5M39g4w==
|
||||
"@vscode/proxy-agent@^0.17.5":
|
||||
version "0.17.5"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.5.tgz#a59f6087a39795425b2601c9ee95bcb0338154e6"
|
||||
integrity sha512-plKfR1i9ce09aro1/yvK3Ckiu84Cj5ViuLqJ/7VRT6E9w5xP2YUPcgrCy+u7FGorKZmJb+wQ1L6f/cdJ7axulw==
|
||||
dependencies:
|
||||
"@tootallnate/once" "^3.0.0"
|
||||
agent-base "^7.0.1"
|
||||
debug "^4.3.4"
|
||||
http-proxy-agent "^7.0.0"
|
||||
https-proxy-agent "^7.0.1"
|
||||
https-proxy-agent "^7.0.2"
|
||||
socks-proxy-agent "^8.0.1"
|
||||
optionalDependencies:
|
||||
"@vscode/windows-ca-certs" "^0.3.1"
|
||||
|
||||
"@vscode/ripgrep@^1.15.5":
|
||||
version "1.15.5"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.5.tgz#26025884bbc3a8b40dfc29f5bda4b87b47bd7356"
|
||||
integrity sha512-PVvKNEmtnlek3i4MJMaB910dz46CKQqcIY2gKR3PSlfz/ZPlSYuSuyQMS7iK20KL4hGUdSbWt964B5S5EIojqw==
|
||||
"@vscode/ripgrep@^1.15.6":
|
||||
version "1.15.6"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.6.tgz#17bdffc1fd0c4a034dc3e1e8203b8d07add96c0d"
|
||||
integrity sha512-mCtfHqZ/g+75qDDeIPB9ST1xyJDaJornaSujuRKkB0SMZ6FMVtuKUdvvvOITR+DcKo5KOwUVuOUUpt75jOY+Yw==
|
||||
dependencies:
|
||||
https-proxy-agent "^5.0.0"
|
||||
https-proxy-agent "^7.0.2"
|
||||
proxy-from-env "^1.1.0"
|
||||
|
||||
"@vscode/spdlog@^0.13.11":
|
||||
@@ -113,27 +113,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.1.0.tgz#03dace7c29c46f658588b9885b9580e453ad21f9"
|
||||
integrity sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw==
|
||||
|
||||
agent-base@4:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce"
|
||||
integrity sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==
|
||||
dependencies:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
agent-base@6:
|
||||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
|
||||
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
|
||||
dependencies:
|
||||
debug "4"
|
||||
|
||||
agent-base@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
|
||||
integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==
|
||||
dependencies:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434"
|
||||
@@ -192,21 +171,7 @@ cookie@^0.4.0:
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
|
||||
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
|
||||
|
||||
debug@3.1.0, debug@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@4:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@^4.3.4:
|
||||
debug@4, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
@@ -237,18 +202,6 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
||||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
es6-promise@^4.0.3:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
|
||||
integrity sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==
|
||||
|
||||
es6-promisify@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
|
||||
integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
|
||||
dependencies:
|
||||
es6-promise "^4.0.3"
|
||||
|
||||
expand-template@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
|
||||
@@ -288,14 +241,6 @@ graceful-fs@4.2.11:
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||
|
||||
http-proxy-agent@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405"
|
||||
integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==
|
||||
dependencies:
|
||||
agent-base "4"
|
||||
debug "3.1.0"
|
||||
|
||||
http-proxy-agent@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673"
|
||||
@@ -304,26 +249,10 @@ http-proxy-agent@^7.0.0:
|
||||
agent-base "^7.1.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
https-proxy-agent@^2.2.3:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
|
||||
integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==
|
||||
dependencies:
|
||||
agent-base "^4.3.0"
|
||||
debug "^3.1.0"
|
||||
|
||||
https-proxy-agent@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
|
||||
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
|
||||
dependencies:
|
||||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
https-proxy-agent@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz#0277e28f13a07d45c663633841e20a40aaafe0ab"
|
||||
integrity sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==
|
||||
https-proxy-agent@^7.0.2:
|
||||
version "7.0.2"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz#e2645b846b90e96c6e6f347fb5b2e41f1590b09b"
|
||||
integrity sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==
|
||||
dependencies:
|
||||
agent-base "^7.0.2"
|
||||
debug "4"
|
||||
@@ -416,12 +345,7 @@ mkdirp@^0.5.5:
|
||||
dependencies:
|
||||
minimist "^1.2.6"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
|
||||
ms@2.1.2, ms@^2.1.1:
|
||||
ms@2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
@@ -667,45 +591,45 @@ wrappy@1:
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
xterm-addon-canvas@0.6.0-beta.27:
|
||||
version "0.6.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.6.0-beta.27.tgz#2517f050d165b093a3c3e564e4420ccc3ccbad75"
|
||||
integrity sha512-mSxEJKPnXYKkD6/zQLdNH6kB+sr4B+4DMFzntWgxLjHJdyOO95wUSAtBFnhAUez2nNYvXbs/OXpEbdVdO7f2kQ==
|
||||
xterm-addon-canvas@0.6.0-beta.32:
|
||||
version "0.6.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.6.0-beta.32.tgz#c9e74dd72fcc981a2e0cbd0b82827676bc5c74b9"
|
||||
integrity sha512-Xw7oE4dbS+x+pu6cGW1bDSXcVviuorLz1OLaYw46jjmDezIqQIIEMhSMOprExFEWgeRQ9AEN4lPqw6aH87V74w==
|
||||
|
||||
xterm-addon-image@0.6.0-beta.21:
|
||||
version "0.6.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.6.0-beta.21.tgz#e3708bc504c56a23ff31f12a2eeb335331a92aac"
|
||||
integrity sha512-8/PTaXVPa4kQ0xzVeuZZk10OpbZBj2cgfwhM2B0ChSPvwrk0lX+ksnXdtDKH3tg+JYvo7fIhNXtkr4NwWt7VJQ==
|
||||
|
||||
xterm-addon-search@0.14.0-beta.27:
|
||||
version "0.14.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.14.0-beta.27.tgz#b6f81eac5047253a5c664349c47498a81b6ec168"
|
||||
integrity sha512-T4Exwf/rqoLHqGUUIta5Pw/i9PljvroZwLxc7RnVyDqpNsTifDn3675kS54CxwqPlv4owFhxujTDzJPCUEkM2A==
|
||||
xterm-addon-search@0.14.0-beta.31:
|
||||
version "0.14.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.14.0-beta.31.tgz#933ca5d2d642dacad29f2cfbd50830cff83bc274"
|
||||
integrity sha512-JRY1ukhoh32D0AMz78xpumQkLgkcP9d3GXj6gzVHZZsjLAMDaJYEubYq1bUhM7IGHUyg+x0sdRJyx7d6fJpiQg==
|
||||
|
||||
xterm-addon-serialize@0.12.0-beta.26:
|
||||
version "0.12.0-beta.26"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.12.0-beta.26.tgz#cb5bd80128e82880369cb012938e14414b182aa1"
|
||||
integrity sha512-b4lOcttE6lqAF3zB2l8XtDShe5djhl9SueljnVWuG4mYMYPQoiklxFcpY66sjSCIAS6NsbtrL/LGQ/0eZGi+Ig==
|
||||
xterm-addon-serialize@0.12.0-beta.31:
|
||||
version "0.12.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.12.0-beta.31.tgz#2a95dc1e12f4097e2894b04c9cb8fff0bc0b858c"
|
||||
integrity sha512-h2rWR+Lfi1Iv4VkLUlrBMYh5Mdq8vux2BKyCJe6a1ZnEu5Dzb0VuiNxfTKXTCT5M83nMn7TCB9TX0E8z6bs7xw==
|
||||
|
||||
xterm-addon-unicode11@0.7.0-beta.26:
|
||||
version "0.7.0-beta.26"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.7.0-beta.26.tgz#f9606231a8f13e57dbdec5e884b044b0813931f5"
|
||||
integrity sha512-po+z1ayyrkWh8IGXKpbwCLKLKfcjotZVKqowU6PtHuDtJm/J8rlzvV2eJU1WQ/8ezpopU09ibWCvaf1a7EPuxA==
|
||||
xterm-addon-unicode11@0.7.0-beta.31:
|
||||
version "0.7.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.7.0-beta.31.tgz#abcba752172323f31312bd8a3f9b6a049dbca6e3"
|
||||
integrity sha512-vvBKJbBoLbeIf2++6D16VnOOwevZE3nyO/PDZ7cyTJK1eYR73rr8ZbjUrH92YoTu4Z8MpZFepGQOgK/vlAQMwQ==
|
||||
|
||||
xterm-addon-webgl@0.17.0-beta.26:
|
||||
version "0.17.0-beta.26"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.17.0-beta.26.tgz#aee4a043981d5d303b7112ef7049bc2865e75393"
|
||||
integrity sha512-N8CuAPZnoDlQ6yV7n4eXQ2ONPr/GdxiwgxrJjNks4CzzHiJREm23FQIv0fCTwKQS5xU3qoc4LlT3vZ1tKGjtQw==
|
||||
xterm-addon-webgl@0.17.0-beta.31:
|
||||
version "0.17.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.17.0-beta.31.tgz#3cd29b4858e3f4f6dd5a8dd969454e85e1f43baa"
|
||||
integrity sha512-vYHj+HlTcqUlFFVuoCTjlgh89/lIoSkZ7Nc87cwSFTrJsl07qoKutmpupqFXyjhbEA1fQY2SuQLx08Gmf2jWkQ==
|
||||
|
||||
xterm-headless@5.4.0-beta.27:
|
||||
version "5.4.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.4.0-beta.27.tgz#cfce5f86e83580388238ea204bb451b7ffe94dc9"
|
||||
integrity sha512-vdrq5eeNMyHZRDw5XR/TPl8oPln0BqbR07akt/fDXMsVg6YwWG+UOnU6GIMj7bJaBed5YkPV9NeBtdsVQn4Lyw==
|
||||
xterm-headless@5.4.0-beta.32:
|
||||
version "5.4.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.4.0-beta.32.tgz#0d5cd35e1a0372888055ff0b06dfe17457979a6c"
|
||||
integrity sha512-DQduq8KSoQZyRrQAFB+FkcY2UMxCW39P1/duOpksebc6PT9pbGkyPe5s+AdUQGiYzriEpzVtKUzDcquoVmpPhA==
|
||||
|
||||
xterm@5.4.0-beta.27:
|
||||
version "5.4.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.4.0-beta.27.tgz#f641ee045a65c9c8967fac534a202062706a8fa9"
|
||||
integrity sha512-gKqtrjy0RLk2123oFyPw5tkV96jGz4c/JkY8/XUvBXoMVsX4A7rVKpHlmHhmnuK1X5ERAkvCD21YE7LfB8WYkw==
|
||||
xterm@5.4.0-beta.32:
|
||||
version "5.4.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.4.0-beta.32.tgz#1b4242cf1c0c1a5a1070da58d3f11956b537130a"
|
||||
integrity sha512-mWTwEiNBFMF89oqVfi6qTM2Py5gC1Mwvslx1KxmI2Ukgh9v3CrqKDhj29eY1ZeAo0uuYknFWKyuexqp+3SHJCA==
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
|
||||
@@ -59,7 +59,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Markdown tests
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\markdown-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\markdown-language-features --extensionTestsPath=%~dp0\..\extensions\markdown-language-features\out\test %API_TESTS_EXTRA_ARGS%
|
||||
call yarn test-extension -l markdown-language-features
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -77,16 +77,12 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Ipynb tests
|
||||
set IPYNBWORKSPACE=%TEMPDIR%\ipynb-%RANDOM%
|
||||
mkdir %IPYNBWORKSPACE%
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" %IPYNBWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\ipynb --extensionTestsPath=%~dp0\..\extensions\ipynb\out\test %API_TESTS_EXTRA_ARGS%
|
||||
call yarn test-extension -l ipynb
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Notebook Output tests
|
||||
set NBOUTWORKSPACE=%TEMPDIR%\nbout-%RANDOM%
|
||||
mkdir %NBOUTWORKSPACE%
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" %NBOUTWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\notebook-renderers --extensionTestsPath=%~dp0\..\extensions\notebook-renderers\out\test %API_TESTS_EXTRA_ARGS%
|
||||
call yarn test-extension -l notebook-renderers
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -96,6 +92,11 @@ mkdir %CFWORKSPACE%
|
||||
call "%INTEGRATION_TEST_ELECTRON_PATH%" %CFWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\configuration-editing --extensionTestsPath=%~dp0\..\extensions\configuration-editing\out\test %API_TESTS_EXTRA_ARGS%
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### GitHub Authentication tests
|
||||
call yarn test-extension -l github-authentication
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Tests standalone (CommonJS)
|
||||
|
||||
echo.
|
||||
|
||||
@@ -79,7 +79,7 @@ kill_app
|
||||
echo
|
||||
echo "### Markdown tests"
|
||||
echo
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $ROOT/extensions/markdown-language-features/test-workspace --extensionDevelopmentPath=$ROOT/extensions/markdown-language-features --extensionTestsPath=$ROOT/extensions/markdown-language-features/out/test $API_TESTS_EXTRA_ARGS
|
||||
yarn test-extension -l markdown-language-features
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -97,13 +97,13 @@ kill_app
|
||||
echo
|
||||
echo "### Ipynb tests"
|
||||
echo
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$ROOT/extensions/ipynb --extensionTestsPath=$ROOT/extensions/ipynb/out/test $API_TESTS_EXTRA_ARGS
|
||||
yarn test-extension -l ipynb
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### Notebook Output tests"
|
||||
echo
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$ROOT/extensions/notebook-renderers --extensionTestsPath=$ROOT/extensions/notebook-renderers/out/test $API_TESTS_EXTRA_ARGS
|
||||
yarn test-extension -l notebook-renderers
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -112,6 +112,11 @@ echo
|
||||
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_EXTRA_ARGS $(mktemp -d 2>/dev/null) --extensionDevelopmentPath=$ROOT/extensions/configuration-editing --extensionTestsPath=$ROOT/extensions/configuration-editing/out/test $API_TESTS_EXTRA_ARGS
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### GitHub Authentication tests"
|
||||
echo
|
||||
yarn test-extension -l github-authentication
|
||||
kill_app
|
||||
|
||||
# Tests standalone (CommonJS)
|
||||
|
||||
|
||||
@@ -411,9 +411,6 @@ function configureCrashReporter() {
|
||||
if (uuidPattern.test(crashReporterId)) {
|
||||
if (isWindows) {
|
||||
switch (process.arch) {
|
||||
case 'ia32':
|
||||
submitURL = appCenter['win32-ia32'];
|
||||
break;
|
||||
case 'x64':
|
||||
submitURL = appCenter['win32-x64'];
|
||||
break;
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"types": [],
|
||||
"lib": [
|
||||
"es5",
|
||||
"ES2015.Iterable"
|
||||
"ES2022"
|
||||
],
|
||||
},
|
||||
"include": [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { addDisposableListener } from 'vs/base/browser/dom';
|
||||
import { addDisposableListener, getWindow } from 'vs/base/browser/dom';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Mimes } from 'vs/base/common/mime';
|
||||
|
||||
@@ -95,11 +95,12 @@ export function applyDragImage(event: DragEvent, label: string | null, clazz: st
|
||||
}
|
||||
|
||||
if (event.dataTransfer) {
|
||||
document.body.appendChild(dragImage);
|
||||
const ownerDocument = getWindow(event).document;
|
||||
ownerDocument.body.appendChild(dragImage);
|
||||
event.dataTransfer.setDragImage(dragImage, -10, -10);
|
||||
|
||||
// Removes the element when the DND operation is done
|
||||
setTimeout(() => document.body.removeChild(dragImage), 0);
|
||||
setTimeout(() => ownerDocument.body.removeChild(dragImage), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+29
-15
@@ -602,14 +602,7 @@ export function getLargestChildWidth(parent: HTMLElement, children: HTMLElement[
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
export function isAncestor(testChild: Node | null, testAncestor: Node | null): boolean {
|
||||
while (testChild) {
|
||||
if (testChild === testAncestor) {
|
||||
return true;
|
||||
}
|
||||
testChild = testChild.parentNode;
|
||||
}
|
||||
|
||||
return false;
|
||||
return Boolean(testAncestor?.contains(testChild));
|
||||
}
|
||||
|
||||
const parentFlowToDataKey = 'parentFlowToElementId';
|
||||
@@ -717,6 +710,22 @@ export function getActiveElement(): Element | null {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the active element of the `document` that owns
|
||||
* the `element` is `element`.
|
||||
*/
|
||||
export function isActiveElement(element: Element): boolean {
|
||||
return element.ownerDocument.activeElement === element;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the active element of the `document` that owns
|
||||
* the `ancestor` is contained in `ancestor`.
|
||||
*/
|
||||
export function isAncestorOfActiveElement(ancestor: Element): boolean {
|
||||
return isAncestor(ancestor.ownerDocument.activeElement, ancestor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the active document across all child windows.
|
||||
* Use this instead of `document` when reacting to dom events to handle multiple windows.
|
||||
@@ -959,6 +968,7 @@ class FocusTracker extends Disposable implements IFocusTracker {
|
||||
const activeElement = (shadowRoot ? shadowRoot.activeElement : element.ownerDocument.activeElement);
|
||||
return isAncestor(activeElement, element);
|
||||
} else {
|
||||
const window = element;
|
||||
return isAncestor(window.document.activeElement, window.document);
|
||||
}
|
||||
}
|
||||
@@ -1209,7 +1219,7 @@ export function domContentLoaded(): Promise<unknown> {
|
||||
* of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps"
|
||||
* with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels.
|
||||
*/
|
||||
export function computeScreenAwareSize(cssPx: number): number {
|
||||
export function computeScreenAwareSize(window: Window, cssPx: number): number {
|
||||
const screenPx = window.devicePixelRatio * cssPx;
|
||||
return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio;
|
||||
}
|
||||
@@ -1633,7 +1643,11 @@ export class ModifierKeyEmitter extends event.Emitter<IModifierKeyStatus> {
|
||||
metaKey: false
|
||||
};
|
||||
|
||||
this._subscriptions.add(addDisposableListener(window, 'keydown', e => {
|
||||
this._subscriptions.add(event.Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposableStore }) => this.registerListeners(window, disposableStore), { window, disposableStore: this._subscriptions }));
|
||||
}
|
||||
|
||||
private registerListeners(window: Window, disposables: DisposableStore): void {
|
||||
disposables.add(addDisposableListener(window, 'keydown', e => {
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
@@ -1670,7 +1684,7 @@ export class ModifierKeyEmitter extends event.Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}, true));
|
||||
|
||||
this._subscriptions.add(addDisposableListener(window, 'keyup', e => {
|
||||
disposables.add(addDisposableListener(window, 'keyup', e => {
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
@@ -1702,21 +1716,21 @@ export class ModifierKeyEmitter extends event.Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}, true));
|
||||
|
||||
this._subscriptions.add(addDisposableListener(document.body, 'mousedown', () => {
|
||||
disposables.add(addDisposableListener(window.document.body, 'mousedown', () => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}, true));
|
||||
|
||||
this._subscriptions.add(addDisposableListener(document.body, 'mouseup', () => {
|
||||
disposables.add(addDisposableListener(window.document.body, 'mouseup', () => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}, true));
|
||||
|
||||
this._subscriptions.add(addDisposableListener(document.body, 'mousemove', e => {
|
||||
disposables.add(addDisposableListener(window.document.body, 'mousemove', e => {
|
||||
if (e.buttons) {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}
|
||||
}, true));
|
||||
|
||||
this._subscriptions.add(addDisposableListener(window, 'blur', () => {
|
||||
disposables.add(addDisposableListener(window, 'blur', () => {
|
||||
this.resetKeyStatus();
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class GlobalPointerMoveMonitor implements IDisposable {
|
||||
// DOMException: Failed to execute 'setPointerCapture' on 'Element':
|
||||
// No active pointer with the given id is found.
|
||||
// In case of failure, we bind the listeners on the window
|
||||
eventSource = window;
|
||||
eventSource = dom.getWindow(initialElement);
|
||||
}
|
||||
|
||||
this._hooks.add(dom.addDisposableListener(
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import * as DomUtils from 'vs/base/browser/dom';
|
||||
import * as arrays from 'vs/base/common/arrays';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { Event as EventUtils } from 'vs/base/common/event';
|
||||
import { Disposable, IDisposable, markAsSingleton, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { LinkedList } from 'vs/base/common/linkedList';
|
||||
|
||||
@@ -89,9 +90,12 @@ export class Gesture extends Disposable {
|
||||
this.activeTouches = {};
|
||||
this.handle = null;
|
||||
this._lastSetTapCountTime = 0;
|
||||
this._register(DomUtils.addDisposableListener(document, 'touchstart', (e: TouchEvent) => this.onTouchStart(e), { passive: false }));
|
||||
this._register(DomUtils.addDisposableListener(document, 'touchend', (e: TouchEvent) => this.onTouchEnd(e)));
|
||||
this._register(DomUtils.addDisposableListener(document, 'touchmove', (e: TouchEvent) => this.onTouchMove(e), { passive: false }));
|
||||
|
||||
this._register(EventUtils.runAndSubscribe(DomUtils.onDidRegisterWindow, ({ window, disposableStore }) => {
|
||||
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchstart', (e: TouchEvent) => this.onTouchStart(e), { passive: false }));
|
||||
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchend', (e: TouchEvent) => this.onTouchEnd(e)));
|
||||
disposableStore.add(DomUtils.addDisposableListener(window.document, 'touchmove', (e: TouchEvent) => this.onTouchMove(e), { passive: false }));
|
||||
}, { window, disposableStore: this._store }));
|
||||
}
|
||||
|
||||
public static addTarget(element: HTMLElement): IDisposable {
|
||||
|
||||
@@ -177,14 +177,7 @@ export class BreadcrumbsWidget {
|
||||
}
|
||||
|
||||
isDOMFocused(): boolean {
|
||||
let candidate = document.activeElement;
|
||||
while (candidate) {
|
||||
if (this._domNode === candidate) {
|
||||
return true;
|
||||
}
|
||||
candidate = candidate.parentElement;
|
||||
}
|
||||
return false;
|
||||
return dom.isAncestorOfActiveElement(this._domNode);
|
||||
}
|
||||
|
||||
getFocused(): BreadcrumbsItem {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IContextMenuProvider } from 'vs/base/browser/contextmenu';
|
||||
import { addDisposableListener, EventHelper, EventType, IFocusTracker, reset, trackFocus } from 'vs/base/browser/dom';
|
||||
import { addDisposableListener, EventHelper, EventType, IFocusTracker, isActiveElement, reset, trackFocus } from 'vs/base/browser/dom';
|
||||
import { sanitize } from 'vs/base/browser/dompurify/dompurify';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { renderMarkdown, renderStringAsPlaintext } from 'vs/base/browser/markdownRenderer';
|
||||
@@ -281,7 +281,7 @@ export class Button extends Disposable implements IButton {
|
||||
}
|
||||
|
||||
hasFocus(): boolean {
|
||||
return this._element === document.activeElement;
|
||||
return isActiveElement(this._element);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,13 +195,13 @@ export class ContextView extends Disposable {
|
||||
const toDisposeOnSetContainer = new DisposableStore();
|
||||
|
||||
ContextView.BUBBLE_UP_EVENTS.forEach(event => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, e => {
|
||||
this.onDOMEvent(e, false);
|
||||
}));
|
||||
});
|
||||
|
||||
ContextView.BUBBLE_DOWN_EVENTS.forEach(event => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, e => {
|
||||
this.onDOMEvent(e, true);
|
||||
}, true));
|
||||
});
|
||||
@@ -370,10 +370,10 @@ export class ContextView extends Disposable {
|
||||
return !!this.delegate;
|
||||
}
|
||||
|
||||
private onDOMEvent(e: Event, onCapture: boolean): void {
|
||||
private onDOMEvent(e: UIEvent, onCapture: boolean): void {
|
||||
if (this.delegate) {
|
||||
if (this.delegate.onDOMEvent) {
|
||||
this.delegate.onDOMEvent(e, <HTMLElement>document.activeElement);
|
||||
this.delegate.onDOMEvent(e, <HTMLElement>DOM.getWindow(e).document.activeElement);
|
||||
} else if (onCapture && !DOM.isAncestor(<HTMLElement>e.target, this.container)) {
|
||||
this.hide();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { $, addDisposableListener, clearNode, EventHelper, EventType, hide, isAncestor, show } from 'vs/base/browser/dom';
|
||||
import { $, addDisposableListener, clearNode, EventHelper, EventType, getWindow, hide, isActiveElement, isAncestor, show } from 'vs/base/browser/dom';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ButtonBar, ButtonWithDescription, IButtonStyles } from 'vs/base/browser/ui/button/button';
|
||||
@@ -198,7 +198,7 @@ export class Dialog extends Disposable {
|
||||
}
|
||||
|
||||
async show(): Promise<IDialogResult> {
|
||||
this.focusToReturn = document.activeElement as HTMLElement;
|
||||
this.focusToReturn = this.container.ownerDocument.activeElement as HTMLElement;
|
||||
|
||||
return new Promise<IDialogResult>((resolve) => {
|
||||
clearNode(this.buttonsContainer);
|
||||
@@ -228,6 +228,7 @@ export class Dialog extends Disposable {
|
||||
});
|
||||
|
||||
// Handle keyboard events globally: Tab, Arrow-Left/Right
|
||||
const window = getWindow(this.container);
|
||||
this._register(addDisposableListener(window, 'keydown', e => {
|
||||
const evt = new StandardKeyboardEvent(e);
|
||||
|
||||
@@ -268,7 +269,7 @@ export class Dialog extends Disposable {
|
||||
const links = this.messageContainer.querySelectorAll('a');
|
||||
for (const link of links) {
|
||||
focusableElements.push(link);
|
||||
if (link === document.activeElement) {
|
||||
if (isActiveElement(link)) {
|
||||
focusedIndex = focusableElements.length - 1;
|
||||
}
|
||||
}
|
||||
@@ -472,7 +473,7 @@ export class Dialog extends Disposable {
|
||||
this.modalElement = undefined;
|
||||
}
|
||||
|
||||
if (this.focusToReturn && isAncestor(this.focusToReturn, document.body)) {
|
||||
if (this.focusToReturn && isAncestor(this.focusToReturn, this.container.ownerDocument.body)) {
|
||||
this.focusToReturn.focus();
|
||||
this.focusToReturn = undefined;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ export class FindInput extends Widget {
|
||||
const indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode];
|
||||
this.onkeydown(this.domNode, (event: IKeyboardEvent) => {
|
||||
if (event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow) || event.equals(KeyCode.Escape)) {
|
||||
const index = indexes.indexOf(<HTMLElement>document.activeElement);
|
||||
const index = indexes.indexOf(<HTMLElement>this.domNode.ownerDocument.activeElement);
|
||||
if (index >= 0) {
|
||||
let newIndex: number = -1;
|
||||
if (event.equals(KeyCode.RightArrow)) {
|
||||
|
||||
@@ -140,7 +140,7 @@ export class ReplaceInput extends Widget {
|
||||
const indexes = [this.preserveCase.domNode];
|
||||
this.onkeydown(this.domNode, (event: IKeyboardEvent) => {
|
||||
if (event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow) || event.equals(KeyCode.Escape)) {
|
||||
const index = indexes.indexOf(<HTMLElement>document.activeElement);
|
||||
const index = indexes.indexOf(<HTMLElement>this.domNode.ownerDocument.activeElement);
|
||||
if (index >= 0) {
|
||||
let newIndex: number = -1;
|
||||
if (event.equals(KeyCode.RightArrow)) {
|
||||
|
||||
@@ -138,7 +138,11 @@ export class IconLabel extends Disposable {
|
||||
containerClasses.push('disabled');
|
||||
}
|
||||
if (options.title) {
|
||||
ariaLabel += options.title;
|
||||
if (typeof options.title === 'string') {
|
||||
ariaLabel += options.title;
|
||||
} else {
|
||||
ariaLabel += label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,9 +166,9 @@ export class InputBox extends Widget {
|
||||
// from ScrollableElement to DOM
|
||||
this._register(this.scrollableElement.onScroll(e => this.input.scrollTop = e.scrollTop));
|
||||
|
||||
const onSelectionChange = this._register(new DomEmitter(document, 'selectionchange'));
|
||||
const onSelectionChange = this._register(new DomEmitter(container.ownerDocument, 'selectionchange'));
|
||||
const onAnchoredSelectionChange = Event.filter(onSelectionChange.event, () => {
|
||||
const selection = document.getSelection();
|
||||
const selection = container.ownerDocument.getSelection();
|
||||
return selection?.anchorNode === wrapper;
|
||||
});
|
||||
|
||||
@@ -287,7 +287,7 @@ export class InputBox extends Widget {
|
||||
}
|
||||
|
||||
public hasFocus(): boolean {
|
||||
return document.activeElement === this.input;
|
||||
return dom.isActiveElement(this.input);
|
||||
}
|
||||
|
||||
public select(range: IRange | null = null): void {
|
||||
@@ -628,7 +628,7 @@ export class HistoryInputBox extends InputBox implements IHistoryNavigationWidge
|
||||
if (options.showHistoryHint && options.showHistoryHint() && !this.placeholder.endsWith(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX) && !this.placeholder.endsWith(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS) && this.history.getHistory().length) {
|
||||
const suffix = this.placeholder.endsWith(')') ? NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX : NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS;
|
||||
const suffixedPlaceholder = this.placeholder + suffix;
|
||||
if (options.showPlaceholderOnFocus && document.activeElement !== this.input) {
|
||||
if (options.showPlaceholderOnFocus && !dom.isActiveElement(this.input)) {
|
||||
this.placeholder = suffixedPlaceholder;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
import 'vs/css!./list';
|
||||
import { IListContextMenuEvent, IListEvent, IListMouseEvent, IListRenderer, IListVirtualDelegate } from './list';
|
||||
import { IListAccessibilityProvider, IListOptions, IListOptionsUpdate, IListStyles, List, TypeNavigationMode } from './listWidget';
|
||||
import { isActiveElement } from 'vs/base/browser/dom';
|
||||
|
||||
export interface IPagedRenderer<TElement, TTemplateData> extends IListRenderer<TElement, TTemplateData> {
|
||||
renderPlaceholder(index: number, templateData: TTemplateData): void;
|
||||
@@ -144,7 +145,7 @@ export class PagedList<T> implements IDisposable {
|
||||
}
|
||||
|
||||
isDOMFocused(): boolean {
|
||||
return this.list.getHTMLElement() === document.activeElement;
|
||||
return isActiveElement(this.getHTMLElement());
|
||||
}
|
||||
|
||||
domFocus(): void {
|
||||
|
||||
@@ -1131,7 +1131,7 @@ export class ListView<T> implements IListView<T> {
|
||||
while (e && !e.classList.contains('monaco-workbench')) {
|
||||
e = e.parentElement;
|
||||
}
|
||||
return e || document.body;
|
||||
return e || this.domNode.ownerDocument;
|
||||
};
|
||||
|
||||
const container = getDragImageContainer(this.domNode);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IDragAndDropData } from 'vs/base/browser/dnd';
|
||||
import { asCssValueWithDefault, createStyleSheet, Dimension, EventHelper, getActiveElement, isMouseEvent } from 'vs/base/browser/dom';
|
||||
import { asCssValueWithDefault, createStyleSheet, Dimension, EventHelper, getActiveElement, isActiveElement, isMouseEvent } from 'vs/base/browser/dom';
|
||||
import { DomEmitter } from 'vs/base/browser/event';
|
||||
import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { Gesture } from 'vs/base/browser/touch';
|
||||
@@ -1880,7 +1880,7 @@ export class List<T> implements ISpliceable<T>, IDisposable {
|
||||
}
|
||||
|
||||
isDOMFocused(): boolean {
|
||||
return this.view.domNode === document.activeElement;
|
||||
return isActiveElement(this.view.domNode);
|
||||
}
|
||||
|
||||
getHTMLElement(): HTMLElement {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { isFirefox } from 'vs/base/browser/browser';
|
||||
import { EventType as TouchEventType, Gesture } from 'vs/base/browser/touch';
|
||||
import { $, addDisposableListener, append, clearNode, createStyleSheet, Dimension, EventHelper, EventLike, EventType, getActiveElement, IDomNodePagePosition, isAncestor, isInShadowDOM } from 'vs/base/browser/dom';
|
||||
import { $, addDisposableListener, append, clearNode, createStyleSheet, Dimension, EventHelper, EventLike, EventType, getActiveElement, getWindow, IDomNodePagePosition, isAncestor, isInShadowDOM } from 'vs/base/browser/dom';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { ActionBar, ActionsOrientation, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
@@ -259,6 +259,7 @@ export class Menu extends ActionBar {
|
||||
e.preventDefault();
|
||||
}));
|
||||
|
||||
const window = getWindow(container);
|
||||
menuElement.style.maxHeight = `${Math.max(10, window.innerHeight - container.getBoundingClientRect().top - 35)}px`;
|
||||
|
||||
actions = actions.filter(a => {
|
||||
@@ -899,6 +900,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
|
||||
const viewBox = this.submenuContainer.getBoundingClientRect();
|
||||
|
||||
const window = getWindow(this.element);
|
||||
const { top, left } = this.calculateSubmenuMenuLayout(new Dimension(window.innerWidth, window.innerHeight), Dimension.lift(viewBox), entryBoxUpdated, this.expandDirection);
|
||||
// subtract offsets caused by transform parent
|
||||
this.submenuContainer.style.left = `${left - viewBox.left}px`;
|
||||
|
||||
@@ -145,6 +145,7 @@ export class MenuBar extends Disposable {
|
||||
}
|
||||
}));
|
||||
|
||||
const window = DOM.getWindow(this.container);
|
||||
this._register(DOM.addDisposableListener(window, DOM.EventType.MOUSE_DOWN, () => {
|
||||
// This mouse event is outside the menubar so it counts as a focus out
|
||||
if (this.isFocused) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { $, append, createStyleSheet, EventHelper, EventLike } from 'vs/base/browser/dom';
|
||||
import { $, append, createStyleSheet, EventHelper, EventLike, getWindow } from 'vs/base/browser/dom';
|
||||
import { DomEmitter } from 'vs/base/browser/event';
|
||||
import { EventType, Gesture } from 'vs/base/browser/touch';
|
||||
import { Delayer } from 'vs/base/common/async';
|
||||
@@ -175,14 +175,16 @@ class MouseEventFactory implements IPointerEventFactory {
|
||||
|
||||
private readonly disposables = new DisposableStore();
|
||||
|
||||
constructor(private el: HTMLElement) { }
|
||||
|
||||
@memoize
|
||||
get onPointerMove(): Event<PointerEvent> {
|
||||
return this.disposables.add(new DomEmitter(window, 'mousemove')).event;
|
||||
return this.disposables.add(new DomEmitter(getWindow(this.el), 'mousemove')).event;
|
||||
}
|
||||
|
||||
@memoize
|
||||
get onPointerUp(): Event<PointerEvent> {
|
||||
return this.disposables.add(new DomEmitter(window, 'mouseup')).event;
|
||||
return this.disposables.add(new DomEmitter(getWindow(this.el), 'mouseup')).event;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
@@ -425,7 +427,7 @@ export class Sash extends Disposable {
|
||||
}
|
||||
|
||||
const onMouseDown = this._register(new DomEmitter(this.el, 'mousedown')).event;
|
||||
this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory()), this));
|
||||
this._register(onMouseDown(e => this.onPointerStart(e, new MouseEventFactory(container)), this));
|
||||
const onMouseDoubleClick = this._register(new DomEmitter(this.el, 'dblclick')).event;
|
||||
this._register(onMouseDoubleClick(this.onPointerDoublePress, this));
|
||||
const onMouseEnter = this._register(new DomEmitter(this.el, 'mouseenter')).event;
|
||||
@@ -514,7 +516,7 @@ export class Sash extends Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
const iframes = document.getElementsByTagName('iframe');
|
||||
const iframes = this.el.ownerDocument.getElementsByTagName('iframe');
|
||||
for (const iframe of iframes) {
|
||||
iframe.classList.add(PointerEventsDisabledCssClass); // disable mouse events on iframes as long as we drag the sash
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class MouseWheelClassifier {
|
||||
}
|
||||
|
||||
public acceptStandardWheelEvent(e: StandardWheelEvent): void {
|
||||
const osZoomFactor = window.devicePixelRatio / getZoomFactor();
|
||||
const osZoomFactor = dom.getWindow(e.browserEvent).devicePixelRatio / getZoomFactor();
|
||||
if (platform.isWindows || platform.isLinux) {
|
||||
// On Windows and Linux, the incoming delta events are multiplied with the OS zoom factor.
|
||||
// The OS zoom factor can be reverse engineered by using the device pixel ratio and the configured zoom factor into account.
|
||||
|
||||
@@ -545,6 +545,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
// Make visible to enable measurements
|
||||
this.selectDropDownContainer.classList.add('visible');
|
||||
|
||||
const window = dom.getWindow(this.selectElement);
|
||||
const selectPosition = dom.getDomNodePagePosition(this.selectElement);
|
||||
const styles = getComputedStyle(this.selectElement);
|
||||
const verticalPadding = parseFloat(styles.getPropertyValue('--dropdown-padding-top')) + parseFloat(styles.getPropertyValue('--dropdown-padding-bottom'));
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.monaco-pane-view .pane > .pane-header.not-collapsible {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.monaco-pane-view .pane > .pane-header > .title {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ export abstract class Pane extends Disposable implements IView {
|
||||
|
||||
private expandedSize: number | undefined = undefined;
|
||||
private _headerVisible = true;
|
||||
private _collapsible = true;
|
||||
private _bodyRendered = false;
|
||||
private _minimumBodySize: number;
|
||||
private _maximumBodySize: number;
|
||||
@@ -154,6 +155,10 @@ export abstract class Pane extends Disposable implements IView {
|
||||
}
|
||||
|
||||
setExpanded(expanded: boolean): boolean {
|
||||
if (!expanded && !this.collapsible) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this._expanded === !!expanded) {
|
||||
return false;
|
||||
}
|
||||
@@ -198,6 +203,19 @@ export abstract class Pane extends Disposable implements IView {
|
||||
this._onDidChange.fire(undefined);
|
||||
}
|
||||
|
||||
get collapsible(): boolean {
|
||||
return this._collapsible;
|
||||
}
|
||||
|
||||
set collapsible(collapsible: boolean) {
|
||||
if (this._collapsible === !!collapsible) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._collapsible = !!collapsible;
|
||||
this.updateHeader();
|
||||
}
|
||||
|
||||
get orientation(): Orientation {
|
||||
return this._orientation;
|
||||
}
|
||||
@@ -299,13 +317,22 @@ export abstract class Pane extends Disposable implements IView {
|
||||
protected updateHeader(): void {
|
||||
const expanded = !this.headerVisible || this.isExpanded();
|
||||
|
||||
if (this.collapsible) {
|
||||
this.header.setAttribute('tabindex', '0');
|
||||
this.header.setAttribute('role', 'button');
|
||||
} else {
|
||||
this.header.removeAttribute('tabindex');
|
||||
this.header.removeAttribute('role');
|
||||
}
|
||||
|
||||
this.header.style.lineHeight = `${this.headerSize}px`;
|
||||
this.header.classList.toggle('hidden', !this.headerVisible);
|
||||
this.header.classList.toggle('expanded', expanded);
|
||||
this.header.classList.toggle('not-collapsible', !this.collapsible);
|
||||
this.header.setAttribute('aria-expanded', String(expanded));
|
||||
|
||||
this.header.style.color = this.styles.headerForeground ?? '';
|
||||
this.header.style.backgroundColor = this.styles.headerBackground ?? '';
|
||||
this.header.style.color = this.collapsible ? this.styles.headerForeground ?? '' : '';
|
||||
this.header.style.backgroundColor = (this.collapsible ? this.styles.headerBackground : 'transparent') ?? '';
|
||||
this.header.style.borderTop = this.styles.headerBorder && this.orientation === Orientation.VERTICAL ? `1px solid ${this.styles.headerBorder}` : '';
|
||||
this.element.style.borderLeft = this.styles.leftBorder && this.orientation === Orientation.HORIZONTAL ? `1px solid ${this.styles.leftBorder}` : '';
|
||||
}
|
||||
@@ -353,9 +380,9 @@ class PaneDraggable extends Disposable {
|
||||
e.dataTransfer?.setData(DataTransfers.TEXT, this.pane.draggableElement.textContent || '');
|
||||
}
|
||||
|
||||
const dragImage = append(document.body, $('.monaco-drag-image', {}, this.pane.draggableElement.textContent || ''));
|
||||
const dragImage = append(this.pane.element.ownerDocument.body, $('.monaco-drag-image', {}, this.pane.draggableElement.textContent || ''));
|
||||
e.dataTransfer.setDragImage(dragImage, -10, -10);
|
||||
setTimeout(() => document.body.removeChild(dragImage), 0);
|
||||
setTimeout(() => this.pane.element.ownerDocument.body.removeChild(dragImage), 0);
|
||||
|
||||
this.context.draggable = this;
|
||||
}
|
||||
@@ -626,7 +653,7 @@ export class PaneView extends Disposable {
|
||||
|
||||
private focusPrevious(): void {
|
||||
const headers = this.getPaneHeaderElements();
|
||||
const index = headers.indexOf(document.activeElement as HTMLElement);
|
||||
const index = headers.indexOf(this.element.ownerDocument.activeElement as HTMLElement);
|
||||
|
||||
if (index === -1) {
|
||||
return;
|
||||
@@ -637,7 +664,7 @@ export class PaneView extends Disposable {
|
||||
|
||||
private focusNext(): void {
|
||||
const headers = this.getPaneHeaderElements();
|
||||
const index = headers.indexOf(document.activeElement as HTMLElement);
|
||||
const index = headers.indexOf(this.element.ownerDocument.activeElement as HTMLElement);
|
||||
|
||||
if (index === -1) {
|
||||
return;
|
||||
|
||||
@@ -887,8 +887,8 @@ export class SplitView<TLayoutContext = undefined, TView extends IView<TLayoutCo
|
||||
|
||||
// This way, we can press Alt while we resize a sash, macOS style!
|
||||
const disposable = combinedDisposable(
|
||||
addDisposableListener(document.body, 'keydown', e => resetSashDragState(this.sashDragState!.current, e.altKey)),
|
||||
addDisposableListener(document.body, 'keyup', () => resetSashDragState(this.sashDragState!.current, false))
|
||||
addDisposableListener(this.el.ownerDocument.body, 'keydown', e => resetSashDragState(this.sashDragState!.current, e.altKey)),
|
||||
addDisposableListener(this.el.ownerDocument.body, 'keyup', () => resetSashDragState(this.sashDragState!.current, false))
|
||||
);
|
||||
|
||||
const resetSashDragState = (start: number, alt: boolean) => {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { ThemeIcon } from 'vs/base/common/themables';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import 'vs/css!./toggle';
|
||||
import { isActiveElement } from 'vs/base/browser/dom';
|
||||
|
||||
export interface IToggleOpts extends IToggleStyles {
|
||||
readonly actionClassName?: string;
|
||||
@@ -252,7 +253,7 @@ export class Checkbox extends Widget {
|
||||
}
|
||||
|
||||
hasFocus(): boolean {
|
||||
return this.domNode === document.activeElement;
|
||||
return isActiveElement(this.domNode);
|
||||
}
|
||||
|
||||
protected applyStyles(): void {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user