This commit is contained in:
Will Lorey 2021-06-03 11:25:14 -07:00 коммит произвёл GitHub
Родитель 9974f3dd55
Коммит aa7cefef88
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
14 изменённых файлов: 6432 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,16 @@
steps:
- task: NodeTool@0
displayName: 'Use Node 12.x'
inputs:
versionSpec: 12.x
- task: Npm@1
displayName: 'npm ci'
inputs:
command: ci
- task: Npm@1
displayName: 'Build'
inputs:
command: custom
customCommand: run build

Просмотреть файл

@ -0,0 +1,10 @@
steps:
- task: Npm@1
displayName: 'Lint'
inputs:
command: custom
customCommand: run lint
- task: ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
condition: ne(variables['System.PullRequest.IsFork'], 'True')

Просмотреть файл

@ -0,0 +1,26 @@
steps:
- task: Npm@1
displayName: 'cleanReadme'
inputs:
command: custom
customCommand: run cleanReadme
- task: Npm@1
displayName: 'Package'
inputs:
command: custom
customCommand: run package
- task: CopyFiles@2
displayName: 'Copy vsix to staging directory'
inputs:
Contents: '**/*.vsix'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts: vsix'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: vsix
# Only publish vsix from linux build since we use this to release and want to stay consistent
condition: and(eq(variables['Agent.OS'], 'Linux'), ne(variables['System.PullRequest.IsFork'], 'True'))

Просмотреть файл

@ -0,0 +1,9 @@
{
"tool": "Credential Scanner",
"suppressions": [
{
"folder": "node_modules\\",
"_justification": "No need to scan external node modules."
}
]
}

Просмотреть файл

@ -0,0 +1,10 @@
<PoliCheckExclusions>
<!--Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped -->
<Exclusion Type="FolderPathFull">NODE_MODULES</Exclusion>
<!--Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped -->
<!--<Exclusion Type="FolderPathStart">ABC|XYZ</Exclusion>-->
<!--Each of these file types will be completely skipped for the entire scan -->
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
<!--The specified file names will be skipped during the scan regardless which folder they are in -->
<Exclusion Type="FileName">CLOUDCONSOLELAUNCHER.JS|EXTENSION.JS</Exclusion>
</PoliCheckExclusions>

Просмотреть файл

@ -0,0 +1,36 @@
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
displayName: 'Run PoliCheck'
inputs:
targetType: F # search files and folders
optionsUEPATH: '$(Build.SourcesDirectory)/.azure-pipelines/compliance/PoliCheckExclusions.xml'
continueOnError: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
inputs:
toolMajorVersion: V2
suppressionsFile: '$(Build.SourcesDirectory)/.azure-pipelines/compliance/CredScanSuppressions.json'
debugMode: true # Needed to suppress folders
folderSuppression: true
continueOnError: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
displayName: 'AntiMalware Scanner'
inputs:
FileDirPath: '$(Build.SourcesDirectory)'
EnableServices: true
continueOnError: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: 'Post Analysis'
inputs:
AllTools: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')

Просмотреть файл

@ -0,0 +1,56 @@
#!/bin/bash
#
# COPIED FROM https://github.com/microsoft/vscode/blob/01e9903967417ba243cec705445eef9ecbfebfea/build/azure-pipelines/linux/xvfb.init
#
#
# /etc/rc.d/init.d/xvfbd
#
# chkconfig: 345 95 28
# description: Starts/Stops X Virtual Framebuffer server
# processname: Xvfb
#
### BEGIN INIT INFO
# Provides: xvfb
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start xvfb at boot time
# Description: Enable xvfb provided by daemon.
### END INIT INFO
[ "${NETWORKING}" = "no" ] && exit 0
PROG="/usr/bin/Xvfb"
PROG_OPTIONS=":10 -ac -screen 0 1024x768x24"
PROG_OUTPUT="/tmp/Xvfb.out"
case "$1" in
start)
echo "Starting : X Virtual Frame Buffer "
$PROG $PROG_OPTIONS>>$PROG_OUTPUT 2>&1 &
disown -ar
;;
stop)
echo "Shutting down : X Virtual Frame Buffer"
killproc $PROG
RETVAL=$?
[ $RETVAL -eq 0 ] && /bin/rm -f /var/lock/subsys/Xvfb
/var/run/Xvfb.pid
echo
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status Xvfb
RETVAL=$?
;;
*)
echo $"Usage: $0 (start|stop|restart|reload|status)"
exit 1
esac
exit $RETVAL

48
.azure-pipelines/main.yml Normal file
Просмотреть файл

@ -0,0 +1,48 @@
variables:
${{ if eq(variables['Build.Reason'], 'Schedule') }}:
ENABLE_LONG_RUNNING_TESTS: true
ENABLE_COMPLIANCE: true
jobs:
- job: Windows
pool:
vmImage: windows-latest
steps:
- template: common/build.yml
- template: common/package.yml
- template: common/lint.yml
- template: compliance/compliance.yml # Only works on Windows
- job: Linux
pool:
vmImage: ubuntu-latest
steps:
- template: common/build.yml
- template: common/package.yml
- template: common/lint.yml
- job: macOS
pool:
vmImage: macOS-10.14 # Using 10.14 instead of latest (10.15) because of "ENOTCONN" errors during tests
steps:
- template: common/build.yml
- template: common/package.yml
- template: common/lint.yml
trigger:
branches:
include:
- '*'
pr:
branches:
include:
- '*'
schedules:
- cron: "30 11 * * *"
displayName: Nightly at 4:30 PT
always: true # Run even when there are no code changes
branches:
include:
- main

Просмотреть файл

@ -1,2 +1,3 @@
.eslintrc.js
sample
gulpfile.ts

Просмотреть файл

@ -1,6 +1,8 @@
.azure-pipelines
.DS_Store
.github
.vscode
gulp*
out
node_modules
redirect

Просмотреть файл

@ -1,4 +1,11 @@
# Azure Account and Sign-In
<!-- region exclude-from-marketplace -->
[![Version](https://vsmarketplacebadge.apphb.com/version/ms-vscode.azure-account.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/ms-vscode.azure-account.svg)](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) [![Build Status](https://dev.azure.com/ms-azuretools/AzCode/_apis/build/status/vscode-azure-account?branchName=main)](https://dev.azure.com/ms-azuretools/AzCode/_build/latest?definitionId=37&branchName=main)
<!-- endregion exclude-from-marketplace -->
The Azure Account extension provides a single Azure sign-in and subscription filtering experience for all other Azure extensions. It makes Azure's Cloud Shell service available in VS Code's integrated terminal.
## Commands
@ -28,6 +35,8 @@ The Azure Account extension provides a single Azure sign-in and subscription fil
| azure.cloud | The current Azure Cloud to connect to. | Azure
| azure.ppe | Development setting: The PPE environment for testing. |
<!-- region exclude-from-marketplace -->
## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
@ -42,6 +51,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
<!-- endregion exclude-from-marketplace -->
## Telemetry
VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409) to learn more. If you dont wish to send usage data to Microsoft, you can set the `telemetry.enableTelemetry` setting to `false`. Learn more in our [FAQ](https://go.microsoft.com/fwlink/?linkid=870136).

18
gulpfile.ts Normal file
Просмотреть файл

@ -0,0 +1,18 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { readFile, writeFile } from 'fs-extra';
import { join } from 'path';
declare let exports: { [key: string]: unknown };
async function cleanReadme(): Promise<void> {
const readmePath: string = join(__dirname, 'README.md');
let data: string = (await readFile(readmePath)).toString();
data = data.replace(/<!-- region exclude-from-marketplace -->.*?<!-- endregion exclude-from-marketplace -->/gis, '');
await writeFile(readmePath, data);
}
exports.cleanReadme = cleanReadme;

6181
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -207,14 +207,17 @@
"scripts": {
"vscode:prepublish": "rimraf dist && webpack --mode production",
"build": "tsc",
"cleanReadme": "gulp cleanReadme",
"compile": "rimraf dist && webpack --mode none",
"watch": "rimraf dist && webpack --mode none --watch",
"lint": "eslint --ext .ts .",
"lint-fix": "eslint --ext .ts . --fix",
"package": "vsce package --githubBranch main",
"which": "which tsc"
},
"devDependencies": {
"@types/form-data": "2.2.1",
"@types/fs-extra": "^9.0.11",
"@types/http-proxy-agent": "2.0.1",
"@types/keytar": "4.0.1",
"@types/node": "^12.0.0",
@ -229,10 +232,14 @@
"@typescript-eslint/parser": "^4.14.2",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
"fs-extra": "^9.1.0",
"gulp": "^4.0.2",
"rimraf": "2.6.2",
"terser-webpack-plugin": "^5.1.1",
"ts-loader": "5.3.0",
"ts-node": "^10.0.0",
"typescript": "^4.0.2",
"vsce": "^1.91.0",
"webpack": "^5.24.1",
"webpack-cli": "^4.5.0"
},