mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 11:01:37 -05:00
Compare commits
17 Commits
1.26.1_rel
...
1.7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
295004c42e | ||
|
|
45333e8852 | ||
|
|
e1280022d6 | ||
|
|
c90d630703 | ||
|
|
bfcdf28cbc | ||
|
|
1c694cbd3b | ||
|
|
2b0aba119d | ||
|
|
59cc8e5d7f | ||
|
|
f8da5bd1c7 | ||
|
|
26667eb1dc | ||
|
|
5e6a9ca9fa | ||
|
|
4ecf5fae84 | ||
|
|
f76500d5f0 | ||
|
|
2a212edf1e | ||
|
|
7bcd19987b | ||
|
|
0ce5f02dd2 | ||
|
|
0831e9e161 |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"tool": "Credential Scanner",
|
||||
"suppressions": [
|
||||
{
|
||||
"file": "src\\vs\\base\\test\\common\\uri.test.ts",
|
||||
"_justification": "External code"
|
||||
},
|
||||
{
|
||||
"file": "build\\actions\\AutoLabel\\dist\\index.js",
|
||||
"_justification": "False positive from webpacked code"
|
||||
},
|
||||
{
|
||||
"file": "build\\actions\\AutoMerge\\dist\\index.js",
|
||||
"_justification": "False positive from webpacked code"
|
||||
},
|
||||
{
|
||||
"file": ".devcontainer\\devcontainer.json",
|
||||
"_justification": "Local development environment - not used in production"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12
|
||||
|
||||
ARG TARGET_DISPLAY=":1"
|
||||
|
||||
# VNC options
|
||||
ARG MAX_VNC_RESOLUTION=1920x1080x16
|
||||
ARG TARGET_VNC_RESOLUTION=1920x1080
|
||||
ARG TARGET_VNC_DPI=72
|
||||
ARG TARGET_VNC_PORT=5901
|
||||
ARG VNC_PASSWORD="vscode"
|
||||
|
||||
# noVNC (VNC web client) options
|
||||
ARG INSTALL_NOVNC="true"
|
||||
ARG NOVNC_VERSION=1.1.0
|
||||
ARG TARGET_NOVNC_PORT=6080
|
||||
ARG WEBSOCKETIFY_VERSION=0.9.0
|
||||
|
||||
# Firefox is useful for testing things like browser launch events, but optional
|
||||
ARG INSTALL_FIREFOX="false"
|
||||
|
||||
# Expected non-root username from base image
|
||||
ARG USERNAME=node
|
||||
|
||||
# Core environment variables for X11, VNC, and fluxbox
|
||||
ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" \
|
||||
MAX_VNC_RESOLUTION="${MAX_VNC_RESOLUTION}" \
|
||||
VNC_RESOLUTION="${TARGET_VNC_RESOLUTION}" \
|
||||
VNC_DPI="${TARGET_VNC_DPI}" \
|
||||
VNC_PORT="${TARGET_VNC_PORT}" \
|
||||
NOVNC_PORT="${TARGET_NOVNC_PORT}" \
|
||||
DISPLAY="${TARGET_DISPLAY}" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US.UTF-8" \
|
||||
VISUAL="nano" \
|
||||
EDITOR="nano"
|
||||
|
||||
# Configure apt and install packages
|
||||
RUN apt-get update \
|
||||
&& export DEBIAN_FRONTEND=noninteractive \
|
||||
#
|
||||
# Install the Cascadia Code fonts - https://github.com/microsoft/cascadia-code
|
||||
&& curl -sSL https://github.com/microsoft/cascadia-code/releases/download/v2004.30/CascadiaCode_2004.30.zip -o /tmp/cascadia-fonts.zip \
|
||||
&& unzip /tmp/cascadia-fonts.zip -d /tmp/cascadia-fonts \
|
||||
&& mkdir -p /usr/share/fonts/truetype/cascadia \
|
||||
&& mv /tmp/cascadia-fonts/ttf/* /usr/share/fonts/truetype/cascadia/ \
|
||||
&& rm -rf /tmp/cascadia-fonts.zip /tmp/cascadia-fonts \
|
||||
#
|
||||
# Install X11, fluxbox and VS Code dependencies
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
xvfb \
|
||||
x11vnc \
|
||||
fluxbox \
|
||||
dbus-x11 \
|
||||
x11-utils \
|
||||
x11-xserver-utils \
|
||||
xdg-utils \
|
||||
fbautostart \
|
||||
xterm \
|
||||
eterm \
|
||||
gnome-terminal \
|
||||
gnome-keyring \
|
||||
seahorse \
|
||||
nautilus \
|
||||
libx11-dev \
|
||||
libxkbfile-dev \
|
||||
libsecret-1-dev \
|
||||
libnotify4 \
|
||||
libnss3 \
|
||||
libxss1 \
|
||||
libasound2 \
|
||||
libgbm1 \
|
||||
xfonts-base \
|
||||
xfonts-terminus \
|
||||
fonts-noto \
|
||||
fonts-wqy-microhei \
|
||||
fonts-droid-fallback \
|
||||
vim-tiny \
|
||||
nano \
|
||||
#
|
||||
# [Optional] Install noVNC
|
||||
&& if [ "${INSTALL_NOVNC}" = "true" ]; then \
|
||||
mkdir -p /usr/local/novnc \
|
||||
&& curl -sSL https://github.com/novnc/noVNC/archive/v${NOVNC_VERSION}.zip -o /tmp/novnc-install.zip \
|
||||
&& unzip /tmp/novnc-install.zip -d /usr/local/novnc \
|
||||
&& cp /usr/local/novnc/noVNC-${NOVNC_VERSION}/vnc_lite.html /usr/local/novnc/noVNC-${NOVNC_VERSION}/index.html \
|
||||
&& rm /tmp/novnc-install.zip \
|
||||
&& curl -sSL https://github.com/novnc/websockify/archive/v${WEBSOCKETIFY_VERSION}.zip -o /tmp/websockify-install.zip \
|
||||
&& unzip /tmp/websockify-install.zip -d /usr/local/novnc \
|
||||
&& apt-get -y install --no-install-recommends python-numpy \
|
||||
&& ln -s /usr/local/novnc/websockify-${WEBSOCKETIFY_VERSION} /usr/local/novnc/noVNC-${NOVNC_VERSION}/utils/websockify \
|
||||
&& rm /tmp/websockify-install.zip; \
|
||||
fi \
|
||||
#
|
||||
# [Optional] Install Firefox
|
||||
&& if [ "${INSTALL_FIREFOX}" = "true" ]; then \
|
||||
apt-get -y install --no-install-recommends firefox-esr; \
|
||||
fi \
|
||||
#
|
||||
# Clean up
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY bin/init-dev-container.sh /usr/local/share/
|
||||
COPY bin/set-resolution /usr/local/bin/
|
||||
COPY fluxbox/* /root/.fluxbox/
|
||||
COPY fluxbox/* /home/${USERNAME}/.fluxbox/
|
||||
|
||||
# Update privs, owners of config files
|
||||
RUN mkdir -p /var/run/dbus /root/.vnc /home/${USERNAME}/.vnc \
|
||||
&& touch /root/.Xmodmap /home/${USERNAME}/.Xmodmap \
|
||||
&& echo "${VNC_PASSWORD}" | tee /root/.vnc/passwd > /home/${USERNAME}/.vnc/passwd \
|
||||
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.Xmodmap /home/${USERNAME}/.fluxbox /home/${USERNAME}/.vnc \
|
||||
&& chmod +x /usr/local/share/init-dev-container.sh /usr/local/bin/set-resolution
|
||||
|
||||
ENTRYPOINT ["/usr/local/share/init-dev-container.sh"]
|
||||
CMD ["sleep", "infinity"]
|
||||
@@ -1,82 +0,0 @@
|
||||
# Code - OSS Development Container
|
||||
|
||||
This repository includes configuration for a development container for working with Code - OSS in an isolated local container or using [Visual Studio Codespaces](https://aka.ms/vso).
|
||||
|
||||
> **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` with a web client at `6080`. For better performance, we recommend using a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Applications like the macOS Screen Sharing app will not perform as well. [Chicken](https://sourceforge.net/projects/chicken/) is a good macOS alternative.
|
||||
|
||||
## Quick start - local
|
||||
|
||||
1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.)
|
||||
|
||||
2. **Important**: Docker needs at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. If you on macOS, or using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item, going to **Preferences/Settings > Resources > Advanced**.
|
||||
|
||||
> **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar.
|
||||
|
||||
3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension.
|
||||
|
||||

|
||||
|
||||
> Note that the Remote - Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
|
||||
|
||||
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **Remote - Containers: Open Repository in Container...**.
|
||||
|
||||
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or using the Hyper-V engine on Windows. We recommend the "open repository" approach instead since it uses "named volume" rather than the local filesystem.
|
||||
|
||||
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.
|
||||
|
||||
6. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080) or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
|
||||
|
||||
Anything you start in VS Code or the integrated terminal will appear here.
|
||||
|
||||
Next: **[Try it out!](#try-it)**
|
||||
|
||||
## Quick start - Codespaces
|
||||
|
||||
>Note that the Codespaces browser-based editor cannot currently access the desktop environment in this container (due to a [missing feature](https://github.com/MicrosoftDocs/vsonline/issues/117)). We recommend using Visual Studio Code from the desktop to connect instead in the near term.
|
||||
|
||||
1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Visual Studio Codespaces](https://aka.ms/vscs-ext-vscode) extension.
|
||||
|
||||

|
||||
|
||||
> Note that the Visual Studio Codespaces extension requires the Visual Studio Code distribution of Code - OSS.
|
||||
|
||||
2. Sign in by pressing <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and selecting **Codespaces: Sign In**. You may also need to use the **Codespaces: Create Plan** if you do not have a plan. See the [Codespaces docs](https://aka.ms/vso-docs/vscode) for details.
|
||||
|
||||
3. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **Codespaces: Create New Codespace**.
|
||||
|
||||
4. Use default settings (which should include **Standard** 4 core, 8 GB RAM Codespace), select a plan, and then enter the repository URL `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box when prompted.
|
||||
|
||||
5. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080) or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
|
||||
|
||||
6. Anything you start in VS Code or the integrated terminal will appear here.
|
||||
|
||||
## Try it!
|
||||
|
||||
This container uses the [Fluxbox](http://fluxbox.org/) window manager to keep things lean. **Right-click on the desktop** to see menu options. It works with GNOME and GTK applications, so other tools can be installed if needed.
|
||||
|
||||
Note you can also set the resolution from the command line by typing `set-resolution`.
|
||||
|
||||
To start working with Code - OSS, follow these steps:
|
||||
|
||||
1. In your local VS Code, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
bash scripts/code.sh
|
||||
```
|
||||
|
||||
2. After the build is complete, open a web browser and go to [http://localhost:6080](http://localhost:6080) or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
|
||||
|
||||
3. You should now see Code - OSS!
|
||||
|
||||
Next, let's try debugging.
|
||||
|
||||
1. Shut down Code - OSS by clicking the box in the upper right corner of the Code - OSS window through your browser or VNC viewer.
|
||||
|
||||
2. Go to your local VS Code client, and use Run / Debug view to launch the **VS Code** configuration. (Typically the default, so you can likely just press <kbd>F5</kbd>).
|
||||
|
||||
> **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../.vscode/launch.json). However, running `scripts/code.sh` first will set up Electron which will usually solve timeout issues.
|
||||
|
||||
3. After a bit, Code - OSS will appear with the debugger attached!
|
||||
|
||||
Enjoy!
|
||||
@@ -1,91 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
NONROOT_USER=node
|
||||
LOG=/tmp/container-init.log
|
||||
|
||||
# Execute the command it not already running
|
||||
startInBackgroundIfNotRunning()
|
||||
{
|
||||
log "Starting $1."
|
||||
echo -e "\n** $(date) **" | sudoIf tee -a /tmp/$1.log > /dev/null
|
||||
if ! pidof $1 > /dev/null; then
|
||||
keepRunningInBackground "$@"
|
||||
while ! pidof $1 > /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
log "$1 started."
|
||||
else
|
||||
echo "$1 is already running." | sudoIf tee -a /tmp/$1.log > /dev/null
|
||||
log "$1 is already running."
|
||||
fi
|
||||
}
|
||||
|
||||
# Keep command running in background
|
||||
keepRunningInBackground()
|
||||
{
|
||||
($2 sh -c "while :; do echo [\$(date)] Process started.; $3; echo [\$(date)] Process exited!; sleep 5; done 2>&1" | sudoIf tee -a /tmp/$1.log > /dev/null & echo "$!" | sudoIf tee /tmp/$1.pid > /dev/null)
|
||||
}
|
||||
|
||||
# Use sudo to run as root when required
|
||||
sudoIf()
|
||||
{
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
sudo "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Use sudo to run as non-root user if not already running
|
||||
sudoUserIf()
|
||||
{
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
sudo -u ${NONROOT_USER} "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Log messages
|
||||
log()
|
||||
{
|
||||
echo -e "[$(date)] $@" | sudoIf tee -a $LOG > /dev/null
|
||||
}
|
||||
|
||||
log "** SCRIPT START **"
|
||||
|
||||
# Start dbus.
|
||||
log 'Running "/etc/init.d/dbus start".'
|
||||
if [ -f "/var/run/dbus/pid" ] && ! pidof dbus-daemon > /dev/null; then
|
||||
sudoIf rm -f /var/run/dbus/pid
|
||||
fi
|
||||
sudoIf /etc/init.d/dbus start 2>&1 | sudoIf tee -a /tmp/dbus-daemon-system.log > /dev/null
|
||||
while ! pidof dbus-daemon > /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Set up Xvfb.
|
||||
startInBackgroundIfNotRunning "Xvfb" sudoIf "Xvfb ${DISPLAY:-:1} +extension RANDR -screen 0 ${MAX_VNC_RESOLUTION:-1920x1080x16}"
|
||||
|
||||
# Start fluxbox as a light weight window manager.
|
||||
startInBackgroundIfNotRunning "fluxbox" sudoUserIf "dbus-launch startfluxbox"
|
||||
|
||||
# Start x11vnc
|
||||
startInBackgroundIfNotRunning "x11vnc" sudoIf "x11vnc -display ${DISPLAY:-:1} -rfbport ${VNC_PORT:-5901} -localhost -no6 -xkb -shared -forever -passwdfile $HOME/.vnc/passwd"
|
||||
|
||||
# Set resolution
|
||||
/usr/local/bin/set-resolution ${VNC_RESOLUTION:-1280x720} ${VNC_DPI:-72}
|
||||
|
||||
|
||||
# Spin up noVNC if installed and not runnning.
|
||||
if [ -d "/usr/local/novnc" ] && [ "$(ps -ef | grep /usr/local/novnc/noVNC*/utils/launch.sh | grep -v grep)" = "" ]; then
|
||||
keepRunningInBackground "noVNC" sudoIf "/usr/local/novnc/noVNC*/utils/launch.sh --listen ${NOVNC_PORT:-6080} --vnc localhost:${VNC_PORT:-5901}"
|
||||
log "noVNC started."
|
||||
else
|
||||
log "noVNC is already running or not installed."
|
||||
fi
|
||||
|
||||
# Run whatever was passed in
|
||||
log "Executing \"$@\"."
|
||||
"$@"
|
||||
log "** SCRIPT EXIT **"
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
RESOLUTION=${1:-${VNC_RESOLUTION:-1920x1080}}
|
||||
DPI=${2:-${VNC_DPI:-72}}
|
||||
if [ -z "$1" ]; then
|
||||
echo -e "**Current Settings **\n"
|
||||
xrandr
|
||||
echo -n -e "\nEnter new resolution (WIDTHxHEIGHT, blank for ${RESOLUTION}, Ctrl+C to abort).\n> "
|
||||
read NEW_RES
|
||||
if [ "${NEW_RES}" != "" ]; then
|
||||
RESOLUTION=${NEW_RES}
|
||||
fi
|
||||
if [ -z "$2" ]; then
|
||||
echo -n -e "\nEnter new DPI (blank for ${DPI}, Ctrl+C to abort).\n> "
|
||||
read NEW_DPI
|
||||
if [ "${NEW_DPI}" != "" ]; then
|
||||
DPI=${NEW_DPI}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
xrandr --fb ${RESOLUTION} --dpi ${DPI} > /dev/null 2>&1
|
||||
|
||||
echo -e "\n**New Settings **\n"
|
||||
xrandr
|
||||
echo
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"name": "Code - OSS",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
"MAX_VNC_RESOLUTION": "1920x1080x16",
|
||||
"TARGET_VNC_RESOLUTION": "1280x768",
|
||||
"TARGET_VNC_PORT": "5901",
|
||||
"TARGET_NOVNC_PORT": "6080",
|
||||
"VNC_PASSWORD": "vscode",
|
||||
"INSTALL_FIREFOX": "true"
|
||||
}
|
||||
},
|
||||
"overrideCommand": false,
|
||||
"runArgs": [
|
||||
"--init",
|
||||
// seccomp=unconfined is required for Chrome sandboxing
|
||||
"--security-opt", "seccomp=unconfined"
|
||||
],
|
||||
|
||||
"settings": {
|
||||
// zsh is also available
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"resmon.show.battery": false,
|
||||
"resmon.show.cpufreq": false,
|
||||
"remote.extensionKind": {
|
||||
"ms-vscode.js-debug-nightly": "workspace",
|
||||
"msjsdiag.debugger-for-chrome": "workspace"
|
||||
},
|
||||
"debug.chrome.useV3": true
|
||||
},
|
||||
|
||||
// noVNC, VNC ports
|
||||
"forwardPorts": [6080, 5901],
|
||||
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"msjsdiag.debugger-for-chrome",
|
||||
"mutantdino.resourcemonitor",
|
||||
"GitHub.vscode-pull-request-github"
|
||||
],
|
||||
|
||||
"remoteUser": "node"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
[app] (name=code-oss-dev)
|
||||
[Position] (CENTER) {0 0}
|
||||
[Maximized] {yes}
|
||||
[Dimensions] {100% 100%}
|
||||
[end]
|
||||
[transient] (role=GtkFileChooserDialog)
|
||||
[Position] (CENTER) {0 0}
|
||||
[Dimensions] {70% 70%}
|
||||
[end]
|
||||
@@ -1,9 +0,0 @@
|
||||
session.menuFile: ~/.fluxbox/menu
|
||||
session.keyFile: ~/.fluxbox/keys
|
||||
session.styleFile: /usr/share/fluxbox/styles//Squared_for_Debian
|
||||
session.configVersion: 13
|
||||
session.screen0.workspaces: 1
|
||||
session.screen0.workspacewarping: false
|
||||
session.screen0.toolbar.widthPercent: 100
|
||||
session.screen0.strftimeFormat: %d %b, %a %02k:%M:%S
|
||||
session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, clock, prevwindow, nextwindow, iconbar, systemtray
|
||||
@@ -1,16 +0,0 @@
|
||||
[begin] ( Code - OSS Development Container )
|
||||
[exec] (File Manager) { nautilus ~ } <>
|
||||
[exec] (Terminal) {/usr/bin/gnome-terminal --working-directory=~ } <>
|
||||
[exec] (Start Code - OSS) { x-terminal-emulator -T "Code - OSS Build" -e bash /workspaces/vscode*/scripts/code.sh } <>
|
||||
[submenu] (System >) {}
|
||||
[exec] (Set Resolution) { x-terminal-emulator -T "Set Resolution" -e bash /usr/local/bin/set-resolution } <>
|
||||
[exec] (Passwords and Keys) { seahorse } <>
|
||||
[exec] (Top) { x-terminal-emulator -T "Top" -e /usr/bin/top } <>
|
||||
[exec] (Editres) {editres} <>
|
||||
[exec] (Xfontsel) {xfontsel} <>
|
||||
[exec] (Xkill) {xkill} <>
|
||||
[exec] (Xrefresh) {xrefresh} <>
|
||||
[end]
|
||||
[config] (Configuration >)
|
||||
[workspaces] (Workspaces >)
|
||||
[end]
|
||||
@@ -1,16 +0,0 @@
|
||||
**/vs/nls.build.js
|
||||
**/vs/nls.js
|
||||
**/vs/css.build.js
|
||||
**/vs/css.js
|
||||
**/vs/loader.js
|
||||
**/insane/**
|
||||
**/marked/**
|
||||
**/markjs/**
|
||||
**/test/**/*.js
|
||||
**/node_modules/**
|
||||
**/vscode-api-tests/testWorkspace/**
|
||||
**/vscode-api-tests/testWorkspace2/**
|
||||
**/extensions/**/out/**
|
||||
**/extensions/**/build/**
|
||||
**/extensions/markdown-language-features/media/**
|
||||
**/extensions/typescript-basics/test/colorize-fixtures/**
|
||||
1066
.eslintrc.json
1066
.eslintrc.json
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.sql.json"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"jsdoc"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-floating-promises": [
|
||||
"error",
|
||||
{
|
||||
"ignoreVoid": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
16
.github/CODEOWNERS
vendored
16
.github/CODEOWNERS
vendored
@@ -1,16 +0,0 @@
|
||||
# Lines starting with '#' are comments.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
# Syntax can be found here: https://docs.github.com/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
|
||||
|
||||
/extensions/admin-tool-ext-win @Charles-Gagnon
|
||||
/extensions/arc/ @Charles-Gagnon
|
||||
/extensions/azdata/ @Charles-Gagnon
|
||||
/extensions/big-data-cluster/ @Charles-Gagnon
|
||||
/extensions/dacpac/ @kisantia
|
||||
/extensions/query-history/ @Charles-Gagnon
|
||||
/extensions/resource-deployment/ @Charles-Gagnon
|
||||
/extensions/schema-compare/ @kisantia
|
||||
/extensions/sql-database-projects/ @Benjin @kisantia
|
||||
/extensions/mssql/config.json @Charles-Gagnon @alanrenmsft @kburtram
|
||||
|
||||
/src/sql/*.d.ts @alanrenmsft @Charles-Gagnon
|
||||
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,12 +2,11 @@
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
|
||||
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
|
||||
|
||||
<!-- Please search existing issues to avoid creating duplicates. -->
|
||||
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed. -->
|
||||
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: Enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
76
.github/classifier.yml
vendored
76
.github/classifier.yml
vendored
@@ -1,39 +1,49 @@
|
||||
{
|
||||
perform: true,
|
||||
perform: false,
|
||||
alwaysRequireAssignee: false,
|
||||
labelsRequiringAssignee: [],
|
||||
defaultLabel: 'Triage: Needed',
|
||||
defaultAssignee: '',
|
||||
autoAssignees: {
|
||||
Area - Acquisition: [],
|
||||
Area - Azure: [],
|
||||
Area - Backup\Restore: [],
|
||||
Area - Big Data Cluster: [ charles-gagnon ],
|
||||
Area - Charting\Insights: [],
|
||||
Area - Connection: [ ],
|
||||
Area - DacFX: [],
|
||||
Area - Dashboard: [],
|
||||
Area - Data Explorer: [],
|
||||
Area - Data Virtualization: [ charles-gagnon ],
|
||||
Area - Edit Data: [],
|
||||
Area - Extensibility: [],
|
||||
Area - External Table: [],
|
||||
Area - Fundamentals: [],
|
||||
Area - Language Service: [ charles-gagnon ],
|
||||
Area - Localization: [],
|
||||
Area - Notebooks: [ chlafreniere ],
|
||||
Area - Performance: [],
|
||||
Area - Query Editor: [ anthonydresser ],
|
||||
Area - Query History: [ charles-gagnon ],
|
||||
Area - Query Plan: [],
|
||||
Area - Reliability: [],
|
||||
Area - Resource Deployment: [],
|
||||
Area - Schema Compare: [],
|
||||
Area - Shell: [],
|
||||
Area - SQL Agent: [],
|
||||
Area - SQL Import: [],
|
||||
Area - SQL Profiler: [],
|
||||
Area - SQL 2019: [],
|
||||
Area - SSMS Integration: []
|
||||
accessibility: [],
|
||||
acquisition: [],
|
||||
agent: [],
|
||||
azure: [],
|
||||
backup: [],
|
||||
bcdr: [],
|
||||
'chart viewer': [],
|
||||
connection: [],
|
||||
dacfx: [],
|
||||
dashboard: [],
|
||||
'data explorer': [],
|
||||
documentation: [],
|
||||
'edit data': [],
|
||||
export: [],
|
||||
extensibility: [],
|
||||
extensionManager: [],
|
||||
globalization: [],
|
||||
grid: [],
|
||||
import: [],
|
||||
insights: [],
|
||||
intellisense: [],
|
||||
localization: [],
|
||||
'managed instance': [],
|
||||
notebooks: [],
|
||||
'object explorer': [],
|
||||
performance: [],
|
||||
profiler: [],
|
||||
'query editor': [],
|
||||
'query execution': [],
|
||||
reliability: [],
|
||||
restore: [],
|
||||
scripting: [],
|
||||
'server group': [],
|
||||
settings: [],
|
||||
setup: [],
|
||||
shell: [],
|
||||
showplan: [],
|
||||
snippet: [],
|
||||
sql2019Preview: [],
|
||||
sqldw: [],
|
||||
supportability: [],
|
||||
ux: []
|
||||
}
|
||||
}
|
||||
|
||||
9
.github/commands.yml
vendored
9
.github/commands.yml
vendored
@@ -1,11 +1,12 @@
|
||||
{
|
||||
perform: true,
|
||||
perform: false,
|
||||
commands: [
|
||||
{
|
||||
type: 'label',
|
||||
name: 'Needs Logs',
|
||||
action: 'comment',
|
||||
comment: "We need more info to debug your particular issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster.\n\nTo find your logs:\n\n- Open command palette (Click **View** -> **Command Palette**)\n- Run the command: **`Developer: Open Logs Folder`**\n\nThis will open the log file locally. Please include renderer.log"
|
||||
name: 'duplicate',
|
||||
allowTriggerByBot: true,
|
||||
action: 'close',
|
||||
comment: "Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues [here](https://aka.ms/vscodeissuesearch). See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
2
.github/copycat.yml
vendored
2
.github/copycat.yml
vendored
@@ -1,5 +1,5 @@
|
||||
{
|
||||
perform: false,
|
||||
perform: true,
|
||||
target_owner: 'anthonydresser',
|
||||
target_repo: 'testissues'
|
||||
}
|
||||
|
||||
27
.github/label-actions.yml
vendored
27
.github/label-actions.yml
vendored
@@ -1,27 +0,0 @@
|
||||
Needs Logs:
|
||||
comment: "We need more info to debug your particular issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster.
|
||||
|
||||
|
||||
There are two types of logs to collect:
|
||||
|
||||
|
||||
**Console Logs**
|
||||
|
||||
|
||||
- Open Developer Tools (Help -> Toggle Developer Tools)
|
||||
|
||||
- Click the **Console** tab
|
||||
|
||||
- Click in the log area and select all text (CTRL+A)
|
||||
|
||||
- Save this text into a file named console.log and attach it to this issue.
|
||||
|
||||
|
||||
**Application Logs**
|
||||
|
||||
|
||||
- Open command palette (Click **View** -> **Command Palette**)
|
||||
|
||||
- Run the command: **`Developer: Open Logs Folder`**
|
||||
|
||||
- This will open the log folder locally. Please zip up this folder and attach it to the issue."
|
||||
2
.github/locker.yml
vendored
2
.github/locker.yml
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
daysAfterClose: 45,
|
||||
daysSinceLastUpdate: 3,
|
||||
ignoredLabels: ['A11y_ADS_OctTestPass', 'A11y_ADS_Schema_Dacpac_Backup', 'A11y_AzureDataStudio', 'A11yExclusion', 'A11yMAS', 'A11yResolved: Will Not Fix', 'A11yTCS'],
|
||||
ignoredLabels: [],
|
||||
perform: true
|
||||
}
|
||||
|
||||
7
.github/mergers.json
vendored
7
.github/mergers.json
vendored
@@ -1,7 +0,0 @@
|
||||
[
|
||||
"kenvanhyning",
|
||||
"kburtram",
|
||||
"udeeshagautam",
|
||||
"qifahs",
|
||||
"chlafreniere"
|
||||
]
|
||||
6
.github/new_release.yml
vendored
Normal file
6
.github/new_release.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
newReleaseLabel: 'new-release',
|
||||
newReleaseColor: '006b75',
|
||||
daysAfterRelease: 5,
|
||||
perform: true
|
||||
}
|
||||
9
.github/pull_request_template.md
vendored
9
.github/pull_request_template.md
vendored
@@ -1,9 +0,0 @@
|
||||
<!-- Thank you for submitting a Pull Request. Please:
|
||||
* Read our Pull Request guidelines:
|
||||
https://github.com/Microsoft/azuredatastudio/wiki/How-to-Contribute#pull-requests.
|
||||
* Associate an issue with the Pull Request.
|
||||
* Ensure that the code is up-to-date with the `main` branch.
|
||||
* Include a description of the proposed changes and how to test them.
|
||||
-->
|
||||
|
||||
This PR fixes #
|
||||
6
.github/stale.yml
vendored
6
.github/stale.yml
vendored
@@ -1,6 +0,0 @@
|
||||
{
|
||||
perform: true,
|
||||
label: 'Stale PR',
|
||||
daysSinceLastUpdate: 7,
|
||||
ignoredLabels: ['Do Not Merge']
|
||||
}
|
||||
7
.github/subscribers.json
vendored
7
.github/subscribers.json
vendored
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label-to-subscribe-to": [
|
||||
"list of usernames to subscribe",
|
||||
"such as:",
|
||||
"JacksonKearl"
|
||||
]
|
||||
}
|
||||
171
.github/workflows/ci.yml
vendored
171
.github/workflows/ci.yml
vendored
@@ -1,171 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CHILD_CONCURRENCY: "1"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libkrb5-dev # {{SQL CARBON EDIT}} add kerberos dep
|
||||
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
||||
sudo chmod +x /etc/init.d/xvfb
|
||||
sudo update-rc.d xvfb defaults
|
||||
sudo service xvfb start
|
||||
name: Setup Build Environment
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
# TODO: cache node modules
|
||||
# Increase timeout to get around latency issues when fetching certain packages
|
||||
- run: |
|
||||
yarn config set network-timeout 300000
|
||||
yarn --frozen-lockfile
|
||||
name: Install Dependencies
|
||||
- run: yarn electron x64
|
||||
name: Download Electron
|
||||
- run: yarn gulp hygiene
|
||||
name: Run Hygiene Checks
|
||||
- run: yarn strict-vscode # {{SQL CARBON EDIT}} add step
|
||||
name: Run Strict Compile Options
|
||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
||||
# name: Run Monaco Editor Checks
|
||||
- run: yarn valid-layers-check
|
||||
name: Run Valid Layers Checks
|
||||
- run: yarn compile
|
||||
name: Compile Sources
|
||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
||||
# name: Download Built-in Extensions
|
||||
- run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests" --coverage --runGlob "**/sql/**/*.test.js"
|
||||
name: Run Unit Tests (Electron)
|
||||
- run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
||||
name: Run Extension Unit Tests (Electron)
|
||||
# {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
|
||||
- run: node test/combineCoverage
|
||||
name: Combine code coverage files
|
||||
- name: Upload Code Coverage
|
||||
uses: coverallsapp/github-action@v1.1.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path-to-lcov: 'test/coverage/lcov.info'
|
||||
|
||||
# Fails with cryptic error (e.g. https://github.com/microsoft/vscode/pull/90292/checks?check_run_id=433681926#step:13:9)
|
||||
# - run: DISPLAY=:10 yarn test-browser --browser chromium
|
||||
# name: Run Unit Tests (Browser)
|
||||
# - run: DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests" {{SQL CARBON EDIT}} remove step
|
||||
# name: Run Integration Tests (Electron)
|
||||
|
||||
windows:
|
||||
runs-on: windows-2016
|
||||
env:
|
||||
CHILD_CONCURRENCY: "1"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '2.x'
|
||||
# Increase timeout to get around latency issues when fetching certain packages
|
||||
- run: |
|
||||
yarn config set network-timeout 300000
|
||||
yarn --frozen-lockfile
|
||||
name: Install Dependencies
|
||||
- run: yarn electron
|
||||
name: Download Electron
|
||||
- run: yarn gulp hygiene
|
||||
name: Run Hygiene Checks
|
||||
- run: yarn strict-vscode # {{SQL CARBON EDIT}} add step
|
||||
name: Run Strict Compile Options
|
||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
||||
# name: Run Monaco Editor Checks
|
||||
- run: yarn valid-layers-check
|
||||
name: Run Valid Layers Checks
|
||||
- run: yarn compile
|
||||
name: Compile Sources
|
||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
||||
# name: Download Built-in Extensions
|
||||
- run: .\scripts\test.bat --tfs "Unit Tests"
|
||||
name: Run Unit Tests (Electron)
|
||||
# - run: yarn test-browser --browser chromium {{SQL CARBON EDIT}} disable for now @TODO @anthonydresser
|
||||
# name: Run Unit Tests (Browser)
|
||||
# - run: .\scripts\test-integration.bat --tfs "Integration Tests" {{SQL CARBON EDIT}} remove step
|
||||
# name: Run Integration Tests (Electron)
|
||||
|
||||
darwin:
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
CHILD_CONCURRENCY: "1"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
# Increase timeout to get around latency issues when fetching certain packages
|
||||
- run: |
|
||||
yarn config set network-timeout 300000
|
||||
yarn --frozen-lockfile
|
||||
name: Install Dependencies
|
||||
- run: yarn electron x64
|
||||
name: Download Electron
|
||||
- run: yarn gulp hygiene
|
||||
name: Run Hygiene Checks
|
||||
- run: yarn strict-vscode # {{SQL CARBON EDIT}} add step
|
||||
name: Run Strict Compile Options
|
||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
||||
# name: Run Monaco Editor Checks
|
||||
- run: yarn valid-layers-check
|
||||
name: Run Valid Layers Checks
|
||||
- run: yarn compile
|
||||
name: Compile Sources
|
||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
||||
# name: Download Built-in Extensions
|
||||
- run: ./scripts/test.sh --tfs "Unit Tests"
|
||||
name: Run Unit Tests (Electron)
|
||||
# - run: yarn test-browser --browser chromium --browser webkit
|
||||
# name: Run Unit Tests (Browser)
|
||||
# - run: ./scripts/test-integration.sh --tfs "Integration Tests"
|
||||
# name: Run Integration Tests (Electron)
|
||||
|
||||
# monaco:
|
||||
# runs-on: ubuntu-latest
|
||||
# env:
|
||||
# CHILD_CONCURRENCY: "1"
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2.2.0
|
||||
# # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||
# - run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
|
||||
# sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
||||
# sudo chmod +x /etc/init.d/xvfb
|
||||
# sudo update-rc.d xvfb defaults
|
||||
# sudo service xvfb start
|
||||
# name: Setup Build Environment
|
||||
# - uses: actions/setup-node@v1
|
||||
# with:
|
||||
# node-version: 10
|
||||
# - run: yarn --frozen-lockfile
|
||||
# name: Install Dependencies
|
||||
# - run: yarn monaco-compile-check
|
||||
# name: Run Monaco Editor Checks
|
||||
# - run: yarn gulp editor-esm-bundle
|
||||
# name: Editor Distro & ESM Bundle
|
||||
46
.github/workflows/codeql.yml
vendored
46
.github/workflows/codeql.yml
vendored
@@ -1,46 +0,0 @@
|
||||
name: "Code Scanning - Action"
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
|
||||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
50
.github/workflows/deep-classifier-runner.yml
vendored
50
.github/workflows/deep-classifier-runner.yml
vendored
@@ -1,50 +0,0 @@
|
||||
name: "Deep Classifier: Runner"
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
repository_dispatch:
|
||||
types: [trigger-deep-classifier-runner]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode-github-triage-actions'
|
||||
ref: v35
|
||||
path: ./actions
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Install Additional Dependencies
|
||||
# Pulls in a bunch of other packages that arent needed for the rest of the actions
|
||||
run: npm install @azure/storage-blob@12.1.1
|
||||
- name: "Run Classifier: Scraper"
|
||||
uses: ./actions/classifier-deep/apply/fetch-sources
|
||||
with:
|
||||
# slightly overlapping to protect against issues slipping through the cracks if a run is delayed
|
||||
from: 80
|
||||
until: 5
|
||||
configPath: classifier
|
||||
blobContainerName: vscode-issue-classifier
|
||||
blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
|
||||
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
|
||||
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade numpy scipy scikit-learn joblib nltk simpletransformers torch torchvision
|
||||
- name: "Run Classifier: Generator"
|
||||
run: python ./actions/classifier-deep/apply/generate-labels/main.py
|
||||
- name: "Run Classifier: Labeler"
|
||||
uses: ./actions/classifier-deep/apply/apply-labels
|
||||
with:
|
||||
configPath: classifier
|
||||
allowLabels: "needs more info|new release"
|
||||
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
||||
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
|
||||
27
.github/workflows/deep-classifier-scraper.yml
vendored
27
.github/workflows/deep-classifier-scraper.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: "Deep Classifier: Scraper"
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [trigger-deep-classifier-scraper]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode-github-triage-actions'
|
||||
ref: v35
|
||||
path: ./actions
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Install Additional Dependencies
|
||||
# Pulls in a bunch of other packages that arent needed for the rest of the actions
|
||||
run: npm install @azure/storage-blob@12.1.1
|
||||
- name: "Run Classifier: Scraper"
|
||||
uses: ./actions/classifier-deep/train/fetch-issues
|
||||
with:
|
||||
blobContainerName: vscode-issue-classifier
|
||||
blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
|
||||
token: ${{secrets.ISSUE_SCRAPER_TOKEN}}
|
||||
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
||||
27
.github/workflows/latest-release-monitor.yml
vendored
27
.github/workflows/latest-release-monitor.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: Latest Release Monitor
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0/5 * * * *
|
||||
repository_dispatch:
|
||||
types: [trigger-latest-release-monitor]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode-github-triage-actions'
|
||||
path: ./actions
|
||||
ref: v35
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Install Storage Module
|
||||
run: npm install @azure/storage-blob@12.1.1
|
||||
- name: Run Latest Release Monitor
|
||||
uses: ./actions/latest-release-monitor
|
||||
with:
|
||||
storageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}}
|
||||
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
||||
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
|
||||
24
.github/workflows/on-issue-open.yml
vendored
24
.github/workflows/on-issue-open.yml
vendored
@@ -1,24 +0,0 @@
|
||||
name: On Issue Open
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2.2.0
|
||||
with:
|
||||
repository: 'microsoft/azuredatastudio'
|
||||
ref: main
|
||||
path: ./actions
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions/build/actions
|
||||
|
||||
- name: Run CopyCat
|
||||
uses: ./actions/build/actions/copycat
|
||||
with:
|
||||
token: ${{secrets.TRIAGE_PAT}}
|
||||
owner: anthonydresser
|
||||
repo: testissues
|
||||
15
.github/workflows/on-label.yml
vendored
15
.github/workflows/on-label.yml
vendored
@@ -1,15 +0,0 @@
|
||||
name: On Label
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
processLabelAction:
|
||||
name: Process Label Action
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Process Label Action
|
||||
uses: hramos/label-actions@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
23
.github/workflows/on-pr-open.yml
vendored
23
.github/workflows/on-pr-open.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: On PR Open
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- release/**
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/azuredatastudio'
|
||||
ref: main
|
||||
path: ./actions
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions/build/actions
|
||||
|
||||
- name: Run Port Labeler
|
||||
uses: ./actions/build/actions/auto-labeler
|
||||
with:
|
||||
label: "Port Request"
|
||||
14
.gitignore
vendored
14
.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
.DS_Store
|
||||
.cache
|
||||
npm-debug.log
|
||||
Thumbs.db
|
||||
node_modules/
|
||||
@@ -11,25 +10,12 @@ out-editor/
|
||||
out-editor-src/
|
||||
out-editor-build/
|
||||
out-editor-esm/
|
||||
out-editor-esm-bundle/
|
||||
out-editor-min/
|
||||
out-monaco-editor-core/
|
||||
out-vscode/
|
||||
out-vscode-min/
|
||||
out-vscode-reh/
|
||||
out-vscode-reh-min/
|
||||
out-vscode-reh-pkg/
|
||||
out-vscode-reh-web/
|
||||
out-vscode-reh-web-min/
|
||||
out-vscode-reh-web-pkg/
|
||||
out-vscode-web/
|
||||
out-vscode-web-min/
|
||||
out-vscode-web-pkg/
|
||||
src/vs/server
|
||||
resources/server
|
||||
build/node_modules
|
||||
coverage/
|
||||
test_data/
|
||||
test-results/
|
||||
yarn-error.log
|
||||
*.vsix
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* @name No floating promises
|
||||
* @kind problem
|
||||
* @problem.severity error
|
||||
* @id js/experimental/floating-promise
|
||||
*/
|
||||
import javascript
|
||||
|
||||
private predicate isEscapingPromise(PromiseDefinition promise) {
|
||||
exists (DataFlow::Node escape | promise.flowsTo(escape) |
|
||||
escape = any(DataFlow::InvokeNode invk).getAnArgument()
|
||||
or
|
||||
escape = any(DataFlow::FunctionNode fun).getAReturn()
|
||||
or
|
||||
escape = any(ThrowStmt t).getExpr().flow()
|
||||
or
|
||||
escape = any(GlobalVariable v).getAnAssignedExpr().flow()
|
||||
or
|
||||
escape = any(DataFlow::PropWrite write).getRhs()
|
||||
or
|
||||
exists(WithStmt with, Assignment assign |
|
||||
with.mayAffect(assign.getLhs()) and
|
||||
assign.getRhs().flow() = escape
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
from PromiseDefinition promise
|
||||
where
|
||||
not exists(promise.getAMethodCall(any(string m | m = "then" or m = "catch" or m = "finally"))) and
|
||||
not exists (AwaitExpr e | promise.flowsTo(e.getOperand().flow())) and
|
||||
not isEscapingPromise(promise)
|
||||
select promise, "This promise appears to be a floating promise"
|
||||
70
.vscode/cglicenses.schema.json
vendored
70
.vscode/cglicenses.schema.json
vendored
@@ -1,61 +1,23 @@
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"prependLicenseText"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the dependency"
|
||||
},
|
||||
"fullLicenseText": {
|
||||
"type": "array",
|
||||
"description": "The complete license text of the dependency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"prependLicenseText": {
|
||||
"type": "array",
|
||||
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"licenseDetail"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the dependency"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"fullLicenseText"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the dependency"
|
||||
},
|
||||
"fullLicenseText": {
|
||||
"type": "array",
|
||||
"description": "The complete license text of the dependency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"prependLicenseText": {
|
||||
"type": "array",
|
||||
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"licenseDetail": {
|
||||
"type": "array",
|
||||
"description": "The complete license text of the dependency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@@ -2,8 +2,8 @@
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"msjsdiag.debugger-for-chrome"
|
||||
]
|
||||
}
|
||||
|
||||
235
.vscode/launch.json
vendored
235
.vscode/launch.json
vendored
@@ -14,25 +14,19 @@
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"restart": true,
|
||||
"name": "Attach to Extension Host",
|
||||
"timeout": 30000,
|
||||
"port": 5870,
|
||||
"restart": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js",
|
||||
"${workspaceFolder}/extensions/*/out/**/*.js"
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "pwa-chrome",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"name": "Attach to Shared Process",
|
||||
"timeout": 30000,
|
||||
"port": 9222,
|
||||
"urlFilter": "*sharedProcess.html*",
|
||||
"presentation": {
|
||||
"hidden": true
|
||||
}
|
||||
"urlFilter": "*"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
@@ -41,10 +35,7 @@
|
||||
"port": 5876,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
@@ -59,14 +50,10 @@
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to Main Process",
|
||||
"timeout": 30000,
|
||||
"port": 5875,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
@@ -75,9 +62,48 @@
|
||||
"port": 9222
|
||||
},
|
||||
{
|
||||
"type": "pwa-chrome",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch azuredatastudio",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat",
|
||||
"timeout": 20000
|
||||
},
|
||||
"osx": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||
"timeout": 20000
|
||||
},
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||
"timeout": 20000
|
||||
},
|
||||
"env": {
|
||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
||||
},
|
||||
"breakOnLoad": false,
|
||||
"urlFilter": "*workbench.html*",
|
||||
"runtimeArgs": [
|
||||
"--inspect=5875",
|
||||
"--no-cached-data"
|
||||
],
|
||||
"webRoot": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch ADS (Main Process)",
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||
"runtimeArgs": [
|
||||
"--no-cached-data"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch azuredatastudio with new notebook command",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat"
|
||||
},
|
||||
@@ -87,96 +113,25 @@
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
||||
},
|
||||
"port": 9222,
|
||||
"timeout": 20000,
|
||||
"env": {
|
||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
|
||||
"VSCODE_SKIP_PRELAUNCH": "1"
|
||||
},
|
||||
"cleanUp": "wholeBrowser",
|
||||
"urlFilter": "*workbench.html*",
|
||||
"urlFilter": "*index.html*",
|
||||
"runtimeArgs": [
|
||||
"--inspect=5875",
|
||||
"--no-cached-data",
|
||||
"--command=notebook.command.new"
|
||||
],
|
||||
"skipFiles": [
|
||||
"**/winjs*.js"
|
||||
],
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"cascadeTerminateToConfigurations": [
|
||||
"Attach to Extension Host"
|
||||
],
|
||||
"userDataDir": false,
|
||||
"pauseForSourceMap": false,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"browserLaunchLocation": "workspace",
|
||||
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
||||
"timeout": 45000
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"name": "Launch Built-in Extension",
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"name": "Launch ADS (Web) (TBD)",
|
||||
"program": "${workspaceFolder}/resources/web/code-web.js",
|
||||
"presentation": {
|
||||
"group": "0_vscode",
|
||||
"order": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Main Process",
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.bat",
|
||||
},
|
||||
"runtimeArgs": [
|
||||
"--no-cached-data"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "1_vscode",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch ADS (Web, Chrome) (TBD)",
|
||||
"url": "http://localhost:8080",
|
||||
"preLaunchTask": "Run web",
|
||||
"presentation": {
|
||||
"group": "0_vscode",
|
||||
"order": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "pwa-msedge",
|
||||
"request": "launch",
|
||||
"name": "VS Code (Web, Edge)",
|
||||
"url": "http://localhost:8080",
|
||||
"pauseForSourceMap": false,
|
||||
"preLaunchTask": "Run web",
|
||||
"presentation": {
|
||||
"group": "0_vscode",
|
||||
"order": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Git Unit Tests",
|
||||
"program": "${workspaceFolder}/extensions/git/node_modules/mocha/bin/_mocha",
|
||||
"stopOnEntry": false,
|
||||
"cwd": "${workspaceFolder}/extensions/git",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/extensions/git/out/**/*.js"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "5_tests",
|
||||
"order": 10
|
||||
}
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceRoot}/extensions/debug-auto-launch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
@@ -186,17 +141,13 @@
|
||||
"cwd": "${workspaceFolder}/test/smoke",
|
||||
"env": {
|
||||
"BUILD_ARTIFACTSTAGINGDIRECTORY": "${workspaceFolder}"
|
||||
},
|
||||
"presentation": {
|
||||
"group": "5_tests",
|
||||
"order": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Run Unit Tests",
|
||||
"program": "${workspaceFolder}/test/unit/electron/index.js",
|
||||
"program": "${workspaceFolder}/test/electron/index.js",
|
||||
"runtimeExecutable": "${workspaceFolder}/.build/electron/Azure Data Studio.app/Contents/MacOS/Electron",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/.build/electron/azuredatastudio.exe"
|
||||
@@ -211,13 +162,7 @@
|
||||
"cwd": "${workspaceFolder}",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"env": {
|
||||
"MOCHA_COLORS": "true"
|
||||
},
|
||||
"presentation": {
|
||||
"hidden": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
@@ -235,22 +180,6 @@
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 45000
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Run Extension Integration Tests",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.bat"
|
||||
},
|
||||
"osx": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
|
||||
},
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
|
||||
},
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 45000
|
||||
},
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
@@ -268,53 +197,25 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Azure Data Studio",
|
||||
"stopAll": true,
|
||||
"name": "Debug azuredatastudio Main and Renderer",
|
||||
"configurations": [
|
||||
"Launch azuredatastudio",
|
||||
"Attach to Main Process",
|
||||
"Attach to Extension Host",
|
||||
"Attach to Shared Process",
|
||||
],
|
||||
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
||||
"presentation": {
|
||||
"group": "0_vscode",
|
||||
"order": 1
|
||||
}
|
||||
"Attach to Main Process"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug azuredatastudio Main, Renderer & Extension Host",
|
||||
"name": "Search and Renderer processes",
|
||||
"configurations": [
|
||||
"Launch azuredatastudio",
|
||||
"Attach to Main Process",
|
||||
"Attach to Extension Host"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "1_vscode",
|
||||
"order": 3
|
||||
}
|
||||
"Attach to Search Process"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug Renderer and Extension Host processes",
|
||||
"name": "Renderer and Extension Host processes",
|
||||
"configurations": [
|
||||
"Launch azuredatastudio",
|
||||
"Attach to Extension Host"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "1_vscode",
|
||||
"order": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Attach Renderer and Extension Host",
|
||||
"configurations": [
|
||||
"Attach to azuredatastudio",
|
||||
"Attach to Extension Host"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "1_vscode",
|
||||
"order": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
38
.vscode/notebooks/api.github-issues
vendored
38
.vscode/notebooks/api.github-issues
vendored
@@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Config",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"September 2020\"",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### Finalization",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repo $milestone label:api-finalization",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### Proposals",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repo $milestone is:open label:api-proposal ",
|
||||
"editable": true
|
||||
}
|
||||
]
|
||||
50
.vscode/notebooks/inbox.github-issues
vendored
50
.vscode/notebooks/inbox.github-issues
vendored
@@ -1,50 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "##### `Config`: defines the inbox query",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$inbox=repo:microsoft/vscode is:open no:assignee -label:feature-request -label:testplan-item -label:plan-item ",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "## Inbox tracking and Issue triage",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "New issues or pull requests submitted by the community are initially triaged by an [automatic classification bot](https://github.com/microsoft/vscode-github-triage-actions/tree/master/classifier-deep). Issues that the bot does not correctly triage are then triaged by a team member. The team rotates the inbox tracker on a weekly basis.\n\nA [mirror](https://github.com/JacksonKearl/testissues/issues) of the VS Code issue stream is available with details about how the bot classifies issues, including feature-area classifications and confidence ratings. Per-category confidence thresholds and feature-area ownership data is maintained in [.github/classifier.json](https://github.com/microsoft/vscode/blob/master/.github/classifier.json). \n\n💡 The bot is being run through a GitHub action that runs every 30 minutes. Give the bot the opportunity to classify an issue before doing it manually.\n\n### Inbox Tracking\n\nThe inbox tracker is responsible for the [global inbox](https://github.com/Microsoft/vscode/issues?utf8=%E2%9C%93&q=is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Atestplan-item+-label%3Aplan-item) containing all **open issues and pull requests** that\n- are neither **feature requests** nor **test plan items** nor **plan items** and\n- have **no owner assignment**.\n\nThe **inbox tracker** may perform any step described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) but its main responsibility is to route issues to the actual feature area owner.\n\nFeature area owners track the **feature area inbox** containing all **open issues and pull requests** that\n- are personally assigned to them and are not assigned to any milestone\n- are labeled with their feature area label and are not assigned to any milestone.\nThis secondary triage may involve any of the steps described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and results in a fully triaged or closed issue.\n\nThe [github triage extension](https://github.com/microsoft/vscode-github-triage-extension) can be used to assist with triaging — it provides a \"Command Palette\"-style list of triaging actions like assignment, labeling, and triggers for various bot actions.",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "## Triage Inbox\n\nAll inbox issues but not those that need more information. These issues need to be triaged, e.g assigned to a user or ask for more information",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$inbox -label:\"needs more info\" -label:emmet",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "## Inbox\n\nAll issues that have no assignee and that have neither **feature requests** nor **test plan items** nor **plan items**.",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$inbox -label:emmet",
|
||||
"editable": true
|
||||
}
|
||||
]
|
||||
98
.vscode/notebooks/my-work.github-issues
vendored
98
.vscode/notebooks/my-work.github-issues
vendored
@@ -1,98 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "##### `Config`: This should be changed every month/milestone",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks\n\n// current milestone name\n$milestone=milestone:\"September 2020\"",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "github-issues",
|
||||
"value": "## Milestone Work",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos $milestone assignee:@me is:open",
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "github-issues",
|
||||
"value": "## Bugs, Debt, Features...",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### My Bugs",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open label:bug",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Debt & Engineering",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open label:debt OR $repos assignee:@me is:open label:engineering",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Performance 🐌 🔜 🏎",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open label:perf OR $repos assignee:@me is:open label:perf-startup OR $repos assignee:@me is:open label:perf-bloat OR $repos assignee:@me is:open label:freeze-slow-crash-leak",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Feature Requests",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open label:feature-request milestone:Backlog sort:reactions-+1-desc",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open milestone:\"Backlog Candidates\"",
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Not Actionable",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos assignee:@me is:open label:\"needs more info\"",
|
||||
"editable": false
|
||||
}
|
||||
]
|
||||
56
.vscode/notebooks/verification.github-issues
vendored
56
.vscode/notebooks/verification.github-issues
vendored
@@ -1,56 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### Bug Verification Queries\n\nBefore shipping we want to verify _all_ bugs. That means when a bug is fixed we check that the fix actually works. It's always best to start with bugs that you have filed and the proceed with bugs that have been filed from users outside the development team. ",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "#### Config: update list of `repos` and the `milestone`",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks \n$milestone=milestone:\"September 2020\"",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### Bugs You Filed",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate author:@me",
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### Bugs From Outside",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate -author:@me -assignee:@me label:bug -label:verified -author:@me -author:aeschli -author:alexdima -author:alexr00 -author:bpasero -author:chrisdias -author:chrmarti -author:connor4312 -author:dbaeumer -author:deepak1556 -author:eamodio -author:egamma -author:gregvanl -author:isidorn -author:JacksonKearl -author:joaomoreno -author:jrieken -author:lramos15 -author:lszomoru -author:misolori -author:mjbvz -author:rebornix -author:RMacfarlane -author:roblourens -author:sana-ajani -author:sandy081 -author:sbatten -author:Tyriar -author:weinand",
|
||||
"editable": false
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
"language": "markdown",
|
||||
"value": "### All",
|
||||
"editable": true
|
||||
},
|
||||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$repos $milestone is:closed -assignee:@me label:bug -label:verified -label:*duplicate",
|
||||
"editable": false
|
||||
}
|
||||
]
|
||||
194
.vscode/searches/TrustedTypes.code-search
vendored
194
.vscode/searches/TrustedTypes.code-search
vendored
@@ -1,194 +0,0 @@
|
||||
# Query: .innerHTML =
|
||||
# Flags: CaseSensitive WordMatch
|
||||
# Including: src/vs/**/*.{t,j}s
|
||||
# Excluding: *.test.ts
|
||||
# ContextLines: 3
|
||||
|
||||
22 results - 14 files
|
||||
|
||||
src/vs/base/browser/markdownRenderer.ts:
|
||||
161 const strValue = values[0];
|
||||
162 const span = element.querySelector(`div[data-code="${id}"]`);
|
||||
163 if (span) {
|
||||
164: span.innerHTML = strValue;
|
||||
165 }
|
||||
166 }).catch(err => {
|
||||
167 // ignore
|
||||
|
||||
243 return true;
|
||||
244 }
|
||||
245
|
||||
246: element.innerHTML = insane(renderedMarkdown, {
|
||||
247 allowedSchemes,
|
||||
248 // allowedTags should included everything that markdown renders to.
|
||||
249 // Since we have our own sanitize function for marked, it's possible we missed some tag so let insane make sure.
|
||||
|
||||
src/vs/base/browser/ui/contextview/contextview.ts:
|
||||
157 this.shadowRootHostElement = DOM.$('.shadow-root-host');
|
||||
158 this.container.appendChild(this.shadowRootHostElement);
|
||||
159 this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });
|
||||
160: this.shadowRoot.innerHTML = `
|
||||
161 <style>
|
||||
162 ${SHADOW_ROOT_CSS}
|
||||
163 </style>
|
||||
|
||||
src/vs/code/electron-sandbox/issue/issueReporterMain.ts:
|
||||
57 const platformClass = platform.isWindows ? 'windows' : platform.isLinux ? 'linux' : 'mac';
|
||||
58 addClass(document.body, platformClass); // used by our fonts
|
||||
59
|
||||
60: document.body.innerHTML = BaseHtml();
|
||||
61 const issueReporter = new IssueReporter(configuration);
|
||||
62 issueReporter.render();
|
||||
63 document.body.style.display = 'block';
|
||||
|
||||
src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts:
|
||||
320 content.push(`.highest { color: ${styles.highlightForeground}; }`);
|
||||
321 }
|
||||
322
|
||||
323: styleTag.innerHTML = content.join('\n');
|
||||
324 if (document.head) {
|
||||
325 document.head.appendChild(styleTag);
|
||||
326 }
|
||||
|
||||
src/vs/editor/browser/view/domLineBreaksComputer.ts:
|
||||
107 allCharOffsets[i] = tmp[0];
|
||||
108 allVisibleColumns[i] = tmp[1];
|
||||
109 }
|
||||
110: containerDomNode.innerHTML = sb.build();
|
||||
111
|
||||
112 containerDomNode.style.position = 'absolute';
|
||||
113 containerDomNode.style.top = '10000';
|
||||
|
||||
src/vs/editor/browser/view/viewLayer.ts:
|
||||
507 private _finishRenderingNewLines(ctx: IRendererContext<T>, domNodeIsEmpty: boolean, newLinesHTML: string, wasNew: boolean[]): void {
|
||||
508 const lastChild = <HTMLElement>this.domNode.lastChild;
|
||||
509 if (domNodeIsEmpty || !lastChild) {
|
||||
510: this.domNode.innerHTML = newLinesHTML;
|
||||
511 } else {
|
||||
512 lastChild.insertAdjacentHTML('afterend', newLinesHTML);
|
||||
513 }
|
||||
|
||||
525 private _finishRenderingInvalidLines(ctx: IRendererContext<T>, invalidLinesHTML: string, wasInvalid: boolean[]): void {
|
||||
526 const hugeDomNode = document.createElement('div');
|
||||
527
|
||||
528: hugeDomNode.innerHTML = invalidLinesHTML;
|
||||
529
|
||||
530 for (let i = 0; i < ctx.linesLength; i++) {
|
||||
531 const line = ctx.lines[i];
|
||||
|
||||
src/vs/editor/browser/widget/diffEditorWidget.ts:
|
||||
2157
|
||||
2158 let domNode = document.createElement('div');
|
||||
2159 domNode.className = `view-lines line-delete ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;
|
||||
2160: domNode.innerHTML = sb.build();
|
||||
2161 Configuration.applyFontInfoSlow(domNode, fontInfo);
|
||||
2162
|
||||
2163 let marginDomNode = document.createElement('div');
|
||||
2164 marginDomNode.className = 'inline-deleted-margin-view-zone';
|
||||
2165: marginDomNode.innerHTML = marginHTML.join('');
|
||||
2166 Configuration.applyFontInfoSlow(marginDomNode, fontInfo);
|
||||
2167
|
||||
2168 return {
|
||||
|
||||
src/vs/editor/standalone/browser/colorizer.ts:
|
||||
40 let text = domNode.firstChild ? domNode.firstChild.nodeValue : '';
|
||||
41 domNode.className += ' ' + theme;
|
||||
42 let render = (str: string) => {
|
||||
43: domNode.innerHTML = str;
|
||||
44 };
|
||||
45 return this.colorize(modeService, text || '', mimeType, options).then(render, (err) => console.error(err));
|
||||
46 }
|
||||
|
||||
src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts:
|
||||
212 if (!this._globalStyleElement) {
|
||||
213 this._globalStyleElement = dom.createStyleSheet();
|
||||
214 this._globalStyleElement.className = 'monaco-colors';
|
||||
215: this._globalStyleElement.innerHTML = this._css;
|
||||
216 this._styleElements.push(this._globalStyleElement);
|
||||
217 }
|
||||
218 return Disposable.None;
|
||||
|
||||
221 private _registerShadowDomContainer(domNode: HTMLElement): IDisposable {
|
||||
222 const styleElement = dom.createStyleSheet(domNode);
|
||||
223 styleElement.className = 'monaco-colors';
|
||||
224: styleElement.innerHTML = this._css;
|
||||
225 this._styleElements.push(styleElement);
|
||||
226 return {
|
||||
227 dispose: () => {
|
||||
|
||||
291 ruleCollector.addRule(generateTokensCSSForColorMap(colorMap));
|
||||
292
|
||||
293 this._css = cssRules.join('\n');
|
||||
294: this._styleElements.forEach(styleElement => styleElement.innerHTML = this._css);
|
||||
295
|
||||
296 TokenizationRegistry.setColorMap(colorMap);
|
||||
297 this._onColorThemeChange.fire(theme);
|
||||
|
||||
src/vs/editor/test/browser/controller/imeTester.ts:
|
||||
55 let content = this._model.getModelLineContent(i);
|
||||
56 r += content + '<br/>';
|
||||
57 }
|
||||
58: output.innerHTML = r;
|
||||
59 }
|
||||
60 }
|
||||
61
|
||||
|
||||
69 let title = document.createElement('div');
|
||||
70 title.className = 'title';
|
||||
71
|
||||
72: title.innerHTML = description + '. Type <strong>' + inputStr + '</strong>';
|
||||
73 container.appendChild(title);
|
||||
74
|
||||
75 let startBtn = document.createElement('button');
|
||||
|
||||
src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts:
|
||||
454
|
||||
455 private getMarkdownDragImage(templateData: MarkdownCellRenderTemplate): HTMLElement {
|
||||
456 const dragImageContainer = DOM.$('.cell-drag-image.monaco-list-row.focused.markdown-cell-row');
|
||||
457: dragImageContainer.innerHTML = templateData.container.outerHTML;
|
||||
458
|
||||
459 // Remove all rendered content nodes after the
|
||||
460 const markdownContent = dragImageContainer.querySelector('.cell.markdown')!;
|
||||
|
||||
611 return null;
|
||||
612 }
|
||||
613
|
||||
614: editorContainer.innerHTML = richEditorText;
|
||||
615
|
||||
616 return dragImageContainer;
|
||||
617 }
|
||||
|
||||
src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts:
|
||||
375 addMouseoverListeners(outputNode, outputId);
|
||||
376 const content = data.content;
|
||||
377 if (content.type === RenderOutputType.Html) {
|
||||
378: outputNode.innerHTML = content.htmlContent;
|
||||
379 cellOutputContainer.appendChild(outputNode);
|
||||
380 domEval(outputNode);
|
||||
381 } else {
|
||||
|
||||
src/vs/workbench/contrib/webview/browser/pre/main.js:
|
||||
386 // apply default styles
|
||||
387 const defaultStyles = newDocument.createElement('style');
|
||||
388 defaultStyles.id = '_defaultStyles';
|
||||
389: defaultStyles.innerHTML = defaultCssRules;
|
||||
390 newDocument.head.prepend(defaultStyles);
|
||||
391
|
||||
392 applyStyles(newDocument, newDocument.body);
|
||||
|
||||
src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts:
|
||||
281
|
||||
282 const content = model.main.textEditorModel.getValue(EndOfLinePreference.LF);
|
||||
283 if (!strings.endsWith(input.resource.path, '.md')) {
|
||||
284: this.content.innerHTML = content;
|
||||
285 this.updateSizeClasses();
|
||||
286 this.decorateContent();
|
||||
287 this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(() => this.decorateContent()));
|
||||
|
||||
303 const innerContent = document.createElement('div');
|
||||
304 innerContent.classList.add('walkThroughContent'); // only for markdown files
|
||||
305 const markdown = this.expandMacros(content);
|
||||
306: innerContent.innerHTML = marked(markdown, { renderer });
|
||||
307 this.content.appendChild(innerContent);
|
||||
308
|
||||
309 model.snippets.forEach((snippet, i) => {
|
||||
61
.vscode/searches/es6.code-search
vendored
61
.vscode/searches/es6.code-search
vendored
@@ -1,61 +0,0 @@
|
||||
# Query: @deprecated ES6
|
||||
# Flags: CaseSensitive WordMatch
|
||||
# ContextLines: 2
|
||||
|
||||
12 results - 4 files
|
||||
|
||||
src/vs/base/browser/dom.ts:
|
||||
83 };
|
||||
84
|
||||
85: /** @deprecated ES6 - use classList*/
|
||||
86 export const hasClass: (node: HTMLElement | SVGElement, className: string) => boolean = _classList.hasClass.bind(_classList);
|
||||
87: /** @deprecated ES6 - use classList*/
|
||||
88 export const addClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.addClass.bind(_classList);
|
||||
89: /** @deprecated ES6 - use classList*/
|
||||
90 export const addClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.addClasses.bind(_classList);
|
||||
91: /** @deprecated ES6 - use classList*/
|
||||
92 export const removeClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.removeClass.bind(_classList);
|
||||
93: /** @deprecated ES6 - use classList*/
|
||||
94 export const removeClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.removeClasses.bind(_classList);
|
||||
95: /** @deprecated ES6 - use classList*/
|
||||
96 export const toggleClass: (node: HTMLElement | SVGElement, className: string, shouldHaveIt?: boolean) => void = _classList.toggleClass.bind(_classList);
|
||||
97
|
||||
|
||||
src/vs/base/common/arrays.ts:
|
||||
401
|
||||
402 /**
|
||||
403: * @deprecated ES6: use `Array.find`
|
||||
404 */
|
||||
405 export function first<T>(array: ReadonlyArray<T>, fn: (item: T) => boolean, notFoundValue: T): T;
|
||||
|
||||
src/vs/base/common/objects.ts:
|
||||
115
|
||||
116 /**
|
||||
117: * @deprecated ES6
|
||||
118 */
|
||||
119 export function assign<T>(destination: T): T;
|
||||
|
||||
src/vs/base/common/strings.ts:
|
||||
15
|
||||
16 /**
|
||||
17: * @deprecated ES6: use `String.padStart`
|
||||
18 */
|
||||
19 export function pad(n: number, l: number, char: string = '0'): string {
|
||||
|
||||
146
|
||||
147 /**
|
||||
148: * @deprecated ES6: use `String.startsWith`
|
||||
149 */
|
||||
150 export function startsWith(haystack: string, needle: string): boolean {
|
||||
|
||||
167
|
||||
168 /**
|
||||
169: * @deprecated ES6: use `String.endsWith`
|
||||
170 */
|
||||
171 export function endsWith(haystack: string, needle: string): boolean {
|
||||
|
||||
857
|
||||
858 /**
|
||||
859: * @deprecated ES6
|
||||
860 */
|
||||
861 export function repeat(s: string, count: number): string {
|
||||
167
.vscode/searches/strict-null.code-search
vendored
167
.vscode/searches/strict-null.code-search
vendored
@@ -1,167 +0,0 @@
|
||||
# Query: strict-null
|
||||
|
||||
76 results - 44 files
|
||||
|
||||
src\vs\base\browser\ui\tree\compressedObjectTreeModel.ts:
|
||||
455: return null; // {{SQL CARBON EDIT}} strict-null-check
|
||||
465: return null; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\platform\actions\common\menuService.ts:
|
||||
97: const toggledExpression: ContextKeyExpression = (item.command.toggled as { condition: ContextKeyExpression }).condition || item.command.toggled as ContextKeyExpression; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\platform\clipboard\browser\clipboardService.ts:
|
||||
57: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\platform\dialogs\electron-main\dialogs.ts:
|
||||
123: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\platform\driver\electron-main\driver.ts:
|
||||
214: const driver = instantiationService.createInstance(Driver as any, windowServer, { verbose }) as Driver; // {{SQL CARBON EDIT}} strict-null-check...i guess?
|
||||
|
||||
src\vs\platform\extensionManagement\node\extensionManagementService.ts:
|
||||
558: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\platform\quickinput\browser\pickerQuickAccess.ts:
|
||||
216: active: activePick as T || additionalActivePick as T // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\api\browser\mainThreadLanguageFeatures.ts:
|
||||
90: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
600: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
610: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\api\common\extHost.api.impl.ts:
|
||||
538: alignment = alignmentOrOptions as number; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\api\common\extHostComments.ts:
|
||||
410: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
|
||||
src\vs\workbench\api\common\extHostTask.ts:
|
||||
583: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\api\common\extHostTerminalService.ts:
|
||||
279: this._onProcessExit.fire(e === void 0 ? undefined : e as number); // {{SQL CARBON EDIT}} strict-null-checks
|
||||
283: this._pty.onDidOverrideDimensions(e => this._onProcessOverrideDimensions.fire(e ? { cols: e.columns, rows: e.rows } : undefined)); // {{SQL CARBONEDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\browser\actions\workspaceCommands.ts:
|
||||
87: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
120: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
|
||||
src\vs\workbench\browser\parts\editor\editorGroupView.ts:
|
||||
827: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\browser\parts\panel\panelPart.ts:
|
||||
151: (id: string, focus?: boolean) => <unknown>this.openPanel(id, focus) as Promise<IPaneComposite | undefined>, // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\browser\parts\sidebar\sidebarPart.ts:
|
||||
59: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
64: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\common\editor\editorGroup.ts:
|
||||
388: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
406: return undefined; // not found {{SQL CARBON EDIT}} strict-null-check
|
||||
433: return undefined; // not found {{SQL CARBON EDIT}} strict-null-check
|
||||
456: return undefined; // not found {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\callHierarchy\browser\callHierarchyPeek.ts:
|
||||
377: const root = <ITreeNode<callHTree.Call, FuzzyScore>>this._tree.getNode(model).children[0]; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\contrib\customEditor\browser\customEditorInput.ts:
|
||||
230: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\contrib\customEditor\browser\customEditors.ts:
|
||||
169: return undefined; // {{SQL CARBON EDIT}} strict-nulls
|
||||
468: return undefined; // {{SQL CARBON EDIT}} Strict-null-checks
|
||||
493: return undefined; // {{SQL CARBON EDIT}} Strict-null-checks
|
||||
505: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\extensions\browser\extensionsActions.ts:
|
||||
2203: return (<IExtensionsConfigContent>json.parse(content.value.toString()) || {}) as IExtensionsConfigContent; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\extensions\test\electron-browser\extensionRecommendationsService.test.ts:
|
||||
508: instantiationService.stub(IStorageService, <any>{ // {{SQL CARBON EDIT}} strict-null-checks?
|
||||
|
||||
src\vs\workbench\contrib\files\common\explorerService.ts:
|
||||
393: const configSortOrder = configuration?.explorer?.sortOrder || SortOrder.Default; // {{SQL CARBON EDIT}} strict-null-checks?
|
||||
|
||||
src\vs\workbench\contrib\notebook\browser\notebookEditor.ts:
|
||||
475: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\notebook\browser\notebookService.ts:
|
||||
204: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\notebook\browser\contrib\notebookActions.ts:
|
||||
412: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
417: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
479: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
484: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\notebook\test\testNotebookEditor.ts:
|
||||
186: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\remote\browser\remote.ts:
|
||||
544: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
563: return undefined; // {{SQL CARBON EDIT}} strict-null-check;
|
||||
|
||||
src\vs\workbench\contrib\remote\browser\tunnelView.ts:
|
||||
589: const node: ITunnelItem | null = treeEvent.element as ITunnelItem | null; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\search\browser\anythingQuickAccess.ts:
|
||||
631: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
636: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
641: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
651: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
663: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
668: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
698: return undefined; // {{SQL CARBON EDIT}} strict-null
|
||||
|
||||
src\vs\workbench\contrib\searchEditor\browser\searchEditor.ts:
|
||||
335: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\contrib\searchEditor\browser\searchEditorInput.ts:
|
||||
121: if ((await this.headerModel).isDisposed() || (await this.contentsModel).isDisposed()) { return undefined; } // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\contrib\tasks\browser\abstractTaskService.ts:
|
||||
565: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
586: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\contrib\tasks\browser\taskQuickPick.ts:
|
||||
204: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
207: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\contrib\webview\browser\webviewWorkbenchService.ts:
|
||||
148: return undefined; // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\electron-browser\desktop.main.ts:
|
||||
283: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
|
||||
src\vs\workbench\services\dialogs\browser\simpleFileDialog.ts:
|
||||
496: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
502: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
|
||||
src\vs\workbench\services\dialogs\electron-browser\fileDialogService.ts:
|
||||
127: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
151: return undefined; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\services\extensions\common\abstractExtensionService.ts:
|
||||
235: result.push(new ExtensionPointContribution<T>(desc, desc.contributes[extPoint.name])); // {{SQL CARBON EDIT}} strict-null-checks
|
||||
376: value: desc.contributes[extensionPoint.name], // {{SQL CARBON EDIT}} strict-null-checks
|
||||
|
||||
src\vs\workbench\services\textfile\browser\textFileService.ts:
|
||||
221: return undefined; // user canceled // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\services\textfile\common\textFileEditorModel.ts:
|
||||
611: if ((this.saveSequentializer as TaskSequentializer).hasPending()) { // {{SQL CARBON EDIT}} strict-null-check
|
||||
619: (this.saveSequentializer as TaskSequentializer).cancelPending(); // {{SQL CARBON EDIT}} strict-null-check
|
||||
622: return (this.saveSequentializer as TaskSequentializer).setNext(() => this.doSave(options)); // {{SQL CARBON EDIT}} strict-null-check
|
||||
633: return (this.saveSequentializer as TaskSequentializer).setPending(versionId, (async () => { // {{SQL CARBON EDIT}} strict-null-checks
|
||||
667: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
672: return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-check
|
||||
|
||||
src\vs\workbench\services\textfile\common\textfiles.ts:
|
||||
421: isDirty(): boolean; // {{SQL CARBON EDIT}} strict-null-check
|
||||
|
||||
src\vs\workbench\services\themes\browser\workbenchThemeService.ts:
|
||||
248: Theme(), initializeFileIconTheme(), initializeProductIconTheme()]) as Promise<[IWorkbenchColorTheme | null, IWorkbenchFileIconTheme | null, IWorkbenchProductIconTheme | null]>; // {{SQL CARBON EDIT}} strict-null-checks maybe?
|
||||
|
||||
src\vs\workbench\services\workspaces\browser\abstractWorkspaceEditingService.ts:
|
||||
56: return undefined; // canceled {{SQL CARBON EDIT}} strict-null-checks
|
||||
53
.vscode/searches/ts36031.code-search
vendored
53
.vscode/searches/ts36031.code-search
vendored
@@ -1,53 +0,0 @@
|
||||
# Query: \\w+\\?\\.\\w+![(.[]
|
||||
# Flags: RegExp
|
||||
# ContextLines: 2
|
||||
|
||||
8 results - 4 files
|
||||
|
||||
src/vs/base/browser/ui/tree/asyncDataTree.ts:
|
||||
241 } : () => 'treeitem',
|
||||
242 isChecked: options.accessibilityProvider!.isChecked ? (e) => {
|
||||
243: return !!(options.accessibilityProvider?.isChecked!(e.element as T));
|
||||
244 } : undefined,
|
||||
245 getAriaLabel(e) {
|
||||
|
||||
src/vs/platform/list/browser/listService.ts:
|
||||
463
|
||||
464 if (typeof options?.openOnSingleClick !== 'boolean' && options?.configurationService) {
|
||||
465: this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick';
|
||||
466 this._register(options?.configurationService.onDidChangeConfiguration(() => {
|
||||
467: this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick';
|
||||
468 }));
|
||||
469 } else {
|
||||
|
||||
src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts:
|
||||
1526
|
||||
1527 await this._ensureActiveKernel();
|
||||
1528: await this._activeKernel?.cancelNotebookCell!(this._notebookViewModel!.uri, undefined);
|
||||
1529 }
|
||||
1530
|
||||
|
||||
1535
|
||||
1536 await this._ensureActiveKernel();
|
||||
1537: await this._activeKernel?.executeNotebookCell!(this._notebookViewModel!.uri, undefined);
|
||||
1538 }
|
||||
1539
|
||||
|
||||
1553
|
||||
1554 await this._ensureActiveKernel();
|
||||
1555: await this._activeKernel?.cancelNotebookCell!(this._notebookViewModel!.uri, cell.handle);
|
||||
1556 }
|
||||
1557
|
||||
|
||||
1567
|
||||
1568 await this._ensureActiveKernel();
|
||||
1569: await this._activeKernel?.executeNotebookCell!(this._notebookViewModel!.uri, cell.handle);
|
||||
1570 }
|
||||
1571
|
||||
|
||||
src/vs/workbench/contrib/webview/electron-browser/iframeWebviewElement.ts:
|
||||
89 .then(() => this._resourceRequestManager.ensureReady())
|
||||
90 .then(() => {
|
||||
91: this.element?.contentWindow!.postMessage({ channel, args: data }, '*');
|
||||
92 });
|
||||
93 }
|
||||
1160
.vscode/searches/vscodeedits.code-search
vendored
1160
.vscode/searches/vscodeedits.code-search
vendored
File diff suppressed because it is too large
Load Diff
30
.vscode/settings.json
vendored
30
.vscode/settings.json
vendored
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"editor.insertSpaces": false,
|
||||
"files.eol": "\n",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.exclude": {
|
||||
".git": true,
|
||||
@@ -7,8 +8,7 @@
|
||||
"**/.DS_Store": true,
|
||||
"build/**/*.js": {
|
||||
"when": "$(basename).ts"
|
||||
},
|
||||
"src/vs/server": false
|
||||
}
|
||||
},
|
||||
"files.associations": {
|
||||
"cglicenses.json": "jsonc"
|
||||
@@ -23,11 +23,7 @@
|
||||
"i18n/**": true,
|
||||
"extensions/**/out/**": true,
|
||||
"test/smoke/out/**": true,
|
||||
"test/automation/out/**": true,
|
||||
"test/integration/browser/out/**": true,
|
||||
"src/vs/base/test/node/uri.test.data.txt": true,
|
||||
"src/vs/workbench/test/browser/api/extHostDocumentData.test.perf-data.ts": true,
|
||||
"src/vs/server": false
|
||||
"src/vs/base/test/node/uri.test.data.txt": true
|
||||
},
|
||||
"lcov.path": [
|
||||
"./.build/coverage/lcov.info",
|
||||
@@ -42,14 +38,9 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"eslint.options": {
|
||||
"rulePaths": [
|
||||
"./build/lib/eslint"
|
||||
]
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"npm.exclude": "**/extensions/**",
|
||||
"npm.packageManager": "yarn",
|
||||
"git.ignoreLimitWarning": true,
|
||||
"emmet.excludeLanguages": [],
|
||||
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
@@ -67,14 +58,5 @@
|
||||
"url": "./.vscode/cglicenses.schema.json"
|
||||
}
|
||||
],
|
||||
"git.ignoreLimitWarning": true,
|
||||
"remote.extensionKind": {
|
||||
"msjsdiag.debugger-for-chrome": "workspace"
|
||||
},
|
||||
"gulp.autoDetect": "off",
|
||||
"files.insertFinalNewline": true,
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"typescript.tsc.autoDetect": "off"
|
||||
}
|
||||
"git.ignoreLimitWarning": true
|
||||
}
|
||||
209
.vscode/tasks.json
vendored
209
.vscode/tasks.json
vendored
@@ -3,145 +3,52 @@
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch-clientd",
|
||||
"label": "Build VS Code Core",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"applyTo": "closedDocuments",
|
||||
"fileLocation": [
|
||||
"absolute"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": "Starting compilation",
|
||||
"endsPattern": "Finished compilation"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch-extensionsd",
|
||||
"label": "Build VS Code Extensions",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"applyTo": "closedDocuments",
|
||||
"fileLocation": [
|
||||
"absolute"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": "Starting compilation",
|
||||
"endsPattern": "Finished compilation"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"script": "watch",
|
||||
"label": "Build VS Code",
|
||||
"dependsOn": [
|
||||
"Build VS Code Core",
|
||||
"Build VS Code Extensions"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"applyTo": "closedDocuments",
|
||||
"fileLocation": [
|
||||
"absolute"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": "Starting compilation",
|
||||
"endsPattern": "Finished compilation"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "kill-watch-clientd",
|
||||
"label": "Kill Build VS Code Core",
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": "$tsc"
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "kill-watch-extensionsd",
|
||||
"label": "Kill Build VS Code Extensions",
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": "$tsc"
|
||||
},
|
||||
{
|
||||
"label": "Kill Build VS Code",
|
||||
"dependsOn": [
|
||||
"Kill Build VS Code Core",
|
||||
"Kill Build VS Code Extensions"
|
||||
],
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "strict-vscode-watch",
|
||||
"label": "TS - Strict VSCode",
|
||||
"script": "strict-initialization-watch",
|
||||
"label": "TS - Strict Initialization",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"base": "$tsc-watch",
|
||||
"owner": "typescript-vscode",
|
||||
"owner": "typescript-strict-initialization",
|
||||
"applyTo": "allDocuments"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch-webd",
|
||||
"label": "Build Web Extensions",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"applyTo": "closedDocuments",
|
||||
"fileLocation": [
|
||||
"absolute"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": "Starting compilation",
|
||||
"endsPattern": "Finished compilation"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "kill-watch-webd",
|
||||
"label": "Kill Build Web Extensions",
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"problemMatcher": "$tsc"
|
||||
"type": "gulp",
|
||||
"task": "tslint",
|
||||
"label": "Run tslint",
|
||||
"problemMatcher": [
|
||||
"$tslint5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Run tests",
|
||||
@@ -166,62 +73,14 @@
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "electron",
|
||||
"type": "gulp",
|
||||
"task": "electron",
|
||||
"label": "Download electron"
|
||||
},
|
||||
{
|
||||
"type": "gulp",
|
||||
"task": "hygiene",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "yarn web --no-launch",
|
||||
"label": "Run web",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": ""
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": ".*node .*",
|
||||
"endsPattern": "Web UI available at .*"
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "eslint",
|
||||
"problemMatcher": {
|
||||
"source": "eslint",
|
||||
"base": "$eslint-stylish"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "node build/lib/preLaunch.js",
|
||||
"label": "Ensure Prelaunch Dependencies",
|
||||
"presentation": {
|
||||
"reveal": "silent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "tsec-compile-check",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"base": "$tsc",
|
||||
"applyTo": "allDocuments",
|
||||
"owner": "tsec"
|
||||
},
|
||||
],
|
||||
"group": "build",
|
||||
"label": "npm: tsec-compile-check",
|
||||
"detail": "node_modules/tsec/bin/tsec -p src/tsconfig.json --noEmit"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
4
.yarnrc
4
.yarnrc
@@ -1,3 +1,3 @@
|
||||
disturl "https://electronjs.org/headers"
|
||||
target "9.4.3"
|
||||
disturl "https://atom.io/download/electron"
|
||||
target "3.1.8"
|
||||
runtime "electron"
|
||||
|
||||
319
CHANGELOG.md
319
CHANGELOG.md
@@ -1,322 +1,5 @@
|
||||
# Change Log
|
||||
|
||||
## Version 1.25.2
|
||||
* Release date: January 22, 2021
|
||||
* Release status: General Availability
|
||||
* Fixes https://github.com/microsoft/azuredatastudio/issues/13899
|
||||
|
||||
## Version 1.25.1
|
||||
* Release date: December 10, 2020
|
||||
* Release status: General Availability
|
||||
* Fixes https://github.com/microsoft/azuredatastudio/issues/13751
|
||||
|
||||
## Version 1.25.0
|
||||
* Release date: December 8, 2020
|
||||
* Release status: General Availability
|
||||
* Kusto extension improvements
|
||||
* SQL Project extension improvements
|
||||
* Notebook improvements
|
||||
* Azure Browse Connections Preview performance improvements
|
||||
* Bug Fixes
|
||||
|
||||
## Version 1.24.0
|
||||
* Release date: November 12, 2020
|
||||
* Release status: General Availability
|
||||
* SQL Project improvements
|
||||
* Notebook improvements, including in WYSIWYG editor enhancements
|
||||
* Azure Arc improvements
|
||||
* Azure SQL Deployment UX improvements
|
||||
* Azure Browse Connections Preview
|
||||
* Bug Fixes
|
||||
|
||||
## Version 1.23.0
|
||||
* Release date: October 14, 2020
|
||||
* Release status: General Availability
|
||||
* Added deployments of Azure SQL DB and VM
|
||||
* Added PowerShell kernel results streaming support
|
||||
* Added improvements to SQL Database Projects extension
|
||||
* Bug Fixes
|
||||
* Extension Updates:
|
||||
* SQL Server Import
|
||||
* Machine Learning
|
||||
* Schema Compare
|
||||
* Kusto
|
||||
* SQL Assessment
|
||||
* SQL Database Projects
|
||||
* Azure Arc
|
||||
* azdata
|
||||
|
||||
## Version 1.22.1
|
||||
* Release date: September 30, 2020
|
||||
* Release status: General Availability
|
||||
* Fix bug #12615 Active connection filter doesn't untoggle | [#12615](https://github.com/microsoft/azuredatastudio/issues/12615)
|
||||
* Fix bug #12572 Edit Data grid doesn't escape special characters | [#12572](https://github.com/microsoft/azuredatastudio/issues/12572)
|
||||
* Fix bug #12570 Dashboard Explorer table doesn't escape special characters | [#12570](https://github.com/microsoft/azuredatastudio/issues/12570)
|
||||
* Fix bug #12582 Delete row on Edit Data fails | [#12582](https://github.com/microsoft/azuredatastudio/issues/12582)
|
||||
* Fix bug #12646 SQL Notebooks: Cells being treated isolated | [#12646](https://github.com/microsoft/azuredatastudio/issues/12646)
|
||||
|
||||
## Version 1.22.0
|
||||
* Release date: September 22, 2020
|
||||
* Release status: General Availability
|
||||
* New Notebook Features
|
||||
* Supports brand new text cell editing experience based on rich text formatting and seamless conversion to markdown, also known as WYSIWYG toolbar (What You See Is What You Get)
|
||||
* Supports Kusto kernel
|
||||
* Supports pinning of notebooks
|
||||
* Added support for new version of Jupyter Books
|
||||
* Improved Jupyter Shortcuts
|
||||
* Introduced perf loading improvements
|
||||
* Added Azure Arc extension - Users can try out Azure Arc public preview through Azure Data Studio. This includes:
|
||||
* Deploy data controller
|
||||
* Deploy Postgres
|
||||
* Deploy Managed Instance for Azure Arc
|
||||
* Connect to data controller
|
||||
* Access data service dashboards
|
||||
* Azure Arc Jupyter Book
|
||||
* Added new deployment options
|
||||
* Azure SQL Database Edge
|
||||
* (Edge will require Azure SQL Edge Deployment Extension)
|
||||
* Added SQL Database Projects extension - The SQL Database Projects extension brings project-based database development to Azure Data Studio. In this preview release, SQL projects can be created and published from Azure Data Studio.
|
||||
* Added Kusto (KQL) extension - Brings native Kusto experiences in Azure Data Studio for data exploration and data analytics against massive amount of real-time streaming data stored in Azure Data Explorer. This preview release supports connecting and browsing Azure Data Explorer clusters, writing KQL queries as well as authoring notebooks with Kusto kernel.
|
||||
* SQL Server Import extension GA - Announcing the GA of the SQL Server Import extension, features no longer in preview. This extension facilitates importing csv/txt files. Learn more about the extension in [this article](sql-server-import-extension.md).
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22September+2020+Release%22+is%3Aclosed).
|
||||
|
||||
## Version 1.21.0
|
||||
* Release date: August 12, 2020
|
||||
* Release status: General Availability
|
||||
* New Notebook Features
|
||||
* Move cell locations changd
|
||||
* Added action to convert cells to Text Cell or Code cell
|
||||
* Jupyter Books picker to open Jupyter Books directly from Github
|
||||
* Search bar added to Notebooks Viewlet for searching through Jupyter Books
|
||||
* Address issues in [August 2020 Milestone](https://github.com/microsoft/azuredatastudio/milestone/59?closed=1)
|
||||
|
||||
## Version 1.20.1
|
||||
* Release date: July 17, 2020
|
||||
* Release status: General Availability
|
||||
* Fix bug #11372 Object Explorer drag-and-drop table incorrectly wraps table names [#11372](https://github.com/microsoft/azuredatastudio/issues/11372)
|
||||
* Fix bug #11356 Dark theme is now the default theme [#11356](https://github.com/microsoft/azuredatastudio/issues/11356)
|
||||
* Known Issues:
|
||||
* Some users have reported connection errors from the new Microsoft.Data.SqlClient v2.0.0 included in this release. Users have found [following these instructions](https://github.com/microsoft/azuredatastudio/issues/11367#issuecomment-659614111) to successfully connect. This issue was caused by a client driver update which fixed an issue where TLS encryption wasn't enforced correctly. See https://github.com/dotnet/SqlClient/blob/master/release-notes/2.0/2.0.0.md#breaking-changes-1 and https://docs.microsoft.com/en-us/sql/relational-databases/native-client/features/using-encryption-without-validation for more information.
|
||||
|
||||
## Version 1.20.0
|
||||
* Release date: July 15, 2020
|
||||
* Release status: General Availability
|
||||
* Feature Tour
|
||||
* New Notebook Features
|
||||
* Header support in Markdown Toolbar
|
||||
* Side-by-side Markdown preview in Text Cells
|
||||
* Drag and drop columns and tables into Query Editor
|
||||
* Azure Account icon added to Activity Bar
|
||||
* Address issues in [July 2020 Milestone](https://github.com/microsoft/azuredatastudio/milestone/57?closed=1)
|
||||
* Bug fixes
|
||||
|
||||
## Version 1.19.0
|
||||
* Release date: June 15, 2020
|
||||
* Release status: General Availability
|
||||
* Address issues in https://github.com/microsoft/azuredatastudio/milestone/55?closed=1
|
||||
* Bug fixes
|
||||
|
||||
## Version 1.18.1
|
||||
* Release date: May 27, 2020
|
||||
* Release status: General Availability
|
||||
* Hotfix for https://github.com/microsoft/azuredatastudio/issues/10538
|
||||
* Hotfix for https://github.com/microsoft/azuredatastudio/issues/10537
|
||||
|
||||
## Version 1.18.0
|
||||
* Release date: May 20, 2020
|
||||
* Release status: General Availability
|
||||
* Announcing Redgate SQL Prompt extension - This extension lets you manage formatting styles directly within Azure Data Studio, so you can create and edit your styles without leaving the IDE.
|
||||
* Announcing the new machine learning extension. This extension enables you to:
|
||||
* Manage Python and R packages with SQL Server machine learning services with Azure Data Studio.
|
||||
* Use ONNX model to make predictions in Azure SQL Edge.
|
||||
* View ONNX models in an Azure SQL Edge database.
|
||||
* Import ONNX models from a file or Azure Machine Learning into Azure SQL Edge database.
|
||||
* Create a notebook to run experiments.
|
||||
* New notebook features:
|
||||
* Added new Python dependencies wizard
|
||||
* Improvements to the notebook markdown toolbar
|
||||
* Added support for parameterization for Always Encrypted - Allows you to run queries that insert, update or filter by encrypted database columns.
|
||||
* Bug fixes
|
||||
|
||||
## Version 1.17.1
|
||||
* Release date: April 29, 2020
|
||||
* Release status: General Availability
|
||||
* Hotfix for https://github.com/microsoft/azuredatastudio/milestone/54?closed=1
|
||||
|
||||
## Version 1.17.0
|
||||
* Release date: April 27, 2020
|
||||
* Release status: General Availability
|
||||
* New Welcome Page
|
||||
* New Notebook features
|
||||
* New Markdown editor toolbar
|
||||
* Books viewlet now works with notebooks
|
||||
* Improved dashboard
|
||||
* Always encrypted support
|
||||
* Accessibility bugs
|
||||
* VS Code merge
|
||||
|
||||
## Version 1.16.0
|
||||
* Release date: March 18, 2020
|
||||
* Release status: General Availability
|
||||
* Notebooks:
|
||||
* Charting
|
||||
* Creating Jupyter books
|
||||
* Postgres extension update - Users can now authenticate to Azure Postgres servers with their linked Azure account
|
||||
* Accessibility bugs
|
||||
* VS Code merge
|
||||
* In the next release, GitHub releases will no longer contain the binary files to the latest version. Rather, they will contain links to the latest release. This will have no impact on users using the in-app update functionality.
|
||||
|
||||
## Version 1.15.1
|
||||
* Release date: February 19, 2020
|
||||
* Release status: General Availability
|
||||
* Resolved [#9145 Edit Data render the result grid incorrectly when using custom query](https://github.com/microsoft/azuredatastudio/issues/9145).
|
||||
* Resolved [#9149 Show Active Connections](https://github.com/microsoft/azuredatastudio/issues/9149).
|
||||
|
||||
## Version 1.15.0
|
||||
* Release date: February 13, 2020
|
||||
* Release status: General Availability
|
||||
* New Azure Sign-in improvement - Added improved Azure Sign-in experience, including removal of copy/paste of device code to make a more seamless connected experience.
|
||||
* Find in Notebook support - Users can now use Ctrl+F inside of a notebook. Find in Notebook support searches line by line through both code and text cells.
|
||||
* VS Code merge from 1.38 to 1.42 - This release includes updates to VS Code from the 3 previous VS Code releases. Read their [release notes](https://code.visualstudio.com/updates/v1_42) to learn more.
|
||||
* Fix for the ["white/blank screen"](https://github.com/microsoft/azuredatastudio/issues/8775) issue reported by many users.
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+label%3ABug+milestone%3A%22February+2020%22+is%3Aclosed).
|
||||
|
||||
## Version 1.14.1
|
||||
* Release date: December 26, 2019
|
||||
* Release status: General Availability
|
||||
* Hotfix for bug https://github.com/microsoft/azuredatastudio/issues/8768
|
||||
|
||||
## Version 1.14.0
|
||||
* Release date: December 19, 2019
|
||||
* Release status: General Availability
|
||||
* Added bigdatacluster.ignoreSslVerification setting to allow ignoring SSL verification errors when connecting to a BDC [#8129](https://github.com/microsoft/azuredatastudio/issues/8129)
|
||||
* Changed attach to connection dropdown in Notebooks to only list the currently active connection [#8582](https://github.com/microsoft/azuredatastudio/pull/8582)
|
||||
* Allow changing default language flavor for offline query editors [#8419](https://github.com/microsoft/azuredatastudio/pull/8419)
|
||||
* GA status for Big Data Cluster/SQL 2019 features [#8269](https://github.com/microsoft/azuredatastudio/issues/8269)
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/44?closed=1).
|
||||
|
||||
## Contributions and "thank you"
|
||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||
|
||||
## Version 1.13.1
|
||||
* Release date: November 15, 2019
|
||||
* Release status: General Availability
|
||||
* Resolved [#8210 Copy/Paste results are out of order](https://github.com/microsoft/azuredatastudio/issues/8210).
|
||||
|
||||
## Version 1.13.0
|
||||
* Release date: November 4, 2019
|
||||
* Release status: General Availability
|
||||
* General Availability release for Schema Compare and DACPAC extensions
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/43?closed=1).
|
||||
|
||||
## Contributions and "thank you"
|
||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||
* aspnerd for `Use selected DB for import wizard schema list` [#7878](https://github.com/microsoft/azuredatastudio/pull/7878)
|
||||
|
||||
## Version 1.12.2
|
||||
* Release date: October 11, 2019
|
||||
* Release status: General Availability
|
||||
* Hotfix release (1.12.2): `Disable automatically starting the EH in inspect mode` https://github.com/microsoft/azuredatastudio/commit/c9bef82ace6c67190d0e83820011a2bbd1f793c1
|
||||
|
||||
## Version 1.12.1
|
||||
* Release date: October 7, 2019
|
||||
* Release status: General Availability
|
||||
* Hotfix release: `Notebooks: Ensure quotes and backslashes are escaped properly in text editor model` https://github.com/microsoft/azuredatastudio/pull/7540
|
||||
|
||||
## Version 1.12.0
|
||||
* Release date: October 2, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* Announcing the Query History panel
|
||||
* Improved Query Results Grid copy selection support
|
||||
* TempDB page added to Server Reports extension
|
||||
* PowerShell extension update
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/42?closed=1).
|
||||
|
||||
## Version 1.11.0
|
||||
* Release date: September 10, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/41?closed=1).
|
||||
|
||||
## Version 1.10.0
|
||||
* Release date: August 14, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* [SandDance](https://github.com/microsoft/SandDance) integration — A new way to interact with data. Download the extension [here](https://docs.microsoft.com/sql/azure-data-studio/sanddance-extension)
|
||||
* Notebook improvements
|
||||
* Better loading performance
|
||||
* Ability to right click SQL results grid to save your results as CSV, JSON, etc.
|
||||
* Buttons to add code or text cells in-line
|
||||
* [Other fixes and improvements](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+label%3A%22Area%3A+Notebooks%22+milestone%3A%22August+2019+Release%22+is%3Aclosed)
|
||||
* SQL Server Dacpac extension can support Azure Active Directory authentication
|
||||
* Updated SQL Server 2019 extension
|
||||
* Visual Studio Code May Release Merge 1.37 - this includes changes from [1.36](https://code.visualstudio.com/updates/v1_37) and [1.37](https://code.visualstudio.com/updates/v1_37)
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/39?closed=1).
|
||||
|
||||
## Version 1.9.0
|
||||
* Release date: July 11, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* Release of [SentryOne Plan Explorer Extension](https://www.sentryone.com/products/sentryone-plan-explorer-extension-azure-data-studio)
|
||||
* **Schema Compare**
|
||||
* Schema Compare File Support (.SCMP)
|
||||
* Cancel support
|
||||
* [Other fixes and improvements](https://github.com/Microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22July+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Schema+Compare%22)
|
||||
* **Notebooks**
|
||||
* Plotly Support
|
||||
* Open Notebook from Browser
|
||||
* Python Package Management
|
||||
* Performance & Markdown Enhancements
|
||||
* Improved Keyboard Shortcuts
|
||||
* [Other fixes and improvements](https://github.com/Microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22July+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)
|
||||
* **SQL Server Profiler**
|
||||
* Filtering by Database Name
|
||||
* Copy & Paste Support
|
||||
* Save/Load Filter
|
||||
* SQL Server 2019 Support
|
||||
* New Language Packs Available
|
||||
* Visual Studio Code May Release Merge 1.35 - the latest improvements can be found [here](https://code.visualstudio.com/updates/v1_35)
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/35?closed=1).
|
||||
|
||||
## Version 1.8.0
|
||||
* Release date: June 6, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* Initial release of the Database Admin Tool Extensions for Windows *Preview* extension
|
||||
* Initial release of the Central Management Servers extension
|
||||
* **Schema Compare**
|
||||
* Added Exclude/Include Options
|
||||
* Generate Script opens script after being generated
|
||||
* Removed double scroll bars
|
||||
* Formatting and layout improvements
|
||||
* Complete changes can be found [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+label%3A%22Area%3A+Schema+Compare%22+is%3Aclosed)
|
||||
* Messages panel moved into results panel - when users ran SQL queries, results and messages were in stacked panels. Now they are in separate tabs in a single panel similar to SSMS.
|
||||
* **Notebook**
|
||||
* Users can now choose to use their own Python 3 or Anaconda installs in notebooks
|
||||
* Multiple Stability + fit/finish fixes
|
||||
* View the full list of improvements and fixes [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)
|
||||
* Visual Studio Code May Release Merge 1.34 - the latest improvements can be found [here](https://code.visualstudio.com/updates/v1_34)
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/32?closed=1).
|
||||
|
||||
## Version 1.7.0
|
||||
* Release date: May 8, 2019
|
||||
* Release status: General Availability
|
||||
|
||||
## What's new in this version
|
||||
* Announcing Schema Compare *Preview* extension
|
||||
* Tasks Panel UX improvement
|
||||
* Announcing new Welcome page
|
||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/31?closed=1).
|
||||
|
||||
## Contributions and "thank you"
|
||||
We would like to thank all our users who raised issues.
|
||||
|
||||
## Version 1.6.0
|
||||
* Release date: April 18, 2019
|
||||
* Release status: General Availability
|
||||
@@ -438,7 +121,7 @@ We would like to thank all our users who raised issues, and in particular the fo
|
||||
|
||||
## What's new in this version
|
||||
* Announcing the SQL Server 2019 Preview extension.
|
||||
* Support for SQL Server 2019 preview features including Big Data Cluster support.
|
||||
* Support for SQL Server 2019 preview features including big data cluster support.
|
||||
* Azure Data Studio Notebooks
|
||||
* The Azure Resource Explorer viewlets you browse data-related endpoints for your Azure accounts and create connections to them in Object Explorer. In this release Azure SQL Databases and servers are supported.
|
||||
* SQL Server Polybase Create External Table Wizard
|
||||
|
||||
1
CODE_OF_CONDUCT.md
Normal file
1
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1 @@
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 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.
|
||||
70
README.md
70
README.md
@@ -1,38 +1,34 @@
|
||||
# Azure Data Studio
|
||||
|
||||
[](https://gitter.im/Microsoft/sqlopsstudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://dev.azure.com/azuredatastudio/azuredatastudio/_build/latest?definitionId=4&branchName=main)
|
||||
[](https://twitter.com/azuredatastudio)
|
||||
[](https://dev.azure.com/ms/azuredatastudio/_build/latest?definitionId=4)
|
||||
|
||||
Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
|
||||
|
||||
## **Download the latest Azure Data Studio release**
|
||||
**Download the latest Azure Data Studio release**
|
||||
|
||||
| Platform |
|
||||
| --------------------------------------- |
|
||||
| [Windows User Installer][win-user] |
|
||||
| [Windows System Installer][win-system] |
|
||||
| [Windows ZIP][win-zip] |
|
||||
| [macOS ZIP][osx-zip] |
|
||||
| [Linux TAR.GZ][linux-zip] |
|
||||
| [Linux RPM][linux-rpm] |
|
||||
| [Linux DEB][linux-deb] |
|
||||
Platform | Link
|
||||
-- | --
|
||||
Windows User Installer | https://go.microsoft.com/fwlink/?linkid=2087316
|
||||
Windows System Installer | https://go.microsoft.com/fwlink/?linkid=2087317
|
||||
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=2087318
|
||||
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=2087170
|
||||
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=2087414
|
||||
Linux RPM | https://go.microsoft.com/fwlink/?linkid=2087171
|
||||
Linux DEB | https://go.microsoft.com/fwlink/?linkid=2087415
|
||||
|
||||
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
||||
|
||||
Go to our [download page](https://aka.ms/getazuredatastudio) for more specific instructions.
|
||||
|
||||
## Try out the latest insiders build from `main`:
|
||||
Try out the latest insiders build from `master`:
|
||||
- [Windows User Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-user/insider)
|
||||
- [Windows System Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64/insider)
|
||||
- [Windows ZIP - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-archive/insider)
|
||||
- [macOS ZIP - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/darwin/insider)
|
||||
- [Linux TAR.GZ - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/linux-x64/insider)
|
||||
|
||||
See the [change log](https://github.com/Microsoft/azuredatastudio/blob/main/CHANGELOG.md) for additional details of what's in this release.
|
||||
Go to our [download page](https://aka.ms/getazuredatastudio) for more specific instructions.
|
||||
See the [change log](https://github.com/Microsoft/azuredatastudio/blob/master/CHANGELOG.md) for additional details of what's in this release.
|
||||
|
||||
|
||||
## **Feature Highlights**
|
||||
**Feature Highlights**
|
||||
|
||||
- Cross-Platform DB management for Windows, macOS and Linux with simple XCopy deployment
|
||||
- SQL Server Connection Management with Connection Dialog, Server Groups, Azure Integration and Registered Servers
|
||||
@@ -49,7 +45,7 @@ Go to our [download page](https://aka.ms/getazuredatastudio) for more specific i
|
||||
|
||||
Here are some of these features in action.
|
||||
|
||||
<img src='https://github.com/Microsoft/azuredatastudio/blob/main/docs/overview_screen.jpg' width='800px'>
|
||||
<img src='https://github.com/Microsoft/azuredatastudio/blob/master/docs/overview_screen.jpg' width='800px'>
|
||||
|
||||
## Contributing
|
||||
If you are interested in fixing issues and contributing directly to the code base,
|
||||
@@ -62,7 +58,9 @@ please see the document [How to Contribute](https://github.com/Microsoft/azureda
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 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.
|
||||
|
||||
## Localization
|
||||
Azure Data Studio is localized into 10 languages: French, Italian, German, Spanish, Simplified Chinese, Traditional Chinese, Japanese, Korean, Russian, and Portuguese (Brazil). The language packs are available in the Extension Manager marketplace. Simply, search for the specific language using the extension marketplace and install. Once you install the selected language, Azure Data Studio will prompt you to restart with the new language.
|
||||
Azure Data Studio localization is now open for community contributions. You can contribute to localization for both software and docs. https://aka.ms/SQLOpsStudioLoc
|
||||
|
||||
Localization is now opened for 10 languages: French, Italian, German, Spanish, Simplified Chinese, Traditional Chinese, Japanese, Korean, Russian, and Portuguese (Brazil). Help us make Azure Data Studio available in your language!
|
||||
|
||||
## Privacy Statement
|
||||
The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) describes the privacy statement of this software.
|
||||
@@ -70,14 +68,7 @@ The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.micro
|
||||
## Contributions and "Thank You"
|
||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||
|
||||
* eulercamposbarros for `Prevent connections from moving on click (#7528)`
|
||||
* AlexFsmn for `Fixed issue where task icons got hidden if text was too long`
|
||||
* jamesrod817 for `Tempdb (#7022)`
|
||||
* dzsquared for `fix(snippets): ads parenthesis to sqlcreateindex snippet #7020`
|
||||
* devmattrick for `Update row count as updates are received #6642`
|
||||
* mottykohn for `In Message panel onclick scroll to line #6417`
|
||||
* Stevoni for `Corrected Keyboard Shortcut Execution Issue #5480`
|
||||
* yamatoya for `fix the format #4899`
|
||||
* yamatoya for `fix the format (#4899)`
|
||||
* GeoffYoung for `Fix sqlDropColumn description #4422`
|
||||
* AlexFsmn for `Added context menu for DBs in explorer view to backup & restore db. #2277`
|
||||
* sadedil for `Missing feature request: Save as XML #3729`
|
||||
@@ -122,19 +113,22 @@ We would like to thank all our users who raised issues, and in particular the fo
|
||||
* SebastianPfliegel `Remove sqlExtensionHelp (#312)`
|
||||
* olljanat for `Implemented npm version check (#314)`
|
||||
* Adam Machanic for helping with the `whoisactive` extension
|
||||
* All community localization contributors:
|
||||
* French: Adrien Clerbois, ANAS BELABBES, Antoine Griffard, Arian Papillon, Eric Macarez, Eric Van Thorre, Jérémy LANDON, Matthias GROSPERRIN, Maxime COQUEREL, Olivier Guinart, thierry DEMAN-BARCELÒ, Thomas Potier
|
||||
* Italian: Aldo Donetti, Alessandro Alpi, Andrea Dottor, Bruni Luca, Gianluca Hotz, Luca Nardi, Luigi Bruno, Marco Dal Pino, Mirco Vanini, Pasquale Ceglie, Riccardo Cappello, Sergio Govoni, Stefano Demiliani
|
||||
* German: Anna Henke-Gunvaldson, Ben Weissman, David Ullmer, J.M. ., Kai Modo, Konstantin Staschill, Kostja Klein, Lennart Trunk, Markus Ehrenmüller-Jensen, Mascha Kroenlein, Matthias Knoll, Mourad Louha, Thomas Hütter, Wolfgang Straßer
|
||||
* Spanish: Alberto Poblacion, Andy Gonzalez, Carlos Mendible, Christian Araujo, Daniel D, Eickhel Mendoza, Ernesto Cardenas, Ivan Toledo Ivanovic, Fran Diaz, JESUS GIL, Jorge Serrano Pérez, José Saturnino Pimentel Juárez, Mauricio Hidalgo, Pablo Iglesias, Rikhardo Estrada Rdez, Thierry DEMAN, YOLANDA CUESTA ALTIERI
|
||||
* Japanese: Fujio Kojima, Kazushi KAMEGAWA, Masayoshi Yamada, Masayuki Ozawa, Seiji Momoto, Takashi Kanai, Takayoshi Tanaka, Yoshihisa Ozaki, 庄垣内治
|
||||
* Chinese (simplified): DAN YE, Joel Yang, Lynne Dong, Ryan(Yu) Zhang, Sheng Jiang, Wei Zhang, Zhiliang Xu
|
||||
* Chinese (Traditional): Bruce Chen, Chiayi Yen, Kevin Yang, Winnie Lin, 保哥 Will, 謝政廷
|
||||
* Korean: Do-Kyun Kim, Evelyn Kim, Helen Jung, Hong Jmee, jeongwoo choi, Jun Hyoung Lee, Jungsun Kim정선, Justin Yoo, Kavrith mucha, Kiwoong Youm, MinGyu Ju, MVP_JUNO BEA, Sejun Kim, SOONMAN KWON, sung man ko, Yeongrak Choi, younggun kim, Youngjae Kim, 소영 이
|
||||
* Russian: Andrey Veselov, Anton Fontanov, Anton Savin, Elena Ostrovskaia, Igor Babichev, Maxim Zelensky, Rodion Fedechkin, Tasha T, Vladimir Zyryanov
|
||||
* Portuguese Brazil: Daniel de Sousa, Diogo Duarte, Douglas Correa, Douglas Eccker, José Emanuel Mendes, Marcelo Fernandes, Marcondes Alexandre, Roberto Fonseca, Rodrigo Crespi
|
||||
|
||||
And of course, we'd like to thank the authors of all upstream dependencies. Please see a full list in the [ThirdPartyNotices.txt](https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/ThirdPartyNotices.txt)
|
||||
And of course, we'd like to thank the authors of all upstream dependencies. Please see a full list in the [ThirdPartyNotices.txt](https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/ThirdPartyNotices.txt)
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Licensed under the [Source EULA](LICENSE.txt).
|
||||
|
||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2150927
|
||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2150928
|
||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2151312
|
||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2151311
|
||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2151508
|
||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2151407
|
||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2151506
|
||||
|
||||
@@ -12,7 +12,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
angular2-grid: https://github.com/BTMorton/angular2-grid
|
||||
angular2-slickgrid: https://github.com/Microsoft/angular2-slickgrid
|
||||
applicationinsights: https://github.com/Microsoft/ApplicationInsights-node.js
|
||||
axios: https://github.com/axios/axios
|
||||
bootstrap: https://github.com/twbs/bootstrap
|
||||
chart.js: https://github.com/Timer/chartjs
|
||||
chokidar: https://github.com/paulmillr/chokidar
|
||||
@@ -37,11 +36,8 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
jquery-ui: https://github.com/jquery/jquery-ui
|
||||
jquery.event.drag: https://github.com/devongovett/jquery.event.drag
|
||||
jschardet: https://github.com/aadsm/jschardet
|
||||
jupyter-powershell: https://github.com/vors/jupyter-powershell
|
||||
JupyterLab: https://github.com/jupyterlab/jupyterlab
|
||||
keytar: https://github.com/atom/node-keytar
|
||||
make-error: https://github.com/JsCommunity/make-error
|
||||
mark.js: https://github.com/julmot/mark.js
|
||||
minimist: https://github.com/substack/minimist
|
||||
moment: https://github.com/moment/moment
|
||||
native-keymap: https://github.com/Microsoft/node-native-keymap
|
||||
@@ -50,11 +46,10 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
node-fetch: https://github.com/bitinn/node-fetch
|
||||
node-pty: https://github.com/Tyriar/node-pty
|
||||
nsfw: https://github.com/Axosoft/nsfw
|
||||
optimist: https://github.com/substack/node-optimist
|
||||
pretty-data: https://github.com/vkiryukhin/pretty-data
|
||||
primeng: https://github.com/primefaces/primeng
|
||||
process-nextick-args: https://github.com/calvinmetcalf/process-nextick-args
|
||||
pty.js: https://github.com/chjj/pty.js
|
||||
qs: https://github.com/ljharb/qs
|
||||
reflect-metadata: https://github.com/rbuckton/reflect-metadata
|
||||
request: https://github.com/request/request
|
||||
rxjs: https://github.com/ReactiveX/RxJS
|
||||
@@ -64,8 +59,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
svg.js: https://github.com/svgdotjs/svg.js
|
||||
systemjs: https://github.com/systemjs/systemjs
|
||||
temp-write: https://github.com/sindresorhus/temp-write
|
||||
turndown: https://github.com/domchristie/turndown
|
||||
turndown-plugin-gfm: https://github.com/domchristie/turndown-plugin-gfm
|
||||
underscore: https://github.com/jashkenas/underscore
|
||||
v8-profiler: https://github.com/node-inspector/v8-profiler
|
||||
vscode: https://github.com/microsoft/vscode
|
||||
@@ -75,10 +68,7 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
vscode-ripgrep: https://github.com/roblourens/vscode-ripgrep
|
||||
vscode-textmate: https://github.com/Microsoft/vscode-textmate
|
||||
winreg: https://github.com/fresc81/node-winreg
|
||||
xmldom: https://github.com/xmldom/xmldom
|
||||
xml-formatter: https://github.com/chrisbottin/xml-formatter
|
||||
xterm: https://github.com/sourcelair/xterm.js
|
||||
yargs: https://github.com/yargs/yargs
|
||||
yauzl: https://github.com/thejoshwolfe/yauzl
|
||||
zone.js: https://www.npmjs.com/package/zone
|
||||
|
||||
@@ -1186,35 +1176,7 @@ That's all there is to it!
|
||||
=========================================
|
||||
END OF jschardet NOTICES AND INFORMATION
|
||||
|
||||
%% jupyter-powershell NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Sergei Vorobev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
=========================================
|
||||
END OF jupyter-powershell NOTICES AND INFORMATION
|
||||
|
||||
%% JupyterLab NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2015 Project Jupyter Contributors
|
||||
All rights reserved.
|
||||
|
||||
@@ -1257,32 +1219,6 @@ ISC © Julien Fontanet
|
||||
=========================================
|
||||
END OF make-error NOTICES AND INFORMATION
|
||||
|
||||
%% mark.js NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014–2019 Julian Kühnel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=========================================
|
||||
END OF mark.js NOTICES AND INFORMATION
|
||||
|
||||
%% minimist NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
This software is released under the MIT license:
|
||||
@@ -1484,31 +1420,15 @@ SOFTWARE.
|
||||
=========================================
|
||||
END OF nsfw NOTICES AND INFORMATION
|
||||
|
||||
%% optimist NOTICES AND INFORMATION BEGIN HERE
|
||||
%% pretty-data NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright 2010 James Halliday (mail@substack.net)
|
||||
License: Dual licensed under the MIT and GPL licenses:
|
||||
|
||||
This project is free software released under the MIT/X11 license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
=========================================
|
||||
END OF optimist NOTICES AND INFORMATION
|
||||
END OF pretty-data NOTICES AND INFORMATION
|
||||
|
||||
%% primeng NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
@@ -2031,58 +1951,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
=========================================
|
||||
END OF temp-write NOTICES AND INFORMATION
|
||||
|
||||
%% turndown NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Dom Christie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=========================================
|
||||
END OF turndown NOTICES AND INFORMATION
|
||||
|
||||
%% turndown-plugin-gfm NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Dom Christie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=========================================
|
||||
END OF turndown-plugin-gfm NOTICES AND INFORMATION
|
||||
|
||||
%% underscore NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||
@@ -2308,51 +2176,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
=========================================
|
||||
END OF winreg NOTICES AND INFORMATION
|
||||
|
||||
%% xmldom NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies
|
||||
or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF xmldom NOTICES AND INFORMATION
|
||||
|
||||
%% xml-formatter NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 Chris Bottin (https://github.com/chrisbottin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
=========================================
|
||||
END OF xml-formatter NOTICES AND INFORMATION
|
||||
|
||||
%% xterm NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
|
||||
@@ -2378,32 +2201,6 @@ THE SOFTWARE.
|
||||
=========================================
|
||||
END OF xterm NOTICES AND INFORMATION
|
||||
|
||||
%% yargs NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
MIT License
|
||||
|
||||
Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
=========================================
|
||||
END OF yargs NOTICES AND INFORMATION
|
||||
|
||||
%% yauzl NOTICES AND INFORMATION BEGIN HERE
|
||||
=========================================
|
||||
The MIT License (MIT)
|
||||
|
||||
69
azure-pipelines-linux-mac.yml
Normal file
69
azure-pipelines-linux-mac.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '8.x'
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
- script: |
|
||||
git submodule update --init --recursive
|
||||
nvm install 10.15.1
|
||||
nvm use 10.15.1
|
||||
npm i -g yarn
|
||||
displayName: 'preinstall'
|
||||
|
||||
- script: |
|
||||
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:10
|
||||
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
||||
sudo chmod +x /etc/init.d/xvfb
|
||||
sudo update-rc.d xvfb defaults
|
||||
sudo service xvfb start
|
||||
# sh -e /etc/init.d/xvfb start
|
||||
# sleep 3
|
||||
displayName: 'Linux preinstall'
|
||||
condition: eq(variables['Agent.OS'], 'Linux')
|
||||
|
||||
- script: |
|
||||
yarn
|
||||
displayName: 'Install'
|
||||
|
||||
- script: |
|
||||
yarn gulp electron-x64
|
||||
displayName: Download Electron
|
||||
|
||||
- script: |
|
||||
yarn gulp hygiene
|
||||
displayName: Run Hygiene Checks
|
||||
|
||||
- script: |
|
||||
yarn tslint
|
||||
displayName: 'Run TSLint'
|
||||
|
||||
- script: |
|
||||
yarn strict-null-check
|
||||
displayName: 'Run Strict Null Check'
|
||||
|
||||
- script: |
|
||||
yarn compile
|
||||
displayName: 'Compile'
|
||||
|
||||
- script: |
|
||||
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter
|
||||
displayName: 'Tests'
|
||||
condition: eq(variables['Agent.OS'], 'Linux')
|
||||
|
||||
- script: |
|
||||
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter --coverage
|
||||
displayName: 'Tests'
|
||||
condition: ne(variables['Agent.OS'], 'Linux')
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFiles: '**/test-results.xml'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
inputs:
|
||||
codeCoverageTool: 'cobertura'
|
||||
summaryFileLocation: $(System.DefaultWorkingDirectory)/.build/coverage/cobertura-coverage.xml
|
||||
reportDirectory: $(System.DefaultWorkingDirectory)/.build/coverage/lcov-reports
|
||||
condition: ne(variables['Agent.OS'], 'Linux')
|
||||
44
azure-pipelines-windows.yml
Normal file
44
azure-pipelines-windows.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '10.15.1'
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
- script: |
|
||||
yarn
|
||||
displayName: 'Yarn Install'
|
||||
|
||||
- script: |
|
||||
yarn gulp electron-x64
|
||||
displayName: 'Electron'
|
||||
|
||||
- script: |
|
||||
yarn gulp hygiene
|
||||
displayName: Run Hygiene Checks
|
||||
|
||||
- script: |
|
||||
yarn tslint
|
||||
displayName: 'Run TSLint'
|
||||
|
||||
- script: |
|
||||
yarn strict-null-check
|
||||
displayName: 'Run Strict Null Check'
|
||||
|
||||
- script: |
|
||||
yarn compile
|
||||
displayName: 'Compile'
|
||||
|
||||
- script: |
|
||||
.\scripts\test.bat --reporter mocha-junit-reporter --coverage
|
||||
displayName: 'Test'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFiles: 'test-results.xml'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
inputs:
|
||||
codeCoverageTool: 'cobertura'
|
||||
summaryFileLocation: $(System.DefaultWorkingDirectory)\.build\coverage\cobertura-coverage.xml
|
||||
reportDirectory: $(System.DefaultWorkingDirectory)\.build\coverage\lcov-report
|
||||
@@ -1,22 +1,29 @@
|
||||
trigger:
|
||||
- main
|
||||
- release/*
|
||||
- master
|
||||
- releases/*
|
||||
|
||||
jobs:
|
||||
- job: Windows
|
||||
pool:
|
||||
vmImage: VS2017-Win2016
|
||||
steps:
|
||||
- template: build/azure-pipelines/win32/continuous-build-win32.yml
|
||||
|
||||
- job: Linux
|
||||
# All tasks on Windows
|
||||
- job: build_all_windows
|
||||
displayName: Build all tasks (Windows)
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
- template: build/azure-pipelines/linux/continuous-build-linux.yml
|
||||
- template: azure-pipelines-windows.yml
|
||||
|
||||
- job: macOS
|
||||
# All tasks on Linux
|
||||
- job: build_all_linux
|
||||
displayName: Build all tasks (Linux)
|
||||
pool:
|
||||
vmImage: macOS-latest
|
||||
vmImage: 'Ubuntu 16.04'
|
||||
steps:
|
||||
- template: build/azure-pipelines/darwin/continuous-build-darwin.yml
|
||||
- template: azure-pipelines-linux-mac.yml
|
||||
|
||||
# All tasks on macOS
|
||||
- job: build_all_darwin
|
||||
displayName: Build all tasks (macOS)
|
||||
pool:
|
||||
vmImage: macos-10.13
|
||||
steps:
|
||||
- template: azure-pipelines-linux-mac.yml
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
2020-04-29T05:20:58.491Z
|
||||
1
build/.gitattributes
vendored
1
build/.gitattributes
vendored
@@ -1 +0,0 @@
|
||||
* text eol=lf
|
||||
@@ -1,124 +0,0 @@
|
||||
# cleanup rules for native node modules, .gitignore style
|
||||
|
||||
nan/**
|
||||
*/node_modules/nan/**
|
||||
|
||||
fsevents/binding.gyp
|
||||
fsevents/fsevents.cc
|
||||
fsevents/build/**
|
||||
fsevents/src/**
|
||||
fsevents/test/**
|
||||
!fsevents/**/*.node
|
||||
|
||||
vscode-sqlite3/binding.gyp
|
||||
vscode-sqlite3/benchmark/**
|
||||
vscode-sqlite3/cloudformation/**
|
||||
vscode-sqlite3/deps/**
|
||||
vscode-sqlite3/test/**
|
||||
vscode-sqlite3/build/**
|
||||
vscode-sqlite3/src/**
|
||||
!vscode-sqlite3/build/Release/*.node
|
||||
|
||||
windows-mutex/binding.gyp
|
||||
windows-mutex/build/**
|
||||
windows-mutex/src/**
|
||||
!windows-mutex/**/*.node
|
||||
|
||||
native-keymap/binding.gyp
|
||||
native-keymap/build/**
|
||||
native-keymap/src/**
|
||||
native-keymap/deps/**
|
||||
!native-keymap/build/Release/*.node
|
||||
|
||||
native-is-elevated/binding.gyp
|
||||
native-is-elevated/build/**
|
||||
native-is-elevated/src/**
|
||||
native-is-elevated/deps/**
|
||||
!native-is-elevated/build/Release/*.node
|
||||
|
||||
native-watchdog/binding.gyp
|
||||
native-watchdog/build/**
|
||||
native-watchdog/src/**
|
||||
!native-watchdog/build/Release/*.node
|
||||
|
||||
spdlog/binding.gyp
|
||||
spdlog/build/**
|
||||
spdlog/deps/**
|
||||
spdlog/src/**
|
||||
spdlog/test/**
|
||||
!spdlog/build/Release/*.node
|
||||
|
||||
jschardet/dist/**
|
||||
|
||||
windows-foreground-love/binding.gyp
|
||||
windows-foreground-love/build/**
|
||||
windows-foreground-love/src/**
|
||||
!windows-foreground-love/**/*.node
|
||||
|
||||
windows-process-tree/binding.gyp
|
||||
windows-process-tree/build/**
|
||||
windows-process-tree/src/**
|
||||
!windows-process-tree/**/*.node
|
||||
|
||||
keytar/binding.gyp
|
||||
keytar/build/**
|
||||
keytar/src/**
|
||||
keytar/script/**
|
||||
keytar/node_modules/**
|
||||
!keytar/**/*.node
|
||||
|
||||
node-pty/binding.gyp
|
||||
node-pty/build/**
|
||||
node-pty/src/**
|
||||
node-pty/tools/**
|
||||
node-pty/deps/**
|
||||
!node-pty/build/Release/*.exe
|
||||
!node-pty/build/Release/*.dll
|
||||
!node-pty/build/Release/*.node
|
||||
|
||||
# START SQL Modules
|
||||
|
||||
@angular/**/src/**
|
||||
@angular/**/testing/**
|
||||
|
||||
angular2-grid/components/**
|
||||
angular2-grid/directives/**
|
||||
angular2-grid/interfaces/**
|
||||
angular2-grid/modules/**
|
||||
|
||||
angular2-slickgrid/.vscode/**
|
||||
angular2-slickgrid/components/**
|
||||
angular2-slickgrid/examples/**
|
||||
|
||||
jquery-ui/external/**
|
||||
jquery-ui/demos/**
|
||||
|
||||
slickgrid/node_modules/**
|
||||
slickgrid/examples/**
|
||||
|
||||
kerberos/build/**
|
||||
|
||||
# END SQL Modules
|
||||
|
||||
vscode-nsfw/binding.gyp
|
||||
vscode-nsfw/build/**
|
||||
vscode-nsfw/src/**
|
||||
vscode-nsfw/openpa/**
|
||||
vscode-nsfw/includes/**
|
||||
!vscode-nsfw/build/Release/*.node
|
||||
!vscode-nsfw/**/*.a
|
||||
|
||||
vsda/build/**
|
||||
vsda/ci/**
|
||||
vsda/src/**
|
||||
vsda/.gitignore
|
||||
vsda/binding.gyp
|
||||
vsda/README.md
|
||||
vsda/targets
|
||||
!vsda/build/Release/vsda.node
|
||||
|
||||
vscode-windows-ca-certs/**/*
|
||||
!vscode-windows-ca-certs/package.json
|
||||
!vscode-windows-ca-certs/**/*.node
|
||||
|
||||
node-addon-api/**/*
|
||||
@@ -1,27 +0,0 @@
|
||||
# cleanup rules for web node modules, .gitignore style
|
||||
|
||||
**/*.txt
|
||||
**/*.json
|
||||
**/*.md
|
||||
**/*.d.ts
|
||||
**/*.js.map
|
||||
**/LICENSE
|
||||
**/CONTRIBUTORS
|
||||
|
||||
jschardet/index.js
|
||||
jschardet/src/**
|
||||
jschardet/dist/jschardet.js
|
||||
|
||||
vscode-textmate/webpack.config.js
|
||||
|
||||
xterm/src/**
|
||||
|
||||
xterm-addon-search/src/**
|
||||
xterm-addon-search/out/**
|
||||
xterm-addon-search/fixtures/**
|
||||
|
||||
xterm-addon-unicode11/src/**
|
||||
xterm-addon-unicode11/out/**
|
||||
|
||||
xterm-addon-webgl/src/**
|
||||
xterm-addon-webgl/out/**
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018
|
||||
},
|
||||
"rules": {
|
||||
}
|
||||
}
|
||||
2
build/actions/.gitignore
vendored
2
build/actions/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
*.js.map
|
||||
@@ -1,6 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
@@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export interface GitHub {
|
||||
query(query: Query): AsyncIterableIterator<GitHubIssue[]>
|
||||
|
||||
hasWriteAccess(user: User): Promise<boolean>
|
||||
|
||||
repoHasLabel(label: string): Promise<boolean>
|
||||
createLabel(label: string, color: string, description: string): Promise<void>
|
||||
deleteLabel(label: string): Promise<void>
|
||||
|
||||
readConfig(path: string): Promise<any>
|
||||
|
||||
createIssue(owner: string, repo: string, title: string, body: string): Promise<void>
|
||||
|
||||
releaseContainsCommit(release: string, commit: string): Promise<boolean>
|
||||
}
|
||||
|
||||
export interface GitHubIssue extends GitHub {
|
||||
getIssue(): Promise<Issue>
|
||||
|
||||
postComment(body: string): Promise<void>
|
||||
deleteComment(id: number): Promise<void>
|
||||
getComments(last?: boolean): AsyncIterableIterator<Comment[]>
|
||||
|
||||
closeIssue(): Promise<void>
|
||||
lockIssue(): Promise<void>
|
||||
|
||||
setMilestone(milestoneId: number): Promise<void>
|
||||
|
||||
addLabel(label: string): Promise<void>
|
||||
removeLabel(label: string): Promise<void>
|
||||
|
||||
addAssignee(assignee: string): Promise<void>
|
||||
|
||||
getClosingInfo(): Promise<{ hash: string | undefined; timestamp: number } | undefined>
|
||||
}
|
||||
|
||||
type SortVar =
|
||||
| 'comments'
|
||||
| 'reactions'
|
||||
| 'reactions-+1'
|
||||
| 'reactions--1'
|
||||
| 'reactions-smile'
|
||||
| 'reactions-thinking_face'
|
||||
| 'reactions-heart'
|
||||
| 'reactions-tada'
|
||||
| 'interactions'
|
||||
| 'created'
|
||||
| 'updated'
|
||||
type SortOrder = 'asc' | 'desc'
|
||||
export type Reactions = {
|
||||
'+1': number
|
||||
'-1': number
|
||||
laugh: number
|
||||
hooray: number
|
||||
confused: number
|
||||
heart: number
|
||||
rocket: number
|
||||
eyes: number
|
||||
}
|
||||
|
||||
export interface User {
|
||||
name: string
|
||||
isGitHubApp?: boolean
|
||||
}
|
||||
export interface Comment {
|
||||
author: User
|
||||
body: string
|
||||
id: number
|
||||
timestamp: number
|
||||
}
|
||||
export interface Issue {
|
||||
author: User
|
||||
body: string
|
||||
title: string
|
||||
labels: string[]
|
||||
open: boolean
|
||||
locked: boolean
|
||||
number: number
|
||||
numComments: number
|
||||
reactions: Reactions
|
||||
milestoneId: number | null
|
||||
assignee?: string
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
closedAt?: number
|
||||
}
|
||||
export interface Query {
|
||||
q: string
|
||||
sort?: SortVar
|
||||
order?: SortOrder
|
||||
}
|
||||
@@ -1,293 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("@actions/core");
|
||||
const github_1 = require("@actions/github");
|
||||
const child_process_1 = require("child_process");
|
||||
const utils_1 = require("../utils/utils");
|
||||
class OctoKit {
|
||||
constructor(token, params, options = { readonly: false }) {
|
||||
this.token = token;
|
||||
this.params = params;
|
||||
this.options = options;
|
||||
// when in readonly mode, record labels just-created so at to not throw unneccesary errors
|
||||
this.mockLabels = new Set();
|
||||
this.writeAccessCache = {};
|
||||
this.octokit = new github_1.GitHub(token);
|
||||
}
|
||||
async *query(query) {
|
||||
const q = query.q + ` repo:${this.params.owner}/${this.params.repo}`;
|
||||
console.log(`Querying for ${q}:`);
|
||||
const options = this.octokit.search.issuesAndPullRequests.endpoint.merge({
|
||||
...query,
|
||||
q,
|
||||
per_page: 100,
|
||||
headers: { Accept: 'application/vnd.github.squirrel-girl-preview+json' },
|
||||
});
|
||||
let pageNum = 0;
|
||||
const timeout = async () => {
|
||||
if (pageNum < 2) {
|
||||
/* pass */
|
||||
}
|
||||
else if (pageNum < 4) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
}
|
||||
else {
|
||||
await new Promise((resolve) => setTimeout(resolve, 30000));
|
||||
}
|
||||
};
|
||||
for await (const pageResponse of this.octokit.paginate.iterator(options)) {
|
||||
await timeout();
|
||||
await utils_1.logRateLimit(this.token);
|
||||
const page = pageResponse.data;
|
||||
console.log(`Page ${++pageNum}: ${page.map(({ number }) => number).join(' ')}`);
|
||||
yield page.map((issue) => new OctoKitIssue(this.token, this.params, this.octokitIssueToIssue(issue)));
|
||||
}
|
||||
}
|
||||
async createIssue(owner, repo, title, body) {
|
||||
core_1.debug(`Creating issue \`${title}\` on ${owner}/${repo}`);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.create({ owner, repo, title, body });
|
||||
}
|
||||
octokitIssueToIssue(issue) {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
return {
|
||||
author: { name: issue.user.login, isGitHubApp: issue.user.type === 'Bot' },
|
||||
body: issue.body,
|
||||
number: issue.number,
|
||||
title: issue.title,
|
||||
labels: issue.labels.map((label) => label.name),
|
||||
open: issue.state === 'open',
|
||||
locked: issue.locked,
|
||||
numComments: issue.comments,
|
||||
reactions: issue.reactions,
|
||||
assignee: (_b = (_a = issue.assignee) === null || _a === void 0 ? void 0 : _a.login) !== null && _b !== void 0 ? _b : (_d = (_c = issue.assignees) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.login,
|
||||
milestoneId: (_f = (_e = issue.milestone) === null || _e === void 0 ? void 0 : _e.number) !== null && _f !== void 0 ? _f : null,
|
||||
createdAt: +new Date(issue.created_at),
|
||||
updatedAt: +new Date(issue.updated_at),
|
||||
closedAt: issue.closed_at ? +new Date(issue.closed_at) : undefined,
|
||||
};
|
||||
}
|
||||
async hasWriteAccess(user) {
|
||||
if (user.name in this.writeAccessCache) {
|
||||
core_1.debug('Got permissions from cache for ' + user);
|
||||
return this.writeAccessCache[user.name];
|
||||
}
|
||||
core_1.debug('Fetching permissions for ' + user);
|
||||
const permissions = (await this.octokit.repos.getCollaboratorPermissionLevel({
|
||||
...this.params,
|
||||
username: user.name,
|
||||
})).data.permission;
|
||||
return (this.writeAccessCache[user.name] = permissions === 'admin' || permissions === 'write');
|
||||
}
|
||||
async repoHasLabel(name) {
|
||||
try {
|
||||
await this.octokit.issues.getLabel({ ...this.params, name });
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
if (err.status === 404) {
|
||||
return this.options.readonly && this.mockLabels.has(name);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
async createLabel(name, color, description) {
|
||||
core_1.debug('Creating label ' + name);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.createLabel({ ...this.params, color, description, name });
|
||||
else
|
||||
this.mockLabels.add(name);
|
||||
}
|
||||
async deleteLabel(name) {
|
||||
core_1.debug('Deleting label ' + name);
|
||||
try {
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.deleteLabel({ ...this.params, name });
|
||||
}
|
||||
catch (err) {
|
||||
if (err.status === 404) {
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
async readConfig(path) {
|
||||
core_1.debug('Reading config at ' + path);
|
||||
const repoPath = `.github/${path}.json`;
|
||||
const data = (await this.octokit.repos.getContents({ ...this.params, path: repoPath })).data;
|
||||
if ('type' in data && data.type === 'file') {
|
||||
if (data.encoding === 'base64' && data.content) {
|
||||
return JSON.parse(Buffer.from(data.content, 'base64').toString('utf-8'));
|
||||
}
|
||||
throw Error(`Could not read contents "${data.content}" in encoding "${data.encoding}"`);
|
||||
}
|
||||
throw Error('Found directory at config path when expecting file' + JSON.stringify(data));
|
||||
}
|
||||
async releaseContainsCommit(release, commit) {
|
||||
if (utils_1.getInput('commitReleasedDebuggingOverride')) {
|
||||
return true;
|
||||
}
|
||||
return new Promise((resolve, reject) => child_process_1.exec(`git -C ./repo merge-base --is-ancestor ${commit} ${release}`, (err) => !err || err.code === 1 ? resolve(!err) : reject(err)));
|
||||
}
|
||||
}
|
||||
exports.OctoKit = OctoKit;
|
||||
class OctoKitIssue extends OctoKit {
|
||||
constructor(token, params, issueData, options = { readonly: false }) {
|
||||
super(token, params, options);
|
||||
this.params = params;
|
||||
this.issueData = issueData;
|
||||
}
|
||||
async addAssignee(assignee) {
|
||||
core_1.debug('Adding assignee ' + assignee + ' to ' + this.issueData.number);
|
||||
if (!this.options.readonly) {
|
||||
await this.octokit.issues.addAssignees({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
assignees: [assignee],
|
||||
});
|
||||
}
|
||||
}
|
||||
async closeIssue() {
|
||||
core_1.debug('Closing issue ' + this.issueData.number);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.update({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
state: 'closed',
|
||||
});
|
||||
}
|
||||
async lockIssue() {
|
||||
core_1.debug('Locking issue ' + this.issueData.number);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.lock({ ...this.params, issue_number: this.issueData.number });
|
||||
}
|
||||
async getIssue() {
|
||||
if (isIssue(this.issueData)) {
|
||||
core_1.debug('Got issue data from query result ' + this.issueData.number);
|
||||
return this.issueData;
|
||||
}
|
||||
console.log('Fetching issue ' + this.issueData.number);
|
||||
const issue = (await this.octokit.issues.get({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
mediaType: { previews: ['squirrel-girl'] },
|
||||
})).data;
|
||||
return (this.issueData = this.octokitIssueToIssue(issue));
|
||||
}
|
||||
async postComment(body) {
|
||||
core_1.debug(`Posting comment ${body} on ${this.issueData.number}`);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.createComment({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
body,
|
||||
});
|
||||
}
|
||||
async deleteComment(id) {
|
||||
core_1.debug(`Deleting comment ${id} on ${this.issueData.number}`);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.deleteComment({
|
||||
owner: this.params.owner,
|
||||
repo: this.params.repo,
|
||||
comment_id: id,
|
||||
});
|
||||
}
|
||||
async setMilestone(milestoneId) {
|
||||
core_1.debug(`Setting milestone for ${this.issueData.number} to ${milestoneId}`);
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.update({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
milestone: milestoneId,
|
||||
});
|
||||
}
|
||||
async *getComments(last) {
|
||||
core_1.debug('Fetching comments for ' + this.issueData.number);
|
||||
const response = this.octokit.paginate.iterator(this.octokit.issues.listComments.endpoint.merge({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
per_page: 100,
|
||||
...(last ? { per_page: 1, page: (await this.getIssue()).numComments } : {}),
|
||||
}));
|
||||
for await (const page of response) {
|
||||
yield page.data.map((comment) => ({
|
||||
author: { name: comment.user.login, isGitHubApp: comment.user.type === 'Bot' },
|
||||
body: comment.body,
|
||||
id: comment.id,
|
||||
timestamp: +new Date(comment.created_at),
|
||||
}));
|
||||
}
|
||||
}
|
||||
async addLabel(name) {
|
||||
core_1.debug(`Adding label ${name} to ${this.issueData.number}`);
|
||||
if (!(await this.repoHasLabel(name))) {
|
||||
throw Error(`Action could not execute becuase label ${name} is not defined.`);
|
||||
}
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.addLabels({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
labels: [name],
|
||||
});
|
||||
}
|
||||
async removeLabel(name) {
|
||||
core_1.debug(`Removing label ${name} from ${this.issueData.number}`);
|
||||
try {
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.removeLabel({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
name,
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
if (err.status === 404) {
|
||||
console.log(`Label ${name} not found on issue`);
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
async getClosingInfo() {
|
||||
var _a;
|
||||
if ((await this.getIssue()).open) {
|
||||
return;
|
||||
}
|
||||
const options = this.octokit.issues.listEventsForTimeline.endpoint.merge({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
});
|
||||
let closingCommit;
|
||||
for await (const event of this.octokit.paginate.iterator(options)) {
|
||||
const timelineEvents = event.data;
|
||||
for (const timelineEvent of timelineEvents) {
|
||||
if (timelineEvent.event === 'closed') {
|
||||
closingCommit = {
|
||||
hash: (_a = timelineEvent.commit_id) !== null && _a !== void 0 ? _a : undefined,
|
||||
timestamp: +new Date(timelineEvent.created_at),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(`Got ${closingCommit} as closing commit of ${this.issueData.number}`);
|
||||
return closingCommit;
|
||||
}
|
||||
}
|
||||
exports.OctoKitIssue = OctoKitIssue;
|
||||
function isIssue(object) {
|
||||
const isIssue = 'author' in object &&
|
||||
'body' in object &&
|
||||
'title' in object &&
|
||||
'labels' in object &&
|
||||
'open' in object &&
|
||||
'locked' in object &&
|
||||
'number' in object &&
|
||||
'numComments' in object &&
|
||||
'reactions' in object &&
|
||||
'milestoneId' in object;
|
||||
return isIssue;
|
||||
}
|
||||
@@ -1,336 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { debug } from '@actions/core'
|
||||
import { GitHub as GitHubAPI } from '@actions/github'
|
||||
import { Octokit } from '@octokit/rest'
|
||||
import { exec } from 'child_process'
|
||||
import { getInput, logRateLimit } from '../utils/utils'
|
||||
import { Comment, GitHub, GitHubIssue, Issue, Query, User } from './api'
|
||||
|
||||
export class OctoKit implements GitHub {
|
||||
protected octokit: GitHubAPI
|
||||
// when in readonly mode, record labels just-created so at to not throw unneccesary errors
|
||||
protected mockLabels: Set<string> = new Set()
|
||||
|
||||
constructor(
|
||||
private token: string,
|
||||
protected params: { repo: string; owner: string },
|
||||
protected options: { readonly: boolean } = { readonly: false },
|
||||
) {
|
||||
this.octokit = new GitHubAPI(token)
|
||||
}
|
||||
|
||||
async *query(query: Query): AsyncIterableIterator<GitHubIssue[]> {
|
||||
const q = query.q + ` repo:${this.params.owner}/${this.params.repo}`
|
||||
console.log(`Querying for ${q}:`)
|
||||
|
||||
const options = this.octokit.search.issuesAndPullRequests.endpoint.merge({
|
||||
...query,
|
||||
q,
|
||||
per_page: 100,
|
||||
headers: { Accept: 'application/vnd.github.squirrel-girl-preview+json' },
|
||||
})
|
||||
|
||||
let pageNum = 0
|
||||
|
||||
const timeout = async () => {
|
||||
if (pageNum < 2) {
|
||||
/* pass */
|
||||
} else if (pageNum < 4) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000))
|
||||
} else {
|
||||
await new Promise((resolve) => setTimeout(resolve, 30000))
|
||||
}
|
||||
}
|
||||
|
||||
for await (const pageResponse of this.octokit.paginate.iterator(options)) {
|
||||
await timeout()
|
||||
await logRateLimit(this.token)
|
||||
const page: Array<Octokit.SearchIssuesAndPullRequestsResponseItemsItem> = pageResponse.data
|
||||
console.log(`Page ${++pageNum}: ${page.map(({ number }) => number).join(' ')}`)
|
||||
yield page.map(
|
||||
(issue) => new OctoKitIssue(this.token, this.params, this.octokitIssueToIssue(issue)),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
async createIssue(owner: string, repo: string, title: string, body: string): Promise<void> {
|
||||
debug(`Creating issue \`${title}\` on ${owner}/${repo}`)
|
||||
if (!this.options.readonly) await this.octokit.issues.create({ owner, repo, title, body })
|
||||
}
|
||||
|
||||
protected octokitIssueToIssue(
|
||||
issue: Octokit.IssuesGetResponse | Octokit.SearchIssuesAndPullRequestsResponseItemsItem,
|
||||
): Issue {
|
||||
return {
|
||||
author: { name: issue.user.login, isGitHubApp: issue.user.type === 'Bot' },
|
||||
body: issue.body,
|
||||
number: issue.number,
|
||||
title: issue.title,
|
||||
labels: (issue.labels as Octokit.IssuesGetLabelResponse[]).map((label) => label.name),
|
||||
open: issue.state === 'open',
|
||||
locked: (issue as any).locked,
|
||||
numComments: issue.comments,
|
||||
reactions: (issue as any).reactions,
|
||||
assignee: issue.assignee?.login ?? (issue as any).assignees?.[0]?.login,
|
||||
milestoneId: issue.milestone?.number ?? null,
|
||||
createdAt: +new Date(issue.created_at),
|
||||
updatedAt: +new Date(issue.updated_at),
|
||||
closedAt: issue.closed_at ? +new Date((issue.closed_at as unknown) as string) : undefined,
|
||||
}
|
||||
}
|
||||
|
||||
private writeAccessCache: Record<string, boolean> = {}
|
||||
async hasWriteAccess(user: User): Promise<boolean> {
|
||||
if (user.name in this.writeAccessCache) {
|
||||
debug('Got permissions from cache for ' + user)
|
||||
return this.writeAccessCache[user.name]
|
||||
}
|
||||
debug('Fetching permissions for ' + user)
|
||||
const permissions = (
|
||||
await this.octokit.repos.getCollaboratorPermissionLevel({
|
||||
...this.params,
|
||||
username: user.name,
|
||||
})
|
||||
).data.permission
|
||||
return (this.writeAccessCache[user.name] = permissions === 'admin' || permissions === 'write')
|
||||
}
|
||||
|
||||
async repoHasLabel(name: string): Promise<boolean> {
|
||||
try {
|
||||
await this.octokit.issues.getLabel({ ...this.params, name })
|
||||
return true
|
||||
} catch (err) {
|
||||
if (err.status === 404) {
|
||||
return this.options.readonly && this.mockLabels.has(name)
|
||||
}
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async createLabel(name: string, color: string, description: string): Promise<void> {
|
||||
debug('Creating label ' + name)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.createLabel({ ...this.params, color, description, name })
|
||||
else this.mockLabels.add(name)
|
||||
}
|
||||
|
||||
async deleteLabel(name: string): Promise<void> {
|
||||
debug('Deleting label ' + name)
|
||||
try {
|
||||
if (!this.options.readonly) await this.octokit.issues.deleteLabel({ ...this.params, name })
|
||||
} catch (err) {
|
||||
if (err.status === 404) {
|
||||
return
|
||||
}
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async readConfig(path: string): Promise<any> {
|
||||
debug('Reading config at ' + path)
|
||||
const repoPath = `.github/${path}.json`
|
||||
const data = (await this.octokit.repos.getContents({ ...this.params, path: repoPath })).data
|
||||
|
||||
if ('type' in data && data.type === 'file') {
|
||||
if (data.encoding === 'base64' && data.content) {
|
||||
return JSON.parse(Buffer.from(data.content, 'base64').toString('utf-8'))
|
||||
}
|
||||
throw Error(`Could not read contents "${data.content}" in encoding "${data.encoding}"`)
|
||||
}
|
||||
throw Error('Found directory at config path when expecting file' + JSON.stringify(data))
|
||||
}
|
||||
|
||||
async releaseContainsCommit(release: string, commit: string): Promise<boolean> {
|
||||
if (getInput('commitReleasedDebuggingOverride')) {
|
||||
return true
|
||||
}
|
||||
return new Promise((resolve, reject) =>
|
||||
exec(`git -C ./repo merge-base --is-ancestor ${commit} ${release}`, (err) =>
|
||||
!err || err.code === 1 ? resolve(!err) : reject(err),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export class OctoKitIssue extends OctoKit implements GitHubIssue {
|
||||
constructor(
|
||||
token: string,
|
||||
protected params: { repo: string; owner: string },
|
||||
private issueData: { number: number } | Issue,
|
||||
options: { readonly: boolean } = { readonly: false },
|
||||
) {
|
||||
super(token, params, options)
|
||||
}
|
||||
|
||||
async addAssignee(assignee: string): Promise<void> {
|
||||
debug('Adding assignee ' + assignee + ' to ' + this.issueData.number)
|
||||
if (!this.options.readonly) {
|
||||
await this.octokit.issues.addAssignees({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
assignees: [assignee],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async closeIssue(): Promise<void> {
|
||||
debug('Closing issue ' + this.issueData.number)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.update({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
state: 'closed',
|
||||
})
|
||||
}
|
||||
|
||||
async lockIssue(): Promise<void> {
|
||||
debug('Locking issue ' + this.issueData.number)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.lock({ ...this.params, issue_number: this.issueData.number })
|
||||
}
|
||||
|
||||
async getIssue(): Promise<Issue> {
|
||||
if (isIssue(this.issueData)) {
|
||||
debug('Got issue data from query result ' + this.issueData.number)
|
||||
return this.issueData
|
||||
}
|
||||
|
||||
console.log('Fetching issue ' + this.issueData.number)
|
||||
const issue = (
|
||||
await this.octokit.issues.get({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
mediaType: { previews: ['squirrel-girl'] },
|
||||
})
|
||||
).data
|
||||
return (this.issueData = this.octokitIssueToIssue(issue))
|
||||
}
|
||||
|
||||
async postComment(body: string): Promise<void> {
|
||||
debug(`Posting comment ${body} on ${this.issueData.number}`)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.createComment({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
body,
|
||||
})
|
||||
}
|
||||
|
||||
async deleteComment(id: number): Promise<void> {
|
||||
debug(`Deleting comment ${id} on ${this.issueData.number}`)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.deleteComment({
|
||||
owner: this.params.owner,
|
||||
repo: this.params.repo,
|
||||
comment_id: id,
|
||||
})
|
||||
}
|
||||
|
||||
async setMilestone(milestoneId: number) {
|
||||
debug(`Setting milestone for ${this.issueData.number} to ${milestoneId}`)
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.update({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
milestone: milestoneId,
|
||||
})
|
||||
}
|
||||
|
||||
async *getComments(last?: boolean): AsyncIterableIterator<Comment[]> {
|
||||
debug('Fetching comments for ' + this.issueData.number)
|
||||
|
||||
const response = this.octokit.paginate.iterator(
|
||||
this.octokit.issues.listComments.endpoint.merge({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
per_page: 100,
|
||||
...(last ? { per_page: 1, page: (await this.getIssue()).numComments } : {}),
|
||||
}),
|
||||
)
|
||||
|
||||
for await (const page of response) {
|
||||
yield (page.data as Octokit.IssuesListCommentsResponseItem[]).map((comment) => ({
|
||||
author: { name: comment.user.login, isGitHubApp: comment.user.type === 'Bot' },
|
||||
body: comment.body,
|
||||
id: comment.id,
|
||||
timestamp: +new Date(comment.created_at),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
async addLabel(name: string): Promise<void> {
|
||||
debug(`Adding label ${name} to ${this.issueData.number}`)
|
||||
if (!(await this.repoHasLabel(name))) {
|
||||
throw Error(`Action could not execute becuase label ${name} is not defined.`)
|
||||
}
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.addLabels({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
labels: [name],
|
||||
})
|
||||
}
|
||||
|
||||
async removeLabel(name: string): Promise<void> {
|
||||
debug(`Removing label ${name} from ${this.issueData.number}`)
|
||||
try {
|
||||
if (!this.options.readonly)
|
||||
await this.octokit.issues.removeLabel({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
name,
|
||||
})
|
||||
} catch (err) {
|
||||
if (err.status === 404) {
|
||||
console.log(`Label ${name} not found on issue`)
|
||||
return
|
||||
}
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async getClosingInfo(): Promise<{ hash: string | undefined; timestamp: number } | undefined> {
|
||||
if ((await this.getIssue()).open) {
|
||||
return
|
||||
}
|
||||
|
||||
const options = this.octokit.issues.listEventsForTimeline.endpoint.merge({
|
||||
...this.params,
|
||||
issue_number: this.issueData.number,
|
||||
})
|
||||
let closingCommit: { hash: string | undefined; timestamp: number } | undefined
|
||||
for await (const event of this.octokit.paginate.iterator(options)) {
|
||||
const timelineEvents = event.data as Octokit.IssuesListEventsForTimelineResponseItem[]
|
||||
for (const timelineEvent of timelineEvents) {
|
||||
if (timelineEvent.event === 'closed') {
|
||||
closingCommit = {
|
||||
hash: timelineEvent.commit_id ?? undefined,
|
||||
timestamp: +new Date(timelineEvent.created_at),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(`Got ${closingCommit} as closing commit of ${this.issueData.number}`)
|
||||
return closingCommit
|
||||
}
|
||||
}
|
||||
|
||||
function isIssue(object: any): object is Issue {
|
||||
const isIssue =
|
||||
'author' in object &&
|
||||
'body' in object &&
|
||||
'title' in object &&
|
||||
'labels' in object &&
|
||||
'open' in object &&
|
||||
'locked' in object &&
|
||||
'number' in object &&
|
||||
'numComments' in object &&
|
||||
'reactions' in object &&
|
||||
'milestoneId' in object
|
||||
|
||||
return isIssue
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class Testbed {
|
||||
constructor(config) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
this.config = {
|
||||
globalLabels: (_a = config === null || config === void 0 ? void 0 : config.globalLabels) !== null && _a !== void 0 ? _a : [],
|
||||
configs: (_b = config === null || config === void 0 ? void 0 : config.configs) !== null && _b !== void 0 ? _b : {},
|
||||
writers: (_c = config === null || config === void 0 ? void 0 : config.writers) !== null && _c !== void 0 ? _c : [],
|
||||
releasedCommits: (_d = config === null || config === void 0 ? void 0 : config.releasedCommits) !== null && _d !== void 0 ? _d : [],
|
||||
queryRunner: (_e = config === null || config === void 0 ? void 0 : config.queryRunner) !== null && _e !== void 0 ? _e : async function* () {
|
||||
yield [];
|
||||
},
|
||||
};
|
||||
}
|
||||
async *query(query) {
|
||||
for await (const page of this.config.queryRunner(query)) {
|
||||
yield page.map((issue) => issue instanceof TestbedIssue ? issue : new TestbedIssue(this.config, issue));
|
||||
}
|
||||
}
|
||||
async createIssue(_owner, _repo, _title, _body) {
|
||||
// pass...
|
||||
}
|
||||
async readConfig(path) {
|
||||
return JSON.parse(JSON.stringify(this.config.configs[path]));
|
||||
}
|
||||
async hasWriteAccess(user) {
|
||||
return this.config.writers.includes(user.name);
|
||||
}
|
||||
async repoHasLabel(label) {
|
||||
return this.config.globalLabels.includes(label);
|
||||
}
|
||||
async createLabel(label, _color, _description) {
|
||||
this.config.globalLabels.push(label);
|
||||
}
|
||||
async deleteLabel(labelToDelete) {
|
||||
this.config.globalLabels = this.config.globalLabels.filter((label) => label !== labelToDelete);
|
||||
}
|
||||
async releaseContainsCommit(_release, commit) {
|
||||
return this.config.releasedCommits.includes(commit);
|
||||
}
|
||||
}
|
||||
exports.Testbed = Testbed;
|
||||
class TestbedIssue extends Testbed {
|
||||
constructor(globalConfig, issueConfig) {
|
||||
var _a, _b, _c;
|
||||
super(globalConfig);
|
||||
issueConfig = issueConfig !== null && issueConfig !== void 0 ? issueConfig : {};
|
||||
issueConfig.comments = (_a = issueConfig === null || issueConfig === void 0 ? void 0 : issueConfig.comments) !== null && _a !== void 0 ? _a : [];
|
||||
issueConfig.labels = (_b = issueConfig === null || issueConfig === void 0 ? void 0 : issueConfig.labels) !== null && _b !== void 0 ? _b : [];
|
||||
issueConfig.issue = {
|
||||
author: { name: 'JacksonKearl' },
|
||||
body: 'issue body',
|
||||
locked: false,
|
||||
numComments: ((_c = issueConfig === null || issueConfig === void 0 ? void 0 : issueConfig.comments) === null || _c === void 0 ? void 0 : _c.length) || 0,
|
||||
number: 1,
|
||||
open: true,
|
||||
title: 'issue title',
|
||||
assignee: undefined,
|
||||
reactions: {
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
confused: 0,
|
||||
eyes: 0,
|
||||
heart: 0,
|
||||
hooray: 0,
|
||||
laugh: 0,
|
||||
rocket: 0,
|
||||
},
|
||||
closedAt: undefined,
|
||||
createdAt: +new Date(),
|
||||
updatedAt: +new Date(),
|
||||
...issueConfig.issue,
|
||||
};
|
||||
this.issueConfig = issueConfig;
|
||||
}
|
||||
async addAssignee(assignee) {
|
||||
this.issueConfig.issue.assignee = assignee;
|
||||
}
|
||||
async setMilestone(milestoneId) {
|
||||
this.issueConfig.issue.milestoneId = milestoneId;
|
||||
}
|
||||
async getIssue() {
|
||||
const labels = [...this.issueConfig.labels];
|
||||
return { ...this.issueConfig.issue, labels };
|
||||
}
|
||||
async postComment(body, author) {
|
||||
this.issueConfig.comments.push({
|
||||
author: { name: author !== null && author !== void 0 ? author : 'bot' },
|
||||
body,
|
||||
id: Math.random(),
|
||||
timestamp: +new Date(),
|
||||
});
|
||||
}
|
||||
async deleteComment(id) {
|
||||
this.issueConfig.comments = this.issueConfig.comments.filter((comment) => comment.id !== id);
|
||||
}
|
||||
async *getComments(last) {
|
||||
yield last
|
||||
? [this.issueConfig.comments[this.issueConfig.comments.length - 1]]
|
||||
: this.issueConfig.comments;
|
||||
}
|
||||
async addLabel(label) {
|
||||
this.issueConfig.labels.push(label);
|
||||
}
|
||||
async removeLabel(labelToDelete) {
|
||||
this.issueConfig.labels = this.issueConfig.labels.filter((label) => label !== labelToDelete);
|
||||
}
|
||||
async closeIssue() {
|
||||
this.issueConfig.issue.open = false;
|
||||
}
|
||||
async lockIssue() {
|
||||
this.issueConfig.issue.locked = true;
|
||||
}
|
||||
async getClosingInfo() {
|
||||
return this.issueConfig.closingCommit;
|
||||
}
|
||||
}
|
||||
exports.TestbedIssue = TestbedIssue;
|
||||
@@ -1,170 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Comment, GitHub, GitHubIssue, Issue, Query, User } from './api'
|
||||
|
||||
type TestbedConfig = {
|
||||
globalLabels: string[]
|
||||
configs: Record<string, any>
|
||||
writers: string[]
|
||||
releasedCommits: string[]
|
||||
queryRunner: (query: Query) => AsyncIterableIterator<(TestbedIssueConstructorArgs | TestbedIssue)[]>
|
||||
}
|
||||
|
||||
export type TestbedConstructorArgs = Partial<TestbedConfig>
|
||||
|
||||
export class Testbed implements GitHub {
|
||||
public config: TestbedConfig
|
||||
|
||||
constructor(config?: TestbedConstructorArgs) {
|
||||
this.config = {
|
||||
globalLabels: config?.globalLabels ?? [],
|
||||
configs: config?.configs ?? {},
|
||||
writers: config?.writers ?? [],
|
||||
releasedCommits: config?.releasedCommits ?? [],
|
||||
queryRunner:
|
||||
config?.queryRunner ??
|
||||
async function* () {
|
||||
yield []
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
async *query(query: Query): AsyncIterableIterator<GitHubIssue[]> {
|
||||
for await (const page of this.config.queryRunner(query)) {
|
||||
yield page.map((issue) =>
|
||||
issue instanceof TestbedIssue ? issue : new TestbedIssue(this.config, issue),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
async createIssue(_owner: string, _repo: string, _title: string, _body: string): Promise<void> {
|
||||
// pass...
|
||||
}
|
||||
|
||||
async readConfig(path: string): Promise<any> {
|
||||
return JSON.parse(JSON.stringify(this.config.configs[path]))
|
||||
}
|
||||
|
||||
async hasWriteAccess(user: User): Promise<boolean> {
|
||||
return this.config.writers.includes(user.name)
|
||||
}
|
||||
|
||||
async repoHasLabel(label: string): Promise<boolean> {
|
||||
return this.config.globalLabels.includes(label)
|
||||
}
|
||||
|
||||
async createLabel(label: string, _color: string, _description: string): Promise<void> {
|
||||
this.config.globalLabels.push(label)
|
||||
}
|
||||
|
||||
async deleteLabel(labelToDelete: string): Promise<void> {
|
||||
this.config.globalLabels = this.config.globalLabels.filter((label) => label !== labelToDelete)
|
||||
}
|
||||
|
||||
async releaseContainsCommit(_release: string, commit: string): Promise<boolean> {
|
||||
return this.config.releasedCommits.includes(commit)
|
||||
}
|
||||
}
|
||||
|
||||
type TestbedIssueConfig = {
|
||||
issue: Omit<Issue, 'labels'>
|
||||
comments: Comment[]
|
||||
labels: string[]
|
||||
closingCommit: { hash: string | undefined; timestamp: number } | undefined
|
||||
}
|
||||
|
||||
export type TestbedIssueConstructorArgs = Partial<Omit<TestbedIssueConfig, 'issue'>> & {
|
||||
issue?: Partial<Omit<Issue, 'labels'>>
|
||||
}
|
||||
|
||||
export class TestbedIssue extends Testbed implements GitHubIssue {
|
||||
public issueConfig: TestbedIssueConfig
|
||||
|
||||
constructor(globalConfig?: TestbedConstructorArgs, issueConfig?: TestbedIssueConstructorArgs) {
|
||||
super(globalConfig)
|
||||
issueConfig = issueConfig ?? {}
|
||||
issueConfig.comments = issueConfig?.comments ?? []
|
||||
issueConfig.labels = issueConfig?.labels ?? []
|
||||
issueConfig.issue = {
|
||||
author: { name: 'JacksonKearl' },
|
||||
body: 'issue body',
|
||||
locked: false,
|
||||
numComments: issueConfig?.comments?.length || 0,
|
||||
number: 1,
|
||||
open: true,
|
||||
title: 'issue title',
|
||||
assignee: undefined,
|
||||
reactions: {
|
||||
'+1': 0,
|
||||
'-1': 0,
|
||||
confused: 0,
|
||||
eyes: 0,
|
||||
heart: 0,
|
||||
hooray: 0,
|
||||
laugh: 0,
|
||||
rocket: 0,
|
||||
},
|
||||
closedAt: undefined,
|
||||
createdAt: +new Date(),
|
||||
updatedAt: +new Date(),
|
||||
...issueConfig.issue,
|
||||
}
|
||||
|
||||
this.issueConfig = issueConfig as TestbedIssueConfig
|
||||
}
|
||||
|
||||
async addAssignee(assignee: string): Promise<void> {
|
||||
this.issueConfig.issue.assignee = assignee
|
||||
}
|
||||
|
||||
async setMilestone(milestoneId: number): Promise<void> {
|
||||
this.issueConfig.issue.milestoneId = milestoneId
|
||||
}
|
||||
|
||||
async getIssue(): Promise<Issue> {
|
||||
const labels = [...this.issueConfig.labels]
|
||||
return { ...this.issueConfig.issue, labels }
|
||||
}
|
||||
|
||||
async postComment(body: string, author?: string): Promise<void> {
|
||||
this.issueConfig.comments.push({
|
||||
author: { name: author ?? 'bot' },
|
||||
body,
|
||||
id: Math.random(),
|
||||
timestamp: +new Date(),
|
||||
})
|
||||
}
|
||||
|
||||
async deleteComment(id: number): Promise<void> {
|
||||
this.issueConfig.comments = this.issueConfig.comments.filter((comment) => comment.id !== id)
|
||||
}
|
||||
|
||||
async *getComments(last?: boolean): AsyncIterableIterator<Comment[]> {
|
||||
yield last
|
||||
? [this.issueConfig.comments[this.issueConfig.comments.length - 1]]
|
||||
: this.issueConfig.comments
|
||||
}
|
||||
|
||||
async addLabel(label: string): Promise<void> {
|
||||
this.issueConfig.labels.push(label)
|
||||
}
|
||||
|
||||
async removeLabel(labelToDelete: string): Promise<void> {
|
||||
this.issueConfig.labels = this.issueConfig.labels.filter((label) => label !== labelToDelete)
|
||||
}
|
||||
|
||||
async closeIssue(): Promise<void> {
|
||||
this.issueConfig.issue.open = false
|
||||
}
|
||||
|
||||
async lockIssue(): Promise<void> {
|
||||
this.issueConfig.issue.locked = true
|
||||
}
|
||||
|
||||
async getClosingInfo(): Promise<{ hash: string | undefined; timestamp: number } | undefined> {
|
||||
return this.issueConfig.closingCommit
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
name: 'PR Labeler'
|
||||
description: 'Automatically add a Label to a PR'
|
||||
inputs:
|
||||
token:
|
||||
description: GitHub token with issue, comment, and label read/write permissions
|
||||
default: ${{ github.token }}
|
||||
label:
|
||||
description: Github label to add to the PR
|
||||
required: true
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'index.js'
|
||||
@@ -1,22 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = require("@actions/core");
|
||||
const github_1 = require("@actions/github");
|
||||
const octokit_1 = require("../api/octokit");
|
||||
const utils_1 = require("../utils/utils");
|
||||
const token = utils_1.getRequiredInput('token');
|
||||
const label = utils_1.getRequiredInput('label');
|
||||
async function main() {
|
||||
const pr = new octokit_1.OctoKitIssue(token, github_1.context.repo, { number: github_1.context.issue.number });
|
||||
pr.addLabel(label);
|
||||
}
|
||||
main()
|
||||
.then(() => utils_1.logRateLimit(token))
|
||||
.catch(async (error) => {
|
||||
core.setFailed(error.message);
|
||||
await utils_1.logErrorToIssue(error.message, true, token);
|
||||
});
|
||||
@@ -1,26 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as core from '@actions/core'
|
||||
import { context } from '@actions/github'
|
||||
import { OctoKitIssue } from '../api/octokit'
|
||||
import { getRequiredInput, logErrorToIssue, logRateLimit } from '../utils/utils'
|
||||
|
||||
const token = getRequiredInput('token');
|
||||
const label = getRequiredInput('label');
|
||||
|
||||
async function main() {
|
||||
|
||||
const pr = new OctoKitIssue(token, context.repo, { number: context.issue.number });
|
||||
|
||||
pr.addLabel(label);
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => logRateLimit(token))
|
||||
.catch(async (error) => {
|
||||
core.setFailed(error.message)
|
||||
await logErrorToIssue(error.message, true, token)
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
name: Copycat
|
||||
description: Copy all new issues to a different repo
|
||||
inputs:
|
||||
token:
|
||||
description: GitHub token with issue, comment, and label read/write permissions to both repos
|
||||
default: ${{ github.token }}
|
||||
owner:
|
||||
description: account/organization that owns the destination repo (the microsoft part of microsoft/vscode)
|
||||
required: true
|
||||
repo:
|
||||
description: name of the destination repo (the vscode part of microsoft/vscode)
|
||||
required: true
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'index.js'
|
||||
@@ -1,19 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class CopyCat {
|
||||
constructor(github, owner, repo) {
|
||||
this.github = github;
|
||||
this.owner = owner;
|
||||
this.repo = repo;
|
||||
}
|
||||
async run() {
|
||||
const issue = await this.github.getIssue();
|
||||
console.log(`Mirroring issue \`${issue.title}\` to ${this.owner}/${this.repo}`);
|
||||
await this.github.createIssue(this.owner, this.repo, issue.title, issue.body.replace(/@|#|issues/g, '-'));
|
||||
}
|
||||
}
|
||||
exports.CopyCat = CopyCat;
|
||||
@@ -1,21 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { GitHubIssue } from '../api/api'
|
||||
|
||||
export class CopyCat {
|
||||
constructor(private github: GitHubIssue, private owner: string, private repo: string) {}
|
||||
|
||||
async run() {
|
||||
const issue = await this.github.getIssue()
|
||||
console.log(`Mirroring issue \`${issue.title}\` to ${this.owner}/${this.repo}`)
|
||||
await this.github.createIssue(
|
||||
this.owner,
|
||||
this.repo,
|
||||
issue.title,
|
||||
issue.body.replace(/@|#|issues/g, '-'),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = require("@actions/core");
|
||||
const github_1 = require("@actions/github");
|
||||
const octokit_1 = require("../api/octokit");
|
||||
const utils_1 = require("../utils/utils");
|
||||
const copyCat_1 = require("./copyCat");
|
||||
const token = utils_1.getRequiredInput('token');
|
||||
const main = async () => {
|
||||
await new copyCat_1.CopyCat(new octokit_1.OctoKitIssue(token, github_1.context.repo, { number: github_1.context.issue.number }), utils_1.getRequiredInput('owner'), utils_1.getRequiredInput('repo')).run();
|
||||
};
|
||||
main()
|
||||
.then(() => utils_1.logRateLimit(token))
|
||||
.catch(async (error) => {
|
||||
core.setFailed(error.message);
|
||||
await utils_1.logErrorToIssue(error.message, true, token);
|
||||
});
|
||||
@@ -1,27 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as core from '@actions/core'
|
||||
import { context } from '@actions/github'
|
||||
import { OctoKitIssue } from '../api/octokit'
|
||||
import { getRequiredInput, logErrorToIssue, logRateLimit } from '../utils/utils'
|
||||
import { CopyCat } from './copyCat'
|
||||
|
||||
const token = getRequiredInput('token')
|
||||
|
||||
const main = async () => {
|
||||
await new CopyCat(
|
||||
new OctoKitIssue(token, context.repo, { number: context.issue.number }),
|
||||
getRequiredInput('owner'),
|
||||
getRequiredInput('repo'),
|
||||
).run()
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => logRateLimit(token))
|
||||
.catch(async (error) => {
|
||||
core.setFailed(error.message)
|
||||
await logErrorToIssue(error.message, true, token)
|
||||
})
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "github-actions",
|
||||
"version": "1.0.0",
|
||||
"description": "GitHub Actions",
|
||||
"scripts": {
|
||||
"test": "mocha -r ts-node/register **/*.test.ts",
|
||||
"build": "tsc -p ./tsconfig.json",
|
||||
"lint": "eslint -c .eslintrc --fix --ext .ts .",
|
||||
"watch-typecheck": "tsc --watch"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/microsoft/azuredatastudio.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/github": "^2.1.1",
|
||||
"axios": "^0.21.1",
|
||||
"ts-node": "^8.6.2",
|
||||
"typescript": "^3.8.3"
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"strict": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"removeComments": false,
|
||||
"resolveJsonModule": true,
|
||||
"lib": [
|
||||
"es2020"
|
||||
],
|
||||
},
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = require("@actions/core");
|
||||
const github_1 = require("@actions/github");
|
||||
const axios_1 = require("axios");
|
||||
const octokit_1 = require("../api/octokit");
|
||||
exports.getInput = (name) => core.getInput(name) || undefined;
|
||||
exports.getRequiredInput = (name) => core.getInput(name, { required: true });
|
||||
exports.normalizeIssue = (issue) => {
|
||||
const { body, title } = issue;
|
||||
const isBug = body.includes('bug_report_template') || /Issue Type:.*Bug.*/.test(body);
|
||||
const isFeatureRequest = body.includes('feature_request_template') || /Issue Type:.*Feature Request.*/.test(body);
|
||||
const cleanse = (str) => str
|
||||
.toLowerCase()
|
||||
.replace(/<!--.*?-->/gu, '')
|
||||
.replace(/.* version: .*/gu, '')
|
||||
.replace(/issue type: .*/gu, '')
|
||||
.replace(/<details>(.|\s)*?<\/details>/gu, '')
|
||||
.replace(/vs ?code/gu, '')
|
||||
.replace(/we have written.*please paste./gu, '')
|
||||
.replace(/steps to reproduce:/gu, '')
|
||||
.replace(/does this issue occur when all extensions are disabled.*/gu, '')
|
||||
.replace(/```(.|\s)*?```/gu, '')
|
||||
.replace(/!?\[.*?\]\(.*?\)/gu, '')
|
||||
.replace(/\s+/gu, ' ');
|
||||
return {
|
||||
body: cleanse(body),
|
||||
title: cleanse(title),
|
||||
issueType: isBug ? 'bug' : isFeatureRequest ? 'feature_request' : 'unknown',
|
||||
};
|
||||
};
|
||||
exports.loadLatestRelease = async (quality) => (await axios_1.default.get(`https://vscode-update.azurewebsites.net/api/update/darwin/${quality}/latest`)).data;
|
||||
exports.daysAgoToTimestamp = (days) => +new Date(Date.now() - days * 24 * 60 * 60 * 1000);
|
||||
exports.daysAgoToHumanReadbleDate = (days) => new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString().replace(/\.\d{3}\w$/, '');
|
||||
exports.logRateLimit = async (token) => {
|
||||
const usageData = (await new github_1.GitHub(token).rateLimit.get()).data.resources;
|
||||
['core', 'graphql', 'search'].forEach(async (category) => {
|
||||
const usage = 1 - usageData[category].remaining / usageData[category].limit;
|
||||
const message = `Usage at ${usage} for ${category}`;
|
||||
if (usage > 0) {
|
||||
console.log(message);
|
||||
}
|
||||
if (usage > 0.5) {
|
||||
await exports.logErrorToIssue(message, false, token);
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.logErrorToIssue = async (message, ping, token) => {
|
||||
// Attempt to wait out abuse detection timeout if present
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000));
|
||||
const dest = github_1.context.repo.repo === 'vscode-internalbacklog'
|
||||
? { repo: 'vscode-internalbacklog', issue: 974 }
|
||||
: { repo: 'vscode', issue: 93814 };
|
||||
return new octokit_1.OctoKitIssue(token, { owner: 'Microsoft', repo: dest.repo }, { number: dest.issue })
|
||||
.postComment(`
|
||||
Workflow: ${github_1.context.workflow}
|
||||
|
||||
Error: ${message}
|
||||
|
||||
Issue: ${ping ? `${github_1.context.repo.owner}/${github_1.context.repo.repo}#` : ''}${github_1.context.issue.number}
|
||||
|
||||
Repo: ${github_1.context.repo.owner}/${github_1.context.repo.repo}
|
||||
|
||||
<!-- Context:
|
||||
${JSON.stringify(github_1.context, null, 2).replace(/<!--/gu, '<@--').replace(/-->/gu, '--@>')}
|
||||
-->
|
||||
`);
|
||||
};
|
||||
@@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as core from '@actions/core'
|
||||
import { context, GitHub } from '@actions/github'
|
||||
import axios from 'axios'
|
||||
import { OctoKitIssue } from '../api/octokit'
|
||||
import { Issue } from '../api/api'
|
||||
|
||||
export const getInput = (name: string) => core.getInput(name) || undefined
|
||||
export const getRequiredInput = (name: string) => core.getInput(name, { required: true })
|
||||
|
||||
export const normalizeIssue = (
|
||||
issue: Issue,
|
||||
): { body: string; title: string; issueType: 'bug' | 'feature_request' | 'unknown' } => {
|
||||
const { body, title } = issue
|
||||
|
||||
const isBug = body.includes('bug_report_template') || /Issue Type:.*Bug.*/.test(body)
|
||||
const isFeatureRequest =
|
||||
body.includes('feature_request_template') || /Issue Type:.*Feature Request.*/.test(body)
|
||||
|
||||
const cleanse = (str: string) =>
|
||||
str
|
||||
.toLowerCase()
|
||||
.replace(/<!--.*?-->/gu, '')
|
||||
.replace(/.* version: .*/gu, '')
|
||||
.replace(/issue type: .*/gu, '')
|
||||
.replace(/<details>(.|\s)*?<\/details>/gu, '')
|
||||
.replace(/vs ?code/gu, '')
|
||||
.replace(/we have written.*please paste./gu, '')
|
||||
.replace(/steps to reproduce:/gu, '')
|
||||
.replace(/does this issue occur when all extensions are disabled.*/gu, '')
|
||||
.replace(/```(.|\s)*?```/gu, '')
|
||||
.replace(/!?\[.*?\]\(.*?\)/gu, '')
|
||||
.replace(/\s+/gu, ' ')
|
||||
|
||||
return {
|
||||
body: cleanse(body),
|
||||
title: cleanse(title),
|
||||
issueType: isBug ? 'bug' : isFeatureRequest ? 'feature_request' : 'unknown',
|
||||
}
|
||||
}
|
||||
|
||||
export interface Release {
|
||||
productVersion: string
|
||||
timestamp: number
|
||||
version: string
|
||||
}
|
||||
|
||||
export const loadLatestRelease = async (quality: 'stable' | 'insider'): Promise<Release | undefined> =>
|
||||
(await axios.get(`https://vscode-update.azurewebsites.net/api/update/darwin/${quality}/latest`)).data
|
||||
|
||||
export const daysAgoToTimestamp = (days: number): number => +new Date(Date.now() - days * 24 * 60 * 60 * 1000)
|
||||
|
||||
export const daysAgoToHumanReadbleDate = (days: number) =>
|
||||
new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString().replace(/\.\d{3}\w$/, '')
|
||||
|
||||
export const logRateLimit = async (token: string) => {
|
||||
const usageData = (await new GitHub(token).rateLimit.get()).data.resources
|
||||
;(['core', 'graphql', 'search'] as const).forEach(async (category) => {
|
||||
const usage = 1 - usageData[category].remaining / usageData[category].limit
|
||||
const message = `Usage at ${usage} for ${category}`
|
||||
if (usage > 0) {
|
||||
console.log(message)
|
||||
}
|
||||
if (usage > 0.5) {
|
||||
await logErrorToIssue(message, false, token)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const logErrorToIssue = async (message: string, ping: boolean, token: string): Promise<void> => {
|
||||
// Attempt to wait out abuse detection timeout if present
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000))
|
||||
const dest =
|
||||
context.repo.repo === 'vscode-internalbacklog'
|
||||
? { repo: 'vscode-internalbacklog', issue: 974 }
|
||||
: { repo: 'vscode', issue: 93814 }
|
||||
return new OctoKitIssue(token, { owner: 'Microsoft', repo: dest.repo }, { number: dest.issue })
|
||||
.postComment(`
|
||||
Workflow: ${context.workflow}
|
||||
|
||||
Error: ${message}
|
||||
|
||||
Issue: ${ping ? `${context.repo.owner}/${context.repo.repo}#` : ''}${context.issue.number}
|
||||
|
||||
Repo: ${context.repo.owner}/${context.repo.repo}
|
||||
|
||||
<!-- Context:
|
||||
${JSON.stringify(context, null, 2).replace(/<!--/gu, '<@--').replace(/-->/gu, '--@>')}
|
||||
-->
|
||||
`)
|
||||
}
|
||||
@@ -1,421 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@actions/core@^1.2.6":
|
||||
version "1.2.6"
|
||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.6.tgz#a78d49f41a4def18e88ce47c2cac615d5694bf09"
|
||||
integrity sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==
|
||||
|
||||
"@actions/github@^2.1.1":
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@actions/github/-/github-2.1.1.tgz#bcabedff598196d953f58ba750d5e75549a75142"
|
||||
integrity sha512-kAgTGUx7yf5KQCndVeHSwCNZuDBvPyxm5xKTswW2lofugeuC1AZX73nUUVDNaysnM9aKFMHv9YCdVJbg7syEyA==
|
||||
dependencies:
|
||||
"@actions/http-client" "^1.0.3"
|
||||
"@octokit/graphql" "^4.3.1"
|
||||
"@octokit/rest" "^16.43.1"
|
||||
|
||||
"@actions/http-client@^1.0.3":
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.8.tgz#8bd76e8eca89dc8bcf619aa128eba85f7a39af45"
|
||||
integrity sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==
|
||||
dependencies:
|
||||
tunnel "0.0.6"
|
||||
|
||||
"@octokit/auth-token@^2.4.0":
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f"
|
||||
integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.0.0"
|
||||
|
||||
"@octokit/endpoint@^6.0.1":
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.1.tgz#16d5c0e7a83e3a644d1ddbe8cded6c3d038d31d7"
|
||||
integrity sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.11.1"
|
||||
is-plain-object "^3.0.0"
|
||||
universal-user-agent "^5.0.0"
|
||||
|
||||
"@octokit/graphql@^4.3.1":
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.3.1.tgz#9ee840e04ed2906c7d6763807632de84cdecf418"
|
||||
integrity sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA==
|
||||
dependencies:
|
||||
"@octokit/request" "^5.3.0"
|
||||
"@octokit/types" "^2.0.0"
|
||||
universal-user-agent "^4.0.0"
|
||||
|
||||
"@octokit/plugin-paginate-rest@^1.1.1":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc"
|
||||
integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.0.1"
|
||||
|
||||
"@octokit/plugin-request-log@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e"
|
||||
integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==
|
||||
|
||||
"@octokit/plugin-rest-endpoint-methods@2.4.0":
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e"
|
||||
integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.0.1"
|
||||
deprecation "^2.3.1"
|
||||
|
||||
"@octokit/request-error@^1.0.2":
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801"
|
||||
integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.0.0"
|
||||
deprecation "^2.0.0"
|
||||
once "^1.4.0"
|
||||
|
||||
"@octokit/request-error@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.0.tgz#94ca7293373654400fbb2995f377f9473e00834b"
|
||||
integrity sha512-rtYicB4Absc60rUv74Rjpzek84UbVHGHJRu4fNVlZ1mCcyUPPuzFfG9Rn6sjHrd95DEsmjSt1Axlc699ZlbDkw==
|
||||
dependencies:
|
||||
"@octokit/types" "^2.0.0"
|
||||
deprecation "^2.0.0"
|
||||
once "^1.4.0"
|
||||
|
||||
"@octokit/request@^5.2.0", "@octokit/request@^5.3.0":
|
||||
version "5.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.2.tgz#74f8e5bbd39dc738a1b127629791f8ad1b3193ee"
|
||||
integrity sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw==
|
||||
dependencies:
|
||||
"@octokit/endpoint" "^6.0.1"
|
||||
"@octokit/request-error" "^2.0.0"
|
||||
"@octokit/types" "^2.11.1"
|
||||
deprecation "^2.0.0"
|
||||
is-plain-object "^3.0.0"
|
||||
node-fetch "^2.3.0"
|
||||
once "^1.4.0"
|
||||
universal-user-agent "^5.0.0"
|
||||
|
||||
"@octokit/rest@^16.43.1":
|
||||
version "16.43.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.1.tgz#3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b"
|
||||
integrity sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==
|
||||
dependencies:
|
||||
"@octokit/auth-token" "^2.4.0"
|
||||
"@octokit/plugin-paginate-rest" "^1.1.1"
|
||||
"@octokit/plugin-request-log" "^1.0.0"
|
||||
"@octokit/plugin-rest-endpoint-methods" "2.4.0"
|
||||
"@octokit/request" "^5.2.0"
|
||||
"@octokit/request-error" "^1.0.2"
|
||||
atob-lite "^2.0.0"
|
||||
before-after-hook "^2.0.0"
|
||||
btoa-lite "^1.0.0"
|
||||
deprecation "^2.0.0"
|
||||
lodash.get "^4.4.2"
|
||||
lodash.set "^4.3.2"
|
||||
lodash.uniq "^4.5.0"
|
||||
octokit-pagination-methods "^1.1.0"
|
||||
once "^1.4.0"
|
||||
universal-user-agent "^4.0.0"
|
||||
|
||||
"@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.11.1":
|
||||
version "2.12.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.1.tgz#4a26b4a85ec121043d3b0745b5798f9d8fd968ca"
|
||||
integrity sha512-LRLR1tjbcCfAmUElvTmMvLEzstpx6Xt/aQVTg2xvd+kHA2Ekp1eWl5t+gU7bcwjXHYEAzh4hH4WH+kS3vh+wRw==
|
||||
dependencies:
|
||||
"@types/node" ">= 8"
|
||||
|
||||
"@types/node@>= 8":
|
||||
version "13.13.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54"
|
||||
integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==
|
||||
|
||||
arg@^4.1.0:
|
||||
version "4.1.3"
|
||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
||||
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
|
||||
|
||||
atob-lite@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696"
|
||||
integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=
|
||||
|
||||
axios@^0.21.1:
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
|
||||
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
|
||||
dependencies:
|
||||
follow-redirects "^1.10.0"
|
||||
|
||||
before-after-hook@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635"
|
||||
integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==
|
||||
|
||||
btoa-lite@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
|
||||
integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc=
|
||||
|
||||
buffer-from@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||
|
||||
cross-spawn@^6.0.0:
|
||||
version "6.0.5"
|
||||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
|
||||
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
|
||||
dependencies:
|
||||
nice-try "^1.0.4"
|
||||
path-key "^2.0.1"
|
||||
semver "^5.5.0"
|
||||
shebang-command "^1.2.0"
|
||||
which "^1.2.9"
|
||||
|
||||
deprecation@^2.0.0, deprecation@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919"
|
||||
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
|
||||
|
||||
diff@^4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
|
||||
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
|
||||
|
||||
end-of-stream@^1.1.0:
|
||||
version "1.4.4"
|
||||
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
execa@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
|
||||
integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
|
||||
dependencies:
|
||||
cross-spawn "^6.0.0"
|
||||
get-stream "^4.0.0"
|
||||
is-stream "^1.1.0"
|
||||
npm-run-path "^2.0.0"
|
||||
p-finally "^1.0.0"
|
||||
signal-exit "^3.0.0"
|
||||
strip-eof "^1.0.0"
|
||||
|
||||
follow-redirects@^1.10.0:
|
||||
version "1.13.1"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7"
|
||||
integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==
|
||||
|
||||
get-stream@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
|
||||
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
|
||||
dependencies:
|
||||
pump "^3.0.0"
|
||||
|
||||
is-plain-object@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928"
|
||||
integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==
|
||||
dependencies:
|
||||
isobject "^4.0.0"
|
||||
|
||||
is-stream@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
|
||||
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||
|
||||
isobject@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0"
|
||||
integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==
|
||||
|
||||
lodash.get@^4.4.2:
|
||||
version "4.4.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
|
||||
|
||||
lodash.set@^4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
|
||||
integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
|
||||
|
||||
lodash.uniq@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
||||
|
||||
macos-release@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f"
|
||||
integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==
|
||||
|
||||
make-error@^1.1.1:
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||
|
||||
nice-try@^1.0.4:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
|
||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||
|
||||
node-fetch@^2.3.0:
|
||||
version "2.6.1"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
|
||||
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
|
||||
|
||||
npm-run-path@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
|
||||
integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
|
||||
dependencies:
|
||||
path-key "^2.0.0"
|
||||
|
||||
octokit-pagination-methods@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4"
|
||||
integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==
|
||||
|
||||
once@^1.3.1, once@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
os-name@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801"
|
||||
integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==
|
||||
dependencies:
|
||||
macos-release "^2.2.0"
|
||||
windows-release "^3.1.0"
|
||||
|
||||
p-finally@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
|
||||
|
||||
path-key@^2.0.0, path-key@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
|
||||
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
|
||||
|
||||
pump@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
|
||||
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
|
||||
dependencies:
|
||||
end-of-stream "^1.1.0"
|
||||
once "^1.3.1"
|
||||
|
||||
semver@^5.5.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||
|
||||
shebang-command@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
|
||||
integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
|
||||
dependencies:
|
||||
shebang-regex "^1.0.0"
|
||||
|
||||
shebang-regex@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
|
||||
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
|
||||
|
||||
signal-exit@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
||||
|
||||
source-map-support@^0.5.17:
|
||||
version "0.5.19"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
|
||||
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
source-map@^0.6.0:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
strip-eof@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
|
||||
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
|
||||
|
||||
ts-node@^8.6.2:
|
||||
version "8.9.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.0.tgz#d7bf7272dcbecd3a2aa18bd0b96c7d2f270c15d4"
|
||||
integrity sha512-rwkXfOs9zmoHrV8xE++dmNd6ZIS+nmHHCxcV53ekGJrxFLMbp+pizpPS07ARvhwneCIECPppOwbZHvw9sQtU4w==
|
||||
dependencies:
|
||||
arg "^4.1.0"
|
||||
diff "^4.0.1"
|
||||
make-error "^1.1.1"
|
||||
source-map-support "^0.5.17"
|
||||
yn "3.1.1"
|
||||
|
||||
tunnel@0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
||||
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||
|
||||
typescript@^3.8.3:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
||||
|
||||
universal-user-agent@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557"
|
||||
integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==
|
||||
dependencies:
|
||||
os-name "^3.1.0"
|
||||
|
||||
universal-user-agent@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9"
|
||||
integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==
|
||||
dependencies:
|
||||
os-name "^3.1.0"
|
||||
|
||||
which@^1.2.9:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
windows-release@^3.1.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.0.tgz#dce167e9f8be733f21c849ebd4d03fe66b29b9f0"
|
||||
integrity sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==
|
||||
dependencies:
|
||||
execa "^1.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
yn@3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
|
||||
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
|
||||
@@ -1,45 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as vfs from 'vinyl-fs';
|
||||
import * as path from 'path';
|
||||
import * as es from 'event-stream';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const files = [
|
||||
'.build/extensions/**/*.vsix', // external extensions
|
||||
'.build/win32-x64/**/*.{exe,zip}', // windows binaries
|
||||
'.build/linux/sha256hashes.txt', // linux hashes
|
||||
'.build/linux/deb/amd64/deb/*.deb', // linux debs
|
||||
'.build/linux/rpm/x86_64/*.rpm', // linux rpms
|
||||
'.build/linux/server/*', // linux server
|
||||
'.build/linux/archive/*', // linux archive
|
||||
'.build/docker/*', // docker images
|
||||
'.build/darwin/*', // darwin binaries
|
||||
'.build/version.json' // version information
|
||||
];
|
||||
|
||||
async function main() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const stream = vfs.src(files, { base: '.build', allowEmpty: true })
|
||||
.pipe(es.through(file => {
|
||||
const filePath = path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY!,
|
||||
//Preserve intermediate directories after .build folder
|
||||
file.path.substr(path.resolve('.build').length + 1));
|
||||
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
||||
fs.renameSync(file.path, filePath);
|
||||
}));
|
||||
|
||||
stream.on('end', () => resolve());
|
||||
stream.on('error', e => reject(e));
|
||||
});
|
||||
}
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,133 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as fs from 'fs';
|
||||
import { Readable } from 'stream';
|
||||
import * as crypto from 'crypto';
|
||||
import * as azure from 'azure-storage';
|
||||
import * as mime from 'mime';
|
||||
import { CosmosClient } from '@azure/cosmos';
|
||||
|
||||
interface Asset {
|
||||
platform: string;
|
||||
type: string;
|
||||
url: string;
|
||||
mooncakeUrl?: string;
|
||||
hash: string;
|
||||
sha256hash: string;
|
||||
size: number;
|
||||
supportsFastUpdate?: boolean;
|
||||
}
|
||||
|
||||
if (process.argv.length !== 6) {
|
||||
console.error('Usage: node createAsset.js PLATFORM TYPE NAME FILE');
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
function hashStream(hashName: string, stream: Readable): Promise<string> {
|
||||
return new Promise<string>((c, e) => {
|
||||
const shasum = crypto.createHash(hashName);
|
||||
|
||||
stream
|
||||
.on('data', shasum.update.bind(shasum))
|
||||
.on('error', e)
|
||||
.on('close', () => c(shasum.digest('hex')));
|
||||
});
|
||||
}
|
||||
|
||||
async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise<boolean | undefined> {
|
||||
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r)));
|
||||
return existsResult.exists;
|
||||
}
|
||||
|
||||
async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, filePath: string, fileName: string): Promise<void> {
|
||||
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
||||
contentSettings: {
|
||||
contentType: mime.lookup(filePath),
|
||||
contentDisposition: `attachment; filename="${fileName}"`,
|
||||
cacheControl: 'max-age=31536000, public'
|
||||
}
|
||||
};
|
||||
|
||||
await new Promise<void>((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c()));
|
||||
}
|
||||
|
||||
function getEnv(name: string): string {
|
||||
const result = process.env[name];
|
||||
|
||||
if (typeof result === 'undefined') {
|
||||
throw new Error('Missing env: ' + name);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const [, , platform, type, fileName, filePath] = process.argv;
|
||||
const quality = getEnv('VSCODE_QUALITY');
|
||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
||||
|
||||
console.log('Creating asset...');
|
||||
|
||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat)));
|
||||
const size = stat.size;
|
||||
|
||||
console.log('Size:', size);
|
||||
|
||||
const stream = fs.createReadStream(filePath);
|
||||
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
|
||||
|
||||
console.log('SHA1:', sha1hash);
|
||||
console.log('SHA256:', sha256hash);
|
||||
|
||||
const blobName = commit + '/' + fileName;
|
||||
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
|
||||
|
||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||
|
||||
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
||||
|
||||
if (blobExists) {
|
||||
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Uploading blobs to Azure storage...');
|
||||
|
||||
await uploadBlob(blobService, quality, blobName, filePath, fileName);
|
||||
|
||||
console.log('Blobs successfully uploaded.');
|
||||
|
||||
const asset: Asset = {
|
||||
platform,
|
||||
type,
|
||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
||||
hash: sha1hash,
|
||||
sha256hash,
|
||||
size
|
||||
};
|
||||
|
||||
// Remove this if we ever need to rollback fast updates for windows
|
||||
if (/win32/.test(platform)) {
|
||||
asset.supportsFastUpdate = true;
|
||||
}
|
||||
|
||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const scripts = client.database('builds').container(quality).scripts;
|
||||
await scripts.storedProcedure('createAsset').execute('', [commit, asset, true]);
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log('Asset successfully created');
|
||||
process.exit(0);
|
||||
}, err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,60 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { CosmosClient } from '@azure/cosmos';
|
||||
|
||||
if (process.argv.length !== 3) {
|
||||
console.error('Usage: node createBuild.js VERSION');
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
function getEnv(name: string): string {
|
||||
const result = process.env[name];
|
||||
|
||||
if (typeof result === 'undefined') {
|
||||
throw new Error('Missing env: ' + name);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const [, , _version] = process.argv;
|
||||
const quality = getEnv('VSCODE_QUALITY');
|
||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
||||
const queuedBy = getEnv('BUILD_QUEUEDBY');
|
||||
const sourceBranch = getEnv('BUILD_SOURCEBRANCH');
|
||||
const version = _version + (quality === 'stable' ? '' : `-${quality}`);
|
||||
|
||||
console.log('Creating build...');
|
||||
console.log('Quality:', quality);
|
||||
console.log('Version:', version);
|
||||
console.log('Commit:', commit);
|
||||
|
||||
const build = {
|
||||
id: commit,
|
||||
timestamp: (new Date()).getTime(),
|
||||
version,
|
||||
isReleased: false,
|
||||
sourceBranch,
|
||||
queuedBy,
|
||||
assets: [],
|
||||
updates: {}
|
||||
};
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const scripts = client.database('builds').container(quality).scripts;
|
||||
await scripts.storedProcedure('createBuild').execute('', [{ ...build, _partitionKey: '' }]);
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log('Build successfully created');
|
||||
process.exit(0);
|
||||
}, err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd $BUILD_STAGINGDIRECTORY
|
||||
mkdir extraction
|
||||
cd extraction
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-extension-telemetry.git
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug-core.git
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug2.git
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug.git
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.git
|
||||
git clone --depth 1 https://github.com/Microsoft/vscode-json-languageservice.git
|
||||
node $BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --sourceDir $BUILD_SOURCESDIRECTORY --excludedDir $BUILD_SOURCESDIRECTORY/extensions --outputDir . --applyEndpoints
|
||||
node $BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --config $BUILD_SOURCESDIRECTORY/build/azure-pipelines/common/telemetry-config.json -o .
|
||||
mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry
|
||||
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
||||
mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
||||
cd ..
|
||||
rm -rf extraction
|
||||
18
build/azure-pipelines/common/installDistro.ts
Normal file
18
build/azure-pipelines/common/installDistro.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
|
||||
function yarnInstall(packageName: string): void {
|
||||
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
||||
}
|
||||
|
||||
const product = require('../../../product.json');
|
||||
const dependencies = product.dependencies || {} as { [name: string]: string; };
|
||||
|
||||
Object.keys(dependencies).forEach(name => {
|
||||
const url = dependencies[name];
|
||||
yarnInstall(url);
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
REPO="$(pwd)"
|
||||
|
||||
# Publish webview contents
|
||||
PACKAGEJSON="$REPO/package.json"
|
||||
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
||||
|
||||
node build/azure-pipelines/common/publish-webview.js "$REPO/src/vs/workbench/contrib/webview/browser/pre/"
|
||||
@@ -1,87 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azure from 'azure-storage';
|
||||
import * as mime from 'mime';
|
||||
import * as minimist from 'minimist';
|
||||
import { basename, join } from 'path';
|
||||
|
||||
const fileNames = [
|
||||
'fake.html',
|
||||
'host.js',
|
||||
'index.html',
|
||||
'main.js',
|
||||
'service-worker.js'
|
||||
];
|
||||
|
||||
async function assertContainer(blobService: azure.BlobService, container: string): Promise<void> {
|
||||
await new Promise<void>((c, e) => blobService.createContainerIfNotExists(container, { publicAccessLevel: 'blob' }, err => err ? e(err) : c()));
|
||||
}
|
||||
|
||||
async function doesBlobExist(blobService: azure.BlobService, container: string, blobName: string): Promise<boolean | undefined> {
|
||||
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(container, blobName, (err, r) => err ? e(err) : c(r)));
|
||||
return existsResult.exists;
|
||||
}
|
||||
|
||||
async function uploadBlob(blobService: azure.BlobService, container: string, blobName: string, file: string): Promise<void> {
|
||||
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
||||
contentSettings: {
|
||||
contentType: mime.lookup(file),
|
||||
cacheControl: 'max-age=31536000, public'
|
||||
}
|
||||
};
|
||||
|
||||
await new Promise<void>((c, e) => blobService.createBlockBlobFromLocalFile(container, blobName, file, blobOptions, err => err ? e(err) : c()));
|
||||
}
|
||||
|
||||
async function publish(commit: string, files: readonly string[]): Promise<void> {
|
||||
|
||||
console.log('Publishing...');
|
||||
console.log('Commit:', commit);
|
||||
const storageAccount = process.env['AZURE_WEBVIEW_STORAGE_ACCOUNT']!;
|
||||
|
||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_WEBVIEW_STORAGE_ACCESS_KEY']!)
|
||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||
|
||||
await assertContainer(blobService, commit);
|
||||
|
||||
for (const file of files) {
|
||||
const blobName = basename(file);
|
||||
const blobExists = await doesBlobExist(blobService, commit, blobName);
|
||||
if (blobExists) {
|
||||
console.log(`Blob ${commit}, ${blobName} already exists, not publishing again.`);
|
||||
continue;
|
||||
}
|
||||
console.log('Uploading blob to Azure storage...');
|
||||
await uploadBlob(blobService, commit, blobName, file);
|
||||
}
|
||||
|
||||
console.log('Blobs successfully uploaded.');
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
if (!commit) {
|
||||
console.warn('Skipping publish due to missing BUILD_SOURCEVERSION');
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = minimist(process.argv.slice(2));
|
||||
const [directory] = opts._;
|
||||
|
||||
const files = fileNames.map(fileName => join(directory, fileName));
|
||||
|
||||
publish(commit, files).catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.error('Usage: node publish.js <directory>');
|
||||
process.exit(-1);
|
||||
}
|
||||
main();
|
||||
@@ -43,7 +43,6 @@ function createDefaultConfig(quality: string): Config {
|
||||
}
|
||||
|
||||
function getConfig(quality: string): Promise<Config> {
|
||||
console.log(`Getting config for quality ${quality}`);
|
||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = 'dbs/builds/colls/config';
|
||||
const query = {
|
||||
@@ -53,13 +52,13 @@ function getConfig(quality: string): Promise<Config> {
|
||||
]
|
||||
};
|
||||
|
||||
return retry(() => new Promise<Config>((c, e) => {
|
||||
client.queryDocuments(collection, query, { enableCrossPartitionQuery: true }).toArray((err, results) => {
|
||||
return new Promise<Config>((c, e) => {
|
||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
||||
if (err && err.code !== 409) { return e(err); }
|
||||
|
||||
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config);
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
interface Asset {
|
||||
@@ -87,8 +86,7 @@ function createOrUpdate(commit: string, quality: string, platform: string, type:
|
||||
updateTries++;
|
||||
|
||||
return new Promise<void>((c, e) => {
|
||||
console.log(`Querying existing documents to update...`);
|
||||
client.queryDocuments(collection, updateQuery, { enableCrossPartitionQuery: true }).toArray((err, results) => {
|
||||
client.queryDocuments(collection, updateQuery).toArray((err, results) => {
|
||||
if (err) { return e(err); }
|
||||
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||
|
||||
@@ -103,7 +101,6 @@ function createOrUpdate(commit: string, quality: string, platform: string, type:
|
||||
release.updates[platform] = type;
|
||||
}
|
||||
|
||||
console.log(`Replacing existing document with updated version`);
|
||||
client.replaceDocument(release._self, release, err => {
|
||||
if (err && err.code === 409 && updateTries < 5) { return c(update()); }
|
||||
if (err) { return e(err); }
|
||||
@@ -115,8 +112,7 @@ function createOrUpdate(commit: string, quality: string, platform: string, type:
|
||||
});
|
||||
}
|
||||
|
||||
return retry(() => new Promise<void>((c, e) => {
|
||||
console.log(`Attempting to create document`);
|
||||
return new Promise<void>((c, e) => {
|
||||
client.createDocument(collection, release, err => {
|
||||
if (err && err.code === 409) { return c(update()); }
|
||||
if (err) { return e(err); }
|
||||
@@ -124,7 +120,7 @@ function createOrUpdate(commit: string, quality: string, platform: string, type:
|
||||
console.log('Build successfully published.');
|
||||
c();
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
async function assertContainer(blobService: azure.BlobService, quality: string): Promise<void> {
|
||||
@@ -156,6 +152,13 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
|
||||
const queuedBy = process.env['BUILD_QUEUEDBY']!;
|
||||
const sourceBranch = process.env['BUILD_SOURCEBRANCH']!;
|
||||
const isReleased = (
|
||||
// Insiders: nightly build from master
|
||||
(quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch) && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)) ||
|
||||
|
||||
// Exploration: any build from electron-4.0.x branch
|
||||
(quality === 'exploration' && /^electron-4.0.x$|^refs\/heads\/electron-4.0.x$/.test(sourceBranch))
|
||||
);
|
||||
|
||||
console.log('Publishing...');
|
||||
console.log('Quality:', quality);
|
||||
@@ -165,6 +168,7 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
console.log('Version:', version);
|
||||
console.log('Commit:', commit);
|
||||
console.log('Is Update:', isUpdate);
|
||||
console.log('Is Released:', isReleased);
|
||||
console.log('File:', file);
|
||||
|
||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
||||
@@ -192,6 +196,7 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Uploading blobs to Azure storage...');
|
||||
|
||||
await uploadBlob(blobService, quality, blobName, file);
|
||||
@@ -218,21 +223,11 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
|
||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Insiders: nightly build from main
|
||||
const isReleased = (
|
||||
(
|
||||
(quality === 'insider' && /^main$|^refs\/heads\/main$/.test(sourceBranch)) ||
|
||||
(quality === 'rc1' && /^release\/|^refs\/heads\/release\//.test(sourceBranch))
|
||||
) &&
|
||||
/Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)
|
||||
);
|
||||
|
||||
const release = {
|
||||
id: commit,
|
||||
timestamp: (new Date()).getTime(),
|
||||
version,
|
||||
isReleased: isReleased,
|
||||
isReleased: config.frozen ? false : isReleased,
|
||||
sourceBranch,
|
||||
queuedBy,
|
||||
assets: [] as Array<Asset>,
|
||||
@@ -250,23 +245,12 @@ async function publish(commit: string, quality: string, platform: string, type:
|
||||
await createOrUpdate(commit, quality, platform, type, release, asset, isUpdate);
|
||||
}
|
||||
|
||||
const RETRY_TIMES = 10;
|
||||
async function retry<T>(fn: () => Promise<T>): Promise<T> {
|
||||
for (let run = 1; run <= RETRY_TIMES; run++) {
|
||||
try {
|
||||
return await fn();
|
||||
} catch (err) {
|
||||
if (!/ECONNRESET/.test(err.message)) {
|
||||
throw err;
|
||||
}
|
||||
console.log(`Caught error ${err} - ${run}/${RETRY_TIMES}`);
|
||||
}
|
||||
function main(): void {
|
||||
if (process.env['VSCODE_BUILD_SKIP_PUBLISH']) {
|
||||
console.warn('Skipping publish due to VSCODE_BUILD_SKIP_PUBLISH');
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Error('Retried too many times');
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
if (!commit) {
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { DocumentClient } from 'documentdb';
|
||||
|
||||
interface Config {
|
||||
id: string;
|
||||
frozen: boolean;
|
||||
}
|
||||
|
||||
function createDefaultConfig(quality: string): Config {
|
||||
return {
|
||||
id: quality,
|
||||
frozen: false
|
||||
};
|
||||
}
|
||||
|
||||
function getConfig(quality: string): Promise<Config> {
|
||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = 'dbs/builds/colls/config';
|
||||
const query = {
|
||||
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
|
||||
parameters: [
|
||||
{ name: '@quality', value: quality }
|
||||
]
|
||||
};
|
||||
|
||||
return new Promise<Config>((c, e) => {
|
||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
||||
if (err && err.code !== 409) { return e(err); }
|
||||
|
||||
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function doRelease(commit: string, quality: string): Promise<void> {
|
||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = 'dbs/builds/colls/' + quality;
|
||||
const query = {
|
||||
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
||||
parameters: [{ name: '@id', value: commit }]
|
||||
};
|
||||
|
||||
let updateTries = 0;
|
||||
|
||||
function update(): Promise<void> {
|
||||
updateTries++;
|
||||
|
||||
return new Promise<void>((c, e) => {
|
||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
||||
if (err) { return e(err); }
|
||||
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||
|
||||
const release = results[0];
|
||||
release.isReleased = true;
|
||||
|
||||
client.replaceDocument(release._self, release, err => {
|
||||
if (err && err.code === 409 && updateTries < 5) { return c(update()); }
|
||||
if (err) { return e(err); }
|
||||
|
||||
console.log('Build successfully updated.');
|
||||
c();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return update();
|
||||
}
|
||||
|
||||
async function release(commit: string, quality: string): Promise<void> {
|
||||
const config = await getConfig(quality);
|
||||
|
||||
console.log('Quality config:', config);
|
||||
|
||||
if (config.frozen) {
|
||||
console.log(`Skipping release because quality ${quality} is frozen.`);
|
||||
return;
|
||||
}
|
||||
|
||||
await doRelease(commit, quality);
|
||||
}
|
||||
|
||||
function env(name: string): string {
|
||||
const result = process.env[name];
|
||||
|
||||
if (!result) {
|
||||
throw new Error(`Skipping release due to missing env: ${name}`);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const commit = env('BUILD_SOURCEVERSION');
|
||||
const quality = env('VSCODE_QUALITY');
|
||||
|
||||
await release(commit, quality);
|
||||
}
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,70 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { CosmosClient } from '@azure/cosmos';
|
||||
|
||||
function getEnv(name: string): string {
|
||||
const result = process.env[name];
|
||||
|
||||
if (typeof result === 'undefined') {
|
||||
throw new Error('Missing env: ' + name);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
interface Config {
|
||||
id: string;
|
||||
frozen: boolean;
|
||||
}
|
||||
|
||||
function createDefaultConfig(quality: string): Config {
|
||||
return {
|
||||
id: quality,
|
||||
frozen: false
|
||||
};
|
||||
}
|
||||
|
||||
async function getConfig(client: CosmosClient, quality: string): Promise<Config> {
|
||||
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${quality}"`;
|
||||
|
||||
const res = await client.database('builds').container('config').items.query(query).fetchAll();
|
||||
|
||||
if (res.resources.length === 0) {
|
||||
return createDefaultConfig(quality);
|
||||
}
|
||||
|
||||
return res.resources[0] as Config;
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
||||
const quality = getEnv('VSCODE_QUALITY');
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const config = await getConfig(client, quality);
|
||||
|
||||
console.log('Quality config:', config);
|
||||
|
||||
if (config.frozen) {
|
||||
console.log(`Skipping release because quality ${quality} is frozen.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Releasing build ${commit}...`);
|
||||
|
||||
const scripts = client.database('builds').container(quality).scripts;
|
||||
await scripts.storedProcedure('releaseBuild').execute('', [commit]);
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log('Build successfully released');
|
||||
process.exit(0);
|
||||
}, err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
219
build/azure-pipelines/common/symbols.ts
Normal file
219
build/azure-pipelines/common/symbols.ts
Normal file
@@ -0,0 +1,219 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as request from 'request';
|
||||
import { createReadStream, createWriteStream, unlink, mkdir } from 'fs';
|
||||
import * as github from 'github-releases';
|
||||
import { join } from 'path';
|
||||
import { tmpdir } from 'os';
|
||||
import { promisify } from 'util';
|
||||
|
||||
const BASE_URL = 'https://rink.hockeyapp.net/api/2/';
|
||||
const HOCKEY_APP_TOKEN_HEADER = 'X-HockeyAppToken';
|
||||
|
||||
export interface IVersions {
|
||||
app_versions: IVersion[];
|
||||
}
|
||||
|
||||
export interface IVersion {
|
||||
id: number;
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface IApplicationAccessor {
|
||||
accessToken: string;
|
||||
appId: string;
|
||||
}
|
||||
|
||||
export interface IVersionAccessor extends IApplicationAccessor {
|
||||
id: string;
|
||||
}
|
||||
|
||||
enum Platform {
|
||||
WIN_32 = 'win32-ia32',
|
||||
WIN_64 = 'win32-x64',
|
||||
LINUX_32 = 'linux-ia32',
|
||||
LINUX_64 = 'linux-x64',
|
||||
MAC_OS = 'darwin-x64'
|
||||
}
|
||||
|
||||
function symbolsZipName(platform: Platform, electronVersion: string, insiders: boolean): string {
|
||||
return `${insiders ? 'insiders' : 'stable'}-symbols-v${electronVersion}-${platform}.zip`;
|
||||
}
|
||||
|
||||
const SEED = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
async function tmpFile(name: string): Promise<string> {
|
||||
let res = '';
|
||||
for (let i = 0; i < 8; i++) {
|
||||
res += SEED.charAt(Math.floor(Math.random() * SEED.length));
|
||||
}
|
||||
|
||||
const tmpParent = join(tmpdir(), res);
|
||||
|
||||
await promisify(mkdir)(tmpParent);
|
||||
|
||||
return join(tmpParent, name);
|
||||
}
|
||||
|
||||
function getVersions(accessor: IApplicationAccessor): Promise<IVersions> {
|
||||
return asyncRequest<IVersions>({
|
||||
url: `${BASE_URL}/apps/${accessor.appId}/app_versions`,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
[HOCKEY_APP_TOKEN_HEADER]: accessor.accessToken
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createVersion(accessor: IApplicationAccessor, version: string): Promise<IVersion> {
|
||||
return asyncRequest<IVersion>({
|
||||
url: `${BASE_URL}/apps/${accessor.appId}/app_versions/new`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
[HOCKEY_APP_TOKEN_HEADER]: accessor.accessToken
|
||||
},
|
||||
formData: {
|
||||
bundle_version: version
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateVersion(accessor: IVersionAccessor, symbolsPath: string) {
|
||||
return asyncRequest<IVersions>({
|
||||
url: `${BASE_URL}/apps/${accessor.appId}/app_versions/${accessor.id}`,
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
[HOCKEY_APP_TOKEN_HEADER]: accessor.accessToken
|
||||
},
|
||||
formData: {
|
||||
dsym: createReadStream(symbolsPath)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function asyncRequest<T>(options: request.UrlOptions & request.CoreOptions): Promise<T> {
|
||||
return new Promise<T>((resolve, reject) => {
|
||||
request(options, (error, _response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve(JSON.parse(body));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function downloadAsset(repository: any, assetName: string, targetPath: string, electronVersion: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
repository.getReleases({ tag_name: `v${electronVersion}` }, (err: any, releases: any) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
const asset = releases[0].assets.filter((asset: any) => asset.name === assetName)[0];
|
||||
if (!asset) {
|
||||
reject(new Error(`Asset with name ${assetName} not found`));
|
||||
} else {
|
||||
repository.downloadAsset(asset, (err: any, reader: any) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
const writer = createWriteStream(targetPath);
|
||||
writer.on('error', reject);
|
||||
writer.on('close', resolve);
|
||||
reader.on('error', reject);
|
||||
|
||||
reader.pipe(writer);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
interface IOptions {
|
||||
repository: string;
|
||||
platform: Platform;
|
||||
versions: { code: string; insiders: boolean; electron: string; };
|
||||
access: { hockeyAppToken: string; hockeyAppId: string; githubToken: string };
|
||||
}
|
||||
|
||||
async function ensureVersionAndSymbols(options: IOptions) {
|
||||
|
||||
// Check version does not exist
|
||||
console.log(`HockeyApp: checking for existing version ${options.versions.code} (${options.platform})`);
|
||||
const versions = await getVersions({ accessToken: options.access.hockeyAppToken, appId: options.access.hockeyAppId });
|
||||
if (versions.app_versions.some(v => v.version === options.versions.code)) {
|
||||
console.log(`HockeyApp: Returning without uploading symbols because version ${options.versions.code} (${options.platform}) was already found`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Download symbols for platform and electron version
|
||||
const symbolsName = symbolsZipName(options.platform, options.versions.electron, options.versions.insiders);
|
||||
const symbolsPath = await tmpFile('symbols.zip');
|
||||
console.log(`HockeyApp: downloading symbols ${symbolsName} for electron ${options.versions.electron} (${options.platform}) into ${symbolsPath}`);
|
||||
await downloadAsset(new (github as any)({ repo: options.repository, token: options.access.githubToken }), symbolsName, symbolsPath, options.versions.electron);
|
||||
|
||||
// Create version
|
||||
console.log(`HockeyApp: creating new version ${options.versions.code} (${options.platform})`);
|
||||
const version = await createVersion({ accessToken: options.access.hockeyAppToken, appId: options.access.hockeyAppId }, options.versions.code);
|
||||
|
||||
// Upload symbols
|
||||
console.log(`HockeyApp: uploading symbols for version ${options.versions.code} (${options.platform})`);
|
||||
await updateVersion({ id: String(version.id), accessToken: options.access.hockeyAppToken, appId: options.access.hockeyAppId }, symbolsPath);
|
||||
|
||||
// Cleanup
|
||||
await promisify(unlink)(symbolsPath);
|
||||
}
|
||||
|
||||
// Environment
|
||||
const pakage = require('../../../package.json');
|
||||
const product = require('../../../product.json');
|
||||
const repository = product.electronRepository;
|
||||
const electronVersion = require('../../lib/electron').getElectronVersion();
|
||||
const insiders = product.quality !== 'stable';
|
||||
let codeVersion = pakage.version;
|
||||
if (insiders) {
|
||||
codeVersion = `${codeVersion}-insider`;
|
||||
}
|
||||
const githubToken = process.argv[2];
|
||||
const hockeyAppToken = process.argv[3];
|
||||
const is64 = process.argv[4] === 'x64';
|
||||
const hockeyAppId = process.argv[5];
|
||||
|
||||
let platform: Platform;
|
||||
if (process.platform === 'darwin') {
|
||||
platform = Platform.MAC_OS;
|
||||
} else if (process.platform === 'win32') {
|
||||
platform = is64 ? Platform.WIN_64 : Platform.WIN_32;
|
||||
} else {
|
||||
platform = is64 ? Platform.LINUX_64 : Platform.LINUX_32;
|
||||
}
|
||||
|
||||
// Create version and upload symbols in HockeyApp
|
||||
if (repository && codeVersion && electronVersion && (product.quality === 'stable' || product.quality === 'insider')) {
|
||||
ensureVersionAndSymbols({
|
||||
repository,
|
||||
platform,
|
||||
versions: {
|
||||
code: codeVersion,
|
||||
insiders,
|
||||
electron: electronVersion
|
||||
},
|
||||
access: {
|
||||
githubToken,
|
||||
hockeyAppToken,
|
||||
hockeyAppId
|
||||
}
|
||||
}).then(() => {
|
||||
console.log('HockeyApp: done');
|
||||
}).catch(error => {
|
||||
console.error(`HockeyApp: error (${error})`);
|
||||
});
|
||||
} else {
|
||||
console.log(`HockeyApp: skipping due to unexpected context (repository: ${repository}, codeVersion: ${codeVersion}, electronVersion: ${electronVersion}, quality: ${product.quality})`);
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
import * as url from 'url';
|
||||
import * as azure from 'azure-storage';
|
||||
import * as mime from 'mime';
|
||||
import { CosmosClient } from '@azure/cosmos';
|
||||
import { DocumentClient, RetrievedDocument } from 'documentdb';
|
||||
|
||||
function log(...args: any[]) {
|
||||
console.log(...[`[${new Date().toISOString()}]`, ...args]);
|
||||
@@ -23,7 +23,7 @@ if (process.argv.length < 3) {
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
interface Build {
|
||||
interface Build extends RetrievedDocument {
|
||||
assets: Asset[];
|
||||
}
|
||||
|
||||
@@ -38,20 +38,62 @@ interface Asset {
|
||||
supportsFastUpdate?: boolean;
|
||||
}
|
||||
|
||||
function updateBuild(commit: string, quality: string, platform: string, type: string, asset: Asset): Promise<void> {
|
||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = 'dbs/builds/colls/' + quality;
|
||||
const updateQuery = {
|
||||
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
||||
parameters: [{ name: '@id', value: commit }]
|
||||
};
|
||||
|
||||
let updateTries = 0;
|
||||
|
||||
function _update(): Promise<void> {
|
||||
updateTries++;
|
||||
|
||||
return new Promise<void>((c, e) => {
|
||||
client.queryDocuments(collection, updateQuery).toArray((err, results) => {
|
||||
if (err) { return e(err); }
|
||||
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||
|
||||
const release = results[0];
|
||||
|
||||
release.assets = [
|
||||
...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)),
|
||||
asset
|
||||
];
|
||||
|
||||
client.replaceDocument(release._self, release, err => {
|
||||
if (err && err.code === 409 && updateTries < 5) { return c(_update()); }
|
||||
if (err) { return e(err); }
|
||||
|
||||
log('Build successfully updated.');
|
||||
c();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return _update();
|
||||
}
|
||||
|
||||
async function sync(commit: string, quality: string): Promise<void> {
|
||||
log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`);
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const container = client.database('builds').container(quality);
|
||||
const cosmosdb = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const collection = `dbs/builds/colls/${quality}`;
|
||||
const query = {
|
||||
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
||||
parameters: [{ name: '@id', value: commit }]
|
||||
};
|
||||
|
||||
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${commit}"`;
|
||||
const res = await container.items.query<Build>(query, {}).fetchAll();
|
||||
|
||||
if (res.resources.length !== 1) {
|
||||
throw new Error(`No builds found for ${commit}`);
|
||||
}
|
||||
|
||||
const build = res.resources[0];
|
||||
const build = await new Promise<Build>((c, e) => {
|
||||
cosmosdb.queryDocuments(collection, query).toArray((err, results) => {
|
||||
if (err) { return e(err); }
|
||||
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||
c(results[0] as Build);
|
||||
});
|
||||
});
|
||||
|
||||
log(`Found build for ${commit}, with ${build.assets.length} assets`);
|
||||
|
||||
@@ -98,9 +140,8 @@ async function sync(commit: string, quality: string): Promise<void> {
|
||||
await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e));
|
||||
|
||||
log(` Updating build in DB...`);
|
||||
const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
|
||||
await container.scripts.storedProcedure('setAssetMooncakeUrl')
|
||||
.execute('', [commit, asset.platform, asset.type, mooncakeUrl]);
|
||||
asset.mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
|
||||
await updateBuild(commit, quality, asset.platform, asset.type, asset);
|
||||
|
||||
log(` Done ✔️`);
|
||||
} catch (err) {
|
||||
@@ -112,6 +153,11 @@ async function sync(commit: string, quality: string): Promise<void> {
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
if (process.env['VSCODE_BUILD_SKIP_PUBLISH']) {
|
||||
error('Skipping publish due to VSCODE_BUILD_SKIP_PUBLISH');
|
||||
return;
|
||||
}
|
||||
|
||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
if (!commit) {
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
[
|
||||
{
|
||||
"eventPrefix": "typescript-language-features/",
|
||||
"sourceDirs": [
|
||||
"../../s/extensions/typescript-language-features"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "git/",
|
||||
"sourceDirs": [
|
||||
"../../s/extensions/git"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "extension-telemetry/",
|
||||
"sourceDirs": [
|
||||
"vscode-extension-telemetry"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "vscode-markdown/",
|
||||
"sourceDirs": [
|
||||
"../../s/extensions/markdown-language-features"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "html-language-features/",
|
||||
"sourceDirs": [
|
||||
"../../s/extensions/html-language-features",
|
||||
"vscode-html-languageservice"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "json-language-features/",
|
||||
"sourceDirs": [
|
||||
"../../s/extensions/json-language-features",
|
||||
"vscode-json-languageservice"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "ms-vscode.node2/",
|
||||
"sourceDirs": [
|
||||
"vscode-chrome-debug-core",
|
||||
"vscode-node-debug2"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true,
|
||||
"patchDebugEvents": true
|
||||
},
|
||||
{
|
||||
"eventPrefix": "ms-vscode.node/",
|
||||
"sourceDirs": [
|
||||
"vscode-chrome-debug-core",
|
||||
"vscode-node-debug"
|
||||
],
|
||||
"excludedDirs": [],
|
||||
"applyEndpoints": true,
|
||||
"patchDebugEvents": true
|
||||
}
|
||||
]
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
4
build/azure-pipelines/darwin/build.sh
Executable file
4
build/azure-pipelines/darwin/build.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
yarn gulp vscode-darwin-min
|
||||
yarn gulp upload-vscode-sourcemaps
|
||||
@@ -1,72 +1,47 @@
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "12.14.1"
|
||||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
||||
versionSpec: "10.15.1"
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||
inputs:
|
||||
versionSpec: "1.x"
|
||||
|
||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||
displayName: Restore Cache - Node Modules # {{SQL CARBON EDIT}}
|
||||
inputs:
|
||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
||||
|
||||
versionSpec: "1.10.1"
|
||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||
# inputs:
|
||||
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||
# vstsFeed: '$(ArtifactFeed)'
|
||||
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
|
||||
- script: |
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||
yarn
|
||||
displayName: Install Dependencies
|
||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
|
||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||
displayName: Save Cache - Node Modules # {{SQL CARBON EDIT}}
|
||||
inputs:
|
||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
|
||||
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||
# inputs:
|
||||
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||
# vstsFeed: '$(ArtifactFeed)'
|
||||
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||
- script: |
|
||||
yarn electron x64
|
||||
yarn gulp electron-x64
|
||||
displayName: Download Electron
|
||||
|
||||
# - script: | {{SQL CARBON EDIT}} remove editor checks
|
||||
# yarn monaco-compile-check
|
||||
# displayName: Run Monaco Editor Checks
|
||||
|
||||
- script: |
|
||||
yarn valid-layers-check
|
||||
displayName: Run Valid Layers Checks
|
||||
|
||||
yarn gulp hygiene
|
||||
displayName: Run Hygiene Checks
|
||||
- script: |
|
||||
yarn monaco-compile-check
|
||||
displayName: Run Monaco Editor Checks
|
||||
- script: |
|
||||
yarn compile
|
||||
displayName: Compile Sources
|
||||
|
||||
# - script: | {{SQL CARBON EDIT}} remove step
|
||||
# yarn download-builtin-extensions
|
||||
# displayName: Download Built-in Extensions
|
||||
|
||||
- script: |
|
||||
yarn download-builtin-extensions
|
||||
displayName: Download Built-in Extensions
|
||||
- script: |
|
||||
./scripts/test.sh --tfs "Unit Tests"
|
||||
displayName: Run Unit Tests (Electron)
|
||||
|
||||
# - script: | {{SQL CARBON EDIT}} disable
|
||||
# yarn test-browser --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
|
||||
# displayName: Run Unit Tests (Browser)
|
||||
|
||||
# - script: | {{SQL CARBON EDIT}} disable
|
||||
# ./scripts/test-integration.sh --tfs "Integration Tests"
|
||||
# displayName: Run Integration Tests (Electron)
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: crash-dump-macos
|
||||
targetPath: .build/crashes
|
||||
displayName: 'Publish Crash Reports'
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
displayName: Run Unit Tests
|
||||
- script: |
|
||||
./scripts/test-integration.sh --tfs "Integration Tests"
|
||||
displayName: Run Integration Tests
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Tests Results
|
||||
inputs:
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
REPO="$(pwd)"
|
||||
|
||||
# ensure drop directories exist
|
||||
mkdir -p $REPO/.build/darwin/{archive,server}
|
||||
|
||||
# package Remote Extension Host
|
||||
pushd .. && mv azuredatastudio-reh-darwin azuredatastudio-server-darwin && zip -Xry $REPO/.build/darwin/server/azuredatastudio-server-darwin.zip azuredatastudio-server-darwin && popd
|
||||
|
||||
node build/azure-pipelines/common/copyArtifacts.js
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user