mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-18 18:46:47 -05:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b3b97f4a3 | ||
|
|
6d25299eef | ||
|
|
26fe9932f2 | ||
|
|
2acd37a1b1 | ||
|
|
85786b48c3 | ||
|
|
acd6257bae | ||
|
|
f007d707b6 | ||
|
|
b118b4bc7a | ||
|
|
f3edece70b | ||
|
|
4de376c357 | ||
|
|
0753b63ad0 | ||
|
|
0523190fbb | ||
|
|
de994972db | ||
|
|
3b06473c49 | ||
|
|
bb75143282 | ||
|
|
3857f11dc9 | ||
|
|
0918d93a18 | ||
|
|
25d96d041e | ||
|
|
0dc88501cf | ||
|
|
bac7eccbaf | ||
|
|
585d609ebb | ||
|
|
168385b6f1 | ||
|
|
eb4612100d | ||
|
|
d89ce8f9ec | ||
|
|
d84dd31491 | ||
|
|
b6632547a2 | ||
|
|
79669f073c | ||
|
|
e078e3bc48 | ||
|
|
72d035be98 |
@@ -1,121 +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 \
|
|
||||||
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]
|
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
**/vs/loader.js
|
**/vs/loader.js
|
||||||
**/insane/**
|
**/insane/**
|
||||||
**/marked/**
|
**/marked/**
|
||||||
**/markjs/**
|
|
||||||
**/test/**/*.js
|
**/test/**/*.js
|
||||||
**/node_modules/**
|
**/node_modules/**
|
||||||
**/vscode-api-tests/testWorkspace/**
|
**/vscode-api-tests/testWorkspace/**
|
||||||
|
|||||||
241
.eslintrc.json
241
.eslintrc.json
@@ -42,15 +42,7 @@
|
|||||||
"jsdoc/no-types": "warn",
|
"jsdoc/no-types": "warn",
|
||||||
"semi": "off",
|
"semi": "off",
|
||||||
"@typescript-eslint/semi": "warn",
|
"@typescript-eslint/semi": "warn",
|
||||||
"@typescript-eslint/naming-convention": [
|
"@typescript-eslint/class-name-casing": "warn",
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"selector": "class",
|
|
||||||
"format": [
|
|
||||||
"PascalCase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"code-no-unused-expressions": [
|
"code-no-unused-expressions": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
@@ -71,18 +63,13 @@
|
|||||||
"browser": [
|
"browser": [
|
||||||
"common"
|
"common"
|
||||||
],
|
],
|
||||||
"electron-sandbox": [
|
"electron-main": [
|
||||||
"common",
|
"common",
|
||||||
"browser"
|
"node"
|
||||||
],
|
],
|
||||||
"electron-browser": [
|
"electron-browser": [
|
||||||
"common",
|
"common",
|
||||||
"browser",
|
"browser",
|
||||||
"node",
|
|
||||||
"electron-sandbox"
|
|
||||||
],
|
|
||||||
"electron-main": [
|
|
||||||
"common",
|
|
||||||
"node"
|
"node"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -119,14 +106,6 @@
|
|||||||
"rxjs/*"
|
"rxjs/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/base/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/base/node/**",
|
"target": "**/{vs,sql}/base/node/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
@@ -176,22 +155,13 @@
|
|||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/base/parts/*/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/base/parts/*/electron-browser/**",
|
"target": "**/{vs,sql}/base/parts/*/electron-browser/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -221,10 +191,10 @@
|
|||||||
"typemoq",
|
"typemoq",
|
||||||
"sinon",
|
"sinon",
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"azdata",
|
"azdata",
|
||||||
"**/{vs,sql}/base/common/**",
|
"**/{vs,sql}/base/common/**",
|
||||||
"**/{vs,sql}/base/parts/*/common/**",
|
|
||||||
"**/{vs,sql}/base/test/common/**",
|
"**/{vs,sql}/base/test/common/**",
|
||||||
|
"**/{vs,sql}/base/parts/*/common/**",
|
||||||
"**/{vs,sql}/platform/*/common/**",
|
"**/{vs,sql}/platform/*/common/**",
|
||||||
"**/{vs,sql}/platform/*/test/common/**"
|
"**/{vs,sql}/platform/*/test/common/**"
|
||||||
]
|
]
|
||||||
@@ -251,25 +221,15 @@
|
|||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/platform/*/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/platform/*/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/platform/*/electron-browser/**",
|
"target": "**/{vs,sql}/platform/*/electron-browser/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"azdata",
|
"azdata",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/{common,browser,node}/**",
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/platform/*/{common,browser,node,electron-browser}/**",
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -482,34 +442,18 @@
|
|||||||
"**/{vs,sql}/**/{common,worker}/**"
|
"**/{vs,sql}/**/{common,worker}/**"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/workbench/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/platform/*/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/editor/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention
|
|
||||||
"**/{vs,sql}/workbench/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/services/*/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/workbench/electron-browser/**",
|
"target": "**/{vs,sql}/workbench/electron-browser/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/parts/*/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/platform/*/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/editor/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/editor/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention
|
"**/{vs,sql}/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention
|
||||||
"**/{vs,sql}/workbench/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/{common,browser,node,electron-browser,api}/**",
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/services/*/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/workbench/services/*/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -521,7 +465,7 @@
|
|||||||
"**/{vs,sql}/base/**",
|
"**/{vs,sql}/base/**",
|
||||||
"**/{vs,sql}/platform/**",
|
"**/{vs,sql}/platform/**",
|
||||||
"**/{vs,sql}/editor/**",
|
"**/{vs,sql}/editor/**",
|
||||||
"**/{vs,sql}/workbench/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/{common,browser,node,electron-browser}/**",
|
||||||
"vs/workbench/contrib/files/common/editors/fileEditorInput",
|
"vs/workbench/contrib/files/common/editors/fileEditorInput",
|
||||||
"**/{vs,sql}/workbench/services/**",
|
"**/{vs,sql}/workbench/services/**",
|
||||||
"**/{vs,sql}/workbench/test/**",
|
"**/{vs,sql}/workbench/test/**",
|
||||||
@@ -542,9 +486,7 @@
|
|||||||
"**/{vs,sql}/workbench/api/**/common/**",
|
"**/{vs,sql}/workbench/api/**/common/**",
|
||||||
"vs/workbench/contrib/files/common/editors/fileEditorInput", // this should be fine, it only accesses constants from contrib
|
"vs/workbench/contrib/files/common/editors/fileEditorInput", // this should be fine, it only accesses constants from contrib
|
||||||
"vscode-textmate",
|
"vscode-textmate",
|
||||||
"vscode-oniguruma",
|
"vscode-oniguruma"
|
||||||
"iconv-lite-umd",
|
|
||||||
"semver-umd"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -595,30 +537,16 @@
|
|||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/workbench/services/**/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser,worker,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/services/**/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/workbench/services/**/electron-browser/**",
|
"target": "**/{vs,sql}/workbench/services/**/electron-browser/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/**/{common,browser,worker,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/platform/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/editor/**",
|
"**/{vs,sql}/editor/**",
|
||||||
"**/{vs,sql}/workbench/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/{common,browser,node,electron-browser,api}/**",
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/services/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -631,7 +559,7 @@
|
|||||||
"**/{vs,sql}/base/**",
|
"**/{vs,sql}/base/**",
|
||||||
"**/{vs,sql}/platform/**",
|
"**/{vs,sql}/platform/**",
|
||||||
"**/{vs,sql}/editor/**",
|
"**/{vs,sql}/editor/**",
|
||||||
"**/{vs,sql}/workbench/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/workbench/services/**",
|
"**/{vs,sql}/workbench/services/**",
|
||||||
"**/{vs,sql}/workbench/contrib/**",
|
"**/{vs,sql}/workbench/contrib/**",
|
||||||
"**/{vs,sql}/workbench/test/**",
|
"**/{vs,sql}/workbench/test/**",
|
||||||
@@ -682,20 +610,6 @@
|
|||||||
"**/{vs,sql}/workbench/services/**/{common,browser}/**"
|
"**/{vs,sql}/workbench/services/**/{common,browser}/**"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/workbench/contrib/notebook/common/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/**/{common,worker}/**",
|
|
||||||
"**/{vs,sql}/platform/**/common/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/common/**",
|
|
||||||
"**/{vs,sql}/workbench/api/common/**",
|
|
||||||
"**/{vs,sql}/workbench/services/**/common/**",
|
|
||||||
"**/{vs,sql}/workbench/contrib/**/common/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/workbench/contrib/**/common/**",
|
"target": "**/{vs,sql}/workbench/contrib/**/common/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
@@ -731,9 +645,7 @@
|
|||||||
"chart.js",
|
"chart.js",
|
||||||
"plotly.js-dist-min",
|
"plotly.js-dist-min",
|
||||||
"angular2-grid",
|
"angular2-grid",
|
||||||
"html-query-plan",
|
"html-query-plan"
|
||||||
"turndown",
|
|
||||||
"mark.js"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -751,47 +663,20 @@
|
|||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/workbench/contrib/**/electron-sandbox/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser,worker,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/services/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/contrib/**/{common,browser,electron-sandbox}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/workbench/contrib/**/electron-browser/**",
|
"target": "**/{vs,sql}/workbench/contrib/**/electron-browser/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/**/{common,browser,worker,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/platform/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/editor/**",
|
"**/{vs,sql}/editor/**",
|
||||||
"**/{vs,sql}/workbench/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/{common,browser,node,electron-browser,api}/**",
|
||||||
"**/{vs,sql}/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/services/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/workbench/contrib/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/workbench/contrib/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/{vs,sql}/code/browser/**",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"vs/css!./**/*",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/code/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/workbench/workbench.web.api"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/{vs,sql}/code/node/**",
|
"target": "**/{vs,sql}/code/node/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
@@ -808,10 +693,10 @@
|
|||||||
"restrictions": [
|
"restrictions": [
|
||||||
"vs/nls",
|
"vs/nls",
|
||||||
"vs/css!./**/*",
|
"vs/css!./**/*",
|
||||||
"**/{vs,sql}/base/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/base/parts/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/platform/**/{common,browser,node,electron-browser}/**",
|
||||||
"**/{vs,sql}/code/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
"**/{vs,sql}/code/**/{common,browser,node,electron-browser}/**",
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -839,66 +724,6 @@
|
|||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"target": "**/src/{vs,sql}/workbench/workbench.common.main.ts",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/**/{common,browser}/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "**/src/{vs,sql}/workbench/workbench.web.main.ts",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/workbench/workbench.common.main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "**/src/{vs,sql}/workbench/workbench.web.api.ts",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/**/{common,browser}/**",
|
|
||||||
"**/{vs,sql}/workbench/workbench.web.main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "**/src/{vs,sql}/workbench/workbench.sandbox.main.ts",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/**/{common,browser,electron-sandbox}/**",
|
|
||||||
"**/{vs,sql}/workbench/workbench.common.main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "**/src/{vs,sql}/workbench/workbench.desktop.main.ts",
|
|
||||||
"restrictions": [
|
|
||||||
"vs/nls",
|
|
||||||
"**/{vs,sql}/base/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"**/{vs,sql}/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"**/{vs,sql}/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"**/{vs,sql}/editor/**",
|
|
||||||
"**/{vs,sql}/workbench/**/{common,browser,node,electron-sandbox,electron-browser}/**",
|
|
||||||
"**/{vs,sql}/workbench/workbench.common.main",
|
|
||||||
"**/{vs,sql}/workbench/workbench.sandbox.main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"target": "**/extensions/**",
|
"target": "**/extensions/**",
|
||||||
"restrictions": "**/*"
|
"restrictions": "**/*"
|
||||||
|
|||||||
5
.github/classifier.yml
vendored
5
.github/classifier.yml
vendored
@@ -8,13 +8,11 @@
|
|||||||
Area - Acquisition: [],
|
Area - Acquisition: [],
|
||||||
Area - Azure: [],
|
Area - Azure: [],
|
||||||
Area - Backup\Restore: [],
|
Area - Backup\Restore: [],
|
||||||
Area - Big Data Cluster: [ charles-gagnon ],
|
|
||||||
Area - Charting\Insights: [],
|
Area - Charting\Insights: [],
|
||||||
Area - Connection: [ ],
|
Area - Connection: [ charles-gagnon ],
|
||||||
Area - DacFX: [],
|
Area - DacFX: [],
|
||||||
Area - Dashboard: [],
|
Area - Dashboard: [],
|
||||||
Area - Data Explorer: [],
|
Area - Data Explorer: [],
|
||||||
Area - Data Virtualization: [ charles-gagnon ],
|
|
||||||
Area - Edit Data: [],
|
Area - Edit Data: [],
|
||||||
Area - Extensibility: [],
|
Area - Extensibility: [],
|
||||||
Area - External Table: [],
|
Area - External Table: [],
|
||||||
@@ -24,7 +22,6 @@
|
|||||||
Area - Notebooks: [ chlafreniere ],
|
Area - Notebooks: [ chlafreniere ],
|
||||||
Area - Performance: [],
|
Area - Performance: [],
|
||||||
Area - Query Editor: [ anthonydresser ],
|
Area - Query Editor: [ anthonydresser ],
|
||||||
Area - Query History: [ charles-gagnon ],
|
|
||||||
Area - Query Plan: [],
|
Area - Query Plan: [],
|
||||||
Area - Reliability: [],
|
Area - Reliability: [],
|
||||||
Area - Resource Deployment: [],
|
Area - Resource Deployment: [],
|
||||||
|
|||||||
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
* Read our Pull Request guidelines:
|
* Read our Pull Request guidelines:
|
||||||
https://github.com/Microsoft/azuredatastudio/wiki/How-to-Contribute#pull-requests.
|
https://github.com/Microsoft/azuredatastudio/wiki/How-to-Contribute#pull-requests.
|
||||||
* Associate an issue with the Pull Request.
|
* Associate an issue with the Pull Request.
|
||||||
* Ensure that the code is up-to-date with the `main` branch.
|
* Ensure that the code is up-to-date with the `master` branch.
|
||||||
* Include a description of the proposed changes and how to test them.
|
* Include a description of the proposed changes and how to test them.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -3,11 +3,11 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
CHILD_CONCURRENCY: "1"
|
CHILD_CONCURRENCY: "1"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.2.0
|
- uses: actions/checkout@v1
|
||||||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -51,14 +51,16 @@ jobs:
|
|||||||
name: Run Unit Tests (Electron)
|
name: Run Unit Tests (Electron)
|
||||||
- run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
- run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
||||||
name: Run Extension Unit Tests (Electron)
|
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
|
# {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
|
||||||
- run: node test/combineCoverage
|
- run: |
|
||||||
name: Combine code coverage files
|
mkdir .build/coverage-combined
|
||||||
|
cat .build/coverage-single/lcov.info ./extensions/admin-tool-ext-win/coverage/lcov.info ./extensions/agent/coverage/lcov.info ./extensions/azurecore/coverage/lcov.info ./extensions/cms/coverage/lcov.info ./extensions/dacpac/coverage/lcov.info ./extensions/schema-compare/coverage/lcov.info ./extensions/notebook/coverage/lcov.info ./extensions/resource-deployment/coverage/lcov.info ./extensions/machine-learning/coverage/lcov.info > .build/coverage-combined/lcov.info
|
||||||
|
name: Merge coverage reports
|
||||||
- name: Upload Code Coverage
|
- name: Upload Code Coverage
|
||||||
uses: coverallsapp/github-action@v1.1.1
|
uses: coverallsapp/github-action@v1.1.1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path-to-lcov: 'test/coverage/lcov.info'
|
path-to-lcov: '.build/coverage-combined/lcov.info'
|
||||||
|
|
||||||
# Fails with cryptic error (e.g. https://github.com/microsoft/vscode/pull/90292/checks?check_run_id=433681926#step:13:9)
|
# 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
|
# - run: DISPLAY=:10 yarn test-browser --browser chromium
|
||||||
@@ -72,7 +74,7 @@ jobs:
|
|||||||
CHILD_CONCURRENCY: "1"
|
CHILD_CONCURRENCY: "1"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.2.0
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10
|
node-version: 10
|
||||||
@@ -108,7 +110,7 @@ jobs:
|
|||||||
CHILD_CONCURRENCY: "1"
|
CHILD_CONCURRENCY: "1"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.2.0
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10
|
node-version: 10
|
||||||
@@ -141,7 +143,7 @@ jobs:
|
|||||||
# CHILD_CONCURRENCY: "1"
|
# CHILD_CONCURRENCY: "1"
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# steps:
|
# steps:
|
||||||
# - uses: actions/checkout@v2.2.0
|
# - uses: actions/checkout@v1
|
||||||
# # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
# # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||||
# - run: |
|
# - run: |
|
||||||
# sudo apt-get update
|
# sudo apt-get update
|
||||||
|
|||||||
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
|
|
||||||
4
.github/workflows/on-issue-open.yml
vendored
4
.github/workflows/on-issue-open.yml
vendored
@@ -8,10 +8,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Actions
|
- name: Checkout Actions
|
||||||
uses: actions/checkout@v2.2.0
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/azuredatastudio'
|
repository: 'microsoft/azuredatastudio'
|
||||||
ref: main
|
ref: master
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions/build/actions
|
run: npm install --production --prefix ./actions/build/actions
|
||||||
|
|||||||
2
.github/workflows/on-pr-open.yml
vendored
2
.github/workflows/on-pr-open.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/azuredatastudio'
|
repository: 'microsoft/azuredatastudio'
|
||||||
ref: main
|
ref: master
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions/build/actions
|
run: npm install --production --prefix ./actions/build/actions
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,7 +24,6 @@ out-vscode-reh-web-min/
|
|||||||
out-vscode-reh-web-pkg/
|
out-vscode-reh-web-pkg/
|
||||||
out-vscode-web/
|
out-vscode-web/
|
||||||
out-vscode-web-min/
|
out-vscode-web-min/
|
||||||
out-vscode-web-pkg/
|
|
||||||
src/vs/server
|
src/vs/server
|
||||||
resources/server
|
resources/server
|
||||||
build/node_modules
|
build/node_modules
|
||||||
|
|||||||
68
.vscode/launch.json
vendored
68
.vscode/launch.json
vendored
@@ -19,15 +19,16 @@
|
|||||||
"timeout": 30000,
|
"timeout": 30000,
|
||||||
"port": 5870,
|
"port": 5870,
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js",
|
"${workspaceFolder}/out/**/*.js"
|
||||||
"${workspaceFolder}/extensions/*/out/**/*.js"
|
],
|
||||||
]
|
"presentation": {
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "pwa-chrome",
|
"type": "pwa-chrome",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"name": "Attach to Shared Process",
|
"name": "Attach to Shared Process",
|
||||||
"timeout": 30000,
|
|
||||||
"port": 9222,
|
"port": 9222,
|
||||||
"urlFilter": "*sharedProcess.html*",
|
"urlFilter": "*sharedProcess.html*",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"name": "Attach to Main Process",
|
"name": "Attach to Main Process",
|
||||||
"timeout": 30000,
|
|
||||||
"port": 5875,
|
"port": 5875,
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js"
|
"${workspaceFolder}/out/**/*.js"
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"name": "Attach to azuredatastudio",
|
"name": "Attach to azuredatastudio",
|
||||||
|
"timeout": 50000,
|
||||||
"port": 9222
|
"port": 9222
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -90,32 +91,55 @@
|
|||||||
"port": 9222,
|
"port": 9222,
|
||||||
"timeout": 20000,
|
"timeout": 20000,
|
||||||
"env": {
|
"env": {
|
||||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
|
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
||||||
"VSCODE_SKIP_PRELAUNCH": "1"
|
|
||||||
},
|
},
|
||||||
"cleanUp": "wholeBrowser",
|
"breakOnLoad": false,
|
||||||
"urlFilter": "*workbench.html*",
|
"urlFilter": "*workbench.html*",
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--inspect=5875",
|
"--inspect=5875",
|
||||||
"--no-cached-data",
|
"--no-cached-data",
|
||||||
],
|
],
|
||||||
"webRoot": "${workspaceFolder}",
|
"webRoot": "${workspaceFolder}",
|
||||||
"cascadeTerminateToConfigurations": [
|
// Settings for js-debug:
|
||||||
"Attach to Extension Host"
|
|
||||||
],
|
|
||||||
"userDataDir": false,
|
"userDataDir": false,
|
||||||
"pauseForSourceMap": false,
|
"pauseForSourceMap": false,
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js"
|
"${workspaceFolder}/out/**/*.js"
|
||||||
],
|
],
|
||||||
"browserLaunchLocation": "workspace",
|
"browserLaunchLocation": "workspace"
|
||||||
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "node",
|
"type": "chrome",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch azuredatastudio with new notebook command",
|
||||||
|
"windows": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat"
|
||||||
|
},
|
||||||
|
"osx": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
||||||
|
},
|
||||||
|
"urlFilter": "*index.html*",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"--inspect=5875",
|
||||||
|
"--command=notebook.command.new"
|
||||||
|
],
|
||||||
|
"skipFiles": [
|
||||||
|
"**/winjs*.js"
|
||||||
|
],
|
||||||
|
"webRoot": "${workspaceFolder}",
|
||||||
|
"timeout": 45000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "chrome",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch ADS (Web) (TBD)",
|
"name": "Launch ADS (Web) (TBD)",
|
||||||
"program": "${workspaceFolder}/resources/web/code-web.js",
|
"runtimeExecutable": "yarn",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"web"
|
||||||
|
],
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "0_vscode",
|
"group": "0_vscode",
|
||||||
"order": 2
|
"order": 2
|
||||||
@@ -151,18 +175,6 @@
|
|||||||
"order": 3
|
"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",
|
"type": "node",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
@@ -269,14 +281,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Azure Data Studio",
|
"name": "Azure Data Studio",
|
||||||
"stopAll": true,
|
|
||||||
"configurations": [
|
"configurations": [
|
||||||
"Launch azuredatastudio",
|
"Launch azuredatastudio",
|
||||||
"Attach to Main Process",
|
"Attach to Main Process",
|
||||||
"Attach to Extension Host",
|
"Attach to Extension Host",
|
||||||
"Attach to Shared Process",
|
"Attach to Shared Process",
|
||||||
],
|
],
|
||||||
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "0_vscode",
|
"group": "0_vscode",
|
||||||
"order": 1
|
"order": 1
|
||||||
|
|||||||
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:\"August 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:\"August 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:\"July 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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
35
.vscode/searches/es6.code-search
vendored
35
.vscode/searches/es6.code-search
vendored
@@ -2,7 +2,7 @@
|
|||||||
# Flags: CaseSensitive WordMatch
|
# Flags: CaseSensitive WordMatch
|
||||||
# ContextLines: 2
|
# ContextLines: 2
|
||||||
|
|
||||||
14 results - 4 files
|
16 results - 5 files
|
||||||
|
|
||||||
src/vs/base/browser/dom.ts:
|
src/vs/base/browser/dom.ts:
|
||||||
81 };
|
81 };
|
||||||
@@ -34,11 +34,24 @@ src/vs/base/common/arrays.ts:
|
|||||||
420 */
|
420 */
|
||||||
421 export function first<T>(array: ReadonlyArray<T>, fn: (item: T) => boolean, notFoundValue: T): T;
|
421 export function first<T>(array: ReadonlyArray<T>, fn: (item: T) => boolean, notFoundValue: T): T;
|
||||||
|
|
||||||
568
|
560
|
||||||
569 /**
|
561 /**
|
||||||
570: * @deprecated ES6: use `Array.find`
|
562: * @deprecated ES6: use `Array.find`
|
||||||
571 */
|
563 */
|
||||||
572 export function find<T>(arr: ArrayLike<T>, predicate: (value: T, index: number, arr: ArrayLike<T>) => any): T | undefined {
|
564 export function find<T>(arr: ArrayLike<T>, predicate: (value: T, index: number, arr: ArrayLike<T>) => any): T | undefined {
|
||||||
|
|
||||||
|
src/vs/base/common/map.ts:
|
||||||
|
11
|
||||||
|
12 /**
|
||||||
|
13: * @deprecated ES6: use `[...SetOrMap.values()]`
|
||||||
|
14 */
|
||||||
|
15 export function values<V = any>(set: Set<V>): V[];
|
||||||
|
|
||||||
|
22
|
||||||
|
23 /**
|
||||||
|
24: * @deprecated ES6: use `[...map.keys()]`
|
||||||
|
25 */
|
||||||
|
26 export function keys<K, V>(map: Map<K, V>): K[] {
|
||||||
|
|
||||||
src/vs/base/common/objects.ts:
|
src/vs/base/common/objects.ts:
|
||||||
115
|
115
|
||||||
@@ -66,8 +79,8 @@ src/vs/base/common/strings.ts:
|
|||||||
170 */
|
170 */
|
||||||
171 export function endsWith(haystack: string, needle: string): boolean {
|
171 export function endsWith(haystack: string, needle: string): boolean {
|
||||||
|
|
||||||
861
|
853
|
||||||
862 /**
|
854 /**
|
||||||
863: * @deprecated ES6
|
855: * @deprecated ES6
|
||||||
864 */
|
856 */
|
||||||
865 export function repeat(s: string, count: number): string {
|
857 export function repeat(s: string, count: number): string {
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -26,7 +26,6 @@
|
|||||||
"test/automation/out/**": true,
|
"test/automation/out/**": true,
|
||||||
"test/integration/browser/out/**": true,
|
"test/integration/browser/out/**": true,
|
||||||
"src/vs/base/test/node/uri.test.data.txt": 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/server": false
|
||||||
},
|
},
|
||||||
"lcov.path": [
|
"lcov.path": [
|
||||||
@@ -73,7 +72,7 @@
|
|||||||
},
|
},
|
||||||
"gulp.autoDetect": "off",
|
"gulp.autoDetect": "off",
|
||||||
"files.insertFinalNewline": true,
|
"files.insertFinalNewline": true,
|
||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
},
|
},
|
||||||
"typescript.tsc.autoDetect": "off"
|
"typescript.tsc.autoDetect": "off"
|
||||||
|
|||||||
160
.vscode/tasks.json
vendored
160
.vscode/tasks.json
vendored
@@ -3,95 +3,34 @@
|
|||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch-clientd",
|
"script": "watchd",
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build VS Code",
|
"label": "Build VS Code",
|
||||||
"dependsOn": [
|
|
||||||
"Build VS Code Core",
|
|
||||||
"Build VS Code Extensions"
|
|
||||||
],
|
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"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",
|
"type": "npm",
|
||||||
"script": "strict-vscode-watch",
|
"script": "strict-vscode-watch",
|
||||||
@@ -108,35 +47,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch-webd",
|
"script": "kill-watchd",
|
||||||
"label": "Build Web Extensions",
|
"label": "Kill Build VS Code",
|
||||||
"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",
|
"group": "build",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
@@ -177,7 +89,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "yarn web --no-launch",
|
"command": "yarn web -- --no-launch",
|
||||||
"label": "Run web",
|
"label": "Run web",
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"problemMatcher": {
|
"problemMatcher": {
|
||||||
@@ -200,28 +112,6 @@
|
|||||||
"source": "eslint",
|
"source": "eslint",
|
||||||
"base": "$eslint-stylish"
|
"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"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
2
.yarnrc
2
.yarnrc
@@ -1,3 +1,3 @@
|
|||||||
disturl "https://atom.io/download/electron"
|
disturl "https://atom.io/download/electron"
|
||||||
target "9.2.1"
|
target "7.2.4"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
|
|||||||
58
CHANGELOG.md
58
CHANGELOG.md
@@ -1,63 +1,5 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## 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
|
## Version 1.17.1
|
||||||
* Release date: April 29, 2020
|
* Release date: April 29, 2020
|
||||||
* Release status: General Availability
|
* Release status: General Availability
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -1,7 +1,7 @@
|
|||||||
# Azure Data Studio
|
# Azure Data Studio
|
||||||
|
|
||||||
[](https://gitter.im/Microsoft/sqlopsstudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](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://dev.azure.com/azuredatastudio/azuredatastudio/_build/latest?definitionId=4&branchName=master)
|
||||||
[](https://twitter.com/azuredatastudio)
|
[](https://twitter.com/azuredatastudio)
|
||||||
|
|
||||||
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.
|
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.
|
||||||
@@ -21,14 +21,14 @@ Azure Data Studio is a data management tool that enables you to work with SQL Se
|
|||||||
|
|
||||||
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
Go to our [download page](https://aka.ms/azuredatastudio) 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 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 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)
|
- [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)
|
- [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)
|
- [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.
|
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**
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ See the [change log](https://github.com/Microsoft/azuredatastudio/blob/main/CHAN
|
|||||||
|
|
||||||
Here are some of these features in action.
|
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
|
## Contributing
|
||||||
If you are interested in fixing issues and contributing directly to the code base,
|
If you are interested in fixing issues and contributing directly to the code base,
|
||||||
@@ -60,7 +60,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.
|
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
|
## 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
|
## Privacy Statement
|
||||||
The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) describes the privacy statement of this software.
|
The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) describes the privacy statement of this software.
|
||||||
@@ -120,8 +122,19 @@ We would like to thank all our users who raised issues, and in particular the fo
|
|||||||
* SebastianPfliegel `Remove sqlExtensionHelp (#312)`
|
* SebastianPfliegel `Remove sqlExtensionHelp (#312)`
|
||||||
* olljanat for `Implemented npm version check (#314)`
|
* olljanat for `Implemented npm version check (#314)`
|
||||||
* Adam Machanic for helping with the `whoisactive` extension
|
* 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
|
## License
|
||||||
|
|
||||||
@@ -129,10 +142,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
|||||||
|
|
||||||
Licensed under the [Source EULA](LICENSE.txt).
|
Licensed under the [Source EULA](LICENSE.txt).
|
||||||
|
|
||||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2138608
|
[win-user]: https://go.microsoft.com/fwlink/?linkid=2127556
|
||||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2138704
|
[win-system]: https://go.microsoft.com/fwlink/?linkid=2127555
|
||||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2138705
|
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2127476
|
||||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2138609
|
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2127554
|
||||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2138706
|
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2127553
|
||||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2138507
|
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2127552
|
||||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2138508
|
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2127551
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
|||||||
JupyterLab: https://github.com/jupyterlab/jupyterlab
|
JupyterLab: https://github.com/jupyterlab/jupyterlab
|
||||||
keytar: https://github.com/atom/node-keytar
|
keytar: https://github.com/atom/node-keytar
|
||||||
make-error: https://github.com/JsCommunity/make-error
|
make-error: https://github.com/JsCommunity/make-error
|
||||||
mark.js: https://github.com/julmot/mark.js
|
|
||||||
minimist: https://github.com/substack/minimist
|
minimist: https://github.com/substack/minimist
|
||||||
moment: https://github.com/moment/moment
|
moment: https://github.com/moment/moment
|
||||||
native-keymap: https://github.com/Microsoft/node-native-keymap
|
native-keymap: https://github.com/Microsoft/node-native-keymap
|
||||||
@@ -64,8 +63,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
|||||||
svg.js: https://github.com/svgdotjs/svg.js
|
svg.js: https://github.com/svgdotjs/svg.js
|
||||||
systemjs: https://github.com/systemjs/systemjs
|
systemjs: https://github.com/systemjs/systemjs
|
||||||
temp-write: https://github.com/sindresorhus/temp-write
|
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
|
underscore: https://github.com/jashkenas/underscore
|
||||||
v8-profiler: https://github.com/node-inspector/v8-profiler
|
v8-profiler: https://github.com/node-inspector/v8-profiler
|
||||||
vscode: https://github.com/microsoft/vscode
|
vscode: https://github.com/microsoft/vscode
|
||||||
@@ -75,8 +72,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
|||||||
vscode-ripgrep: https://github.com/roblourens/vscode-ripgrep
|
vscode-ripgrep: https://github.com/roblourens/vscode-ripgrep
|
||||||
vscode-textmate: https://github.com/Microsoft/vscode-textmate
|
vscode-textmate: https://github.com/Microsoft/vscode-textmate
|
||||||
winreg: https://github.com/fresc81/node-winreg
|
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
|
xterm: https://github.com/sourcelair/xterm.js
|
||||||
yargs: https://github.com/yargs/yargs
|
yargs: https://github.com/yargs/yargs
|
||||||
yauzl: https://github.com/thejoshwolfe/yauzl
|
yauzl: https://github.com/thejoshwolfe/yauzl
|
||||||
@@ -1257,32 +1252,6 @@ ISC © Julien Fontanet
|
|||||||
=========================================
|
=========================================
|
||||||
END OF make-error NOTICES AND INFORMATION
|
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
|
%% minimist NOTICES AND INFORMATION BEGIN HERE
|
||||||
=========================================
|
=========================================
|
||||||
This software is released under the MIT license:
|
This software is released under the MIT license:
|
||||||
@@ -2031,58 +2000,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
=========================================
|
=========================================
|
||||||
END OF temp-write NOTICES AND INFORMATION
|
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
|
%% underscore NOTICES AND INFORMATION BEGIN HERE
|
||||||
=========================================
|
=========================================
|
||||||
Copyright (c) 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative
|
Copyright (c) 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||||
@@ -2308,51 +2225,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
=========================================
|
=========================================
|
||||||
END OF winreg NOTICES AND INFORMATION
|
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
|
%% xterm NOTICES AND INFORMATION BEGIN HERE
|
||||||
=========================================
|
=========================================
|
||||||
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
|
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
trigger:
|
trigger:
|
||||||
- main
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -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/**
|
|
||||||
@@ -286,9 +286,9 @@ nice-try@^1.0.4:
|
|||||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||||
|
|
||||||
node-fetch@^2.3.0:
|
node-fetch@^2.3.0:
|
||||||
version "2.6.1"
|
version "2.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
|
||||||
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
|
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
|
||||||
|
|
||||||
npm-run-path@^2.0.0:
|
npm-run-path@^2.0.0:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ 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-node-debug.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.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
|
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
|
$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 .
|
$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
|
mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry
|
||||||
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
||||||
mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf extraction
|
rm -rf extraction
|
||||||
@@ -216,10 +216,10 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
// Insiders: nightly build from main
|
// Insiders: nightly build from master
|
||||||
const isReleased = (
|
const isReleased = (
|
||||||
(
|
(
|
||||||
(quality === 'insider' && /^main$|^refs\/heads\/main$/.test(sourceBranch)) ||
|
(quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch)) ||
|
||||||
(quality === 'rc1' && /^release\/|^refs\/heads\/release\//.test(sourceBranch))
|
(quality === 'rc1' && /^release\/|^refs\/heads\/release\//.test(sourceBranch))
|
||||||
) &&
|
) &&
|
||||||
/Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)
|
/Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)
|
||||||
|
|||||||
228
build/azure-pipelines/common/symbols.ts
Normal file
228
build/azure-pipelines/common/symbols.ts
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* 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_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 (!Array.isArray(versions.app_versions)) {
|
||||||
|
throw new Error(`Unexpected response: ${JSON.stringify(versions)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
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];
|
||||||
|
|
||||||
|
if (process.argv.length !== 6) {
|
||||||
|
throw new Error(`HockeyApp: Unexpected number of arguments. Got ${process.argv}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = Platform.LINUX_64;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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} (AppID: ${hockeyAppId})`);
|
||||||
|
|
||||||
|
return process.exit(1);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log(`HockeyApp: skipping due to unexpected context (repository: ${repository}, codeVersion: ${codeVersion}, electronVersion: ${electronVersion}, quality: ${product.quality})`);
|
||||||
|
}
|
||||||
@@ -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>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
||||||
inputs:
|
inputs:
|
||||||
@@ -29,7 +29,15 @@ steps:
|
|||||||
yarn electron x64
|
yarn electron x64
|
||||||
displayName: Download Electron
|
displayName: Download Electron
|
||||||
|
|
||||||
# - script: | {{SQL CARBON EDIT}} remove editor checks
|
- script: |
|
||||||
|
yarn gulp hygiene
|
||||||
|
displayName: Run Hygiene Checks
|
||||||
|
|
||||||
|
- script: | # {{SQL CARBON EDIT}} add step
|
||||||
|
yarn strict-vscode
|
||||||
|
displayName: Run Strict Null Check.
|
||||||
|
|
||||||
|
# - script: | {{SQL CARBON EDIT}} remove step
|
||||||
# yarn monaco-compile-check
|
# yarn monaco-compile-check
|
||||||
# displayName: Run Monaco Editor Checks
|
# displayName: Run Monaco Editor Checks
|
||||||
|
|
||||||
@@ -50,20 +58,19 @@ steps:
|
|||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
# - script: | {{SQL CARBON EDIT}} disable
|
# - script: | {{SQL CARBON EDIT}} disable
|
||||||
# yarn test-browser --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
|
# yarn test-browser --browser chromium --browser webkit --browser firefox
|
||||||
# displayName: Run Unit Tests (Browser)
|
# displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
# - script: | {{SQL CARBON EDIT}} disable
|
# - script: | {{SQL CARBON EDIT}} disable
|
||||||
# ./scripts/test-integration.sh --tfs "Integration Tests"
|
# ./scripts/test-integration.sh --tfs "Integration Tests"
|
||||||
# displayName: Run Integration Tests (Electron)
|
# displayName: Run Integration Tests (Electron)
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
# - task: PublishPipelineArtifact@0
|
||||||
inputs:
|
# inputs:
|
||||||
artifactName: crash-dump-macos
|
# artifactName: crash-dump-macos
|
||||||
targetPath: .build/crashes
|
# targetPath: .build/crashes
|
||||||
displayName: 'Publish Crash Reports'
|
# displayName: 'Publish Crash Reports'
|
||||||
continueOnError: true
|
# condition: succeededOrFailed()
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
|
|||||||
6
build/azure-pipelines/darwin/entitlements.plist
Normal file
6
build/azure-pipelines/darwin/entitlements.plist
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?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>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
@@ -101,7 +101,7 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn test-browser --build --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
|
yarn test-browser --build --browser chromium --browser webkit --browser firefox
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
@@ -118,13 +118,6 @@ steps:
|
|||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
|
|
||||||
./resources/server/test/test-web-integration.sh --browser webkit
|
|
||||||
displayName: Run integration tests (Browser)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
@@ -135,6 +128,13 @@ steps:
|
|||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
|
||||||
|
./resources/server/test/test-web-integration.sh --browser webkit
|
||||||
|
displayName: Run integration tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
@@ -157,25 +157,24 @@ steps:
|
|||||||
artifactName: crash-dump-macos
|
artifactName: crash-dump-macos
|
||||||
targetPath: .build/crashes
|
targetPath: .build/crashes
|
||||||
displayName: 'Publish Crash Reports'
|
displayName: 'Publish Crash Reports'
|
||||||
continueOnError: true
|
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: Publish Tests Results
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '*-results.xml'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
|
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||||
|
HELPER_APP_NAME="`echo $APP_NAME | sed -e 's/^Visual Studio //;s/\.app$//'`"
|
||||||
|
APP_FRAMEWORK_PATH="$APP_ROOT/$APP_NAME/Contents/Frameworks"
|
||||||
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
||||||
security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
|
security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
|
||||||
security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
||||||
echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
|
echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
|
||||||
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
|
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
|
||||||
DEBUG=electron-osx-sign* node build/darwin/sign.js
|
codesign -s 99FM488X57 --deep --force --options runtime --entitlements build/azure-pipelines/darwin/entitlements.plist "$APP_ROOT"/*.app
|
||||||
|
codesign -s 99FM488X57 --force --options runtime --entitlements build/azure-pipelines/darwin/helper-gpu-entitlements.plist "$APP_FRAMEWORK_PATH/$HELPER_APP_NAME Helper (GPU).app"
|
||||||
|
codesign -s 99FM488X57 --force --options runtime --entitlements build/azure-pipelines/darwin/helper-plugin-entitlements.plist "$APP_FRAMEWORK_PATH/$HELPER_APP_NAME Helper (Plugin).app"
|
||||||
|
codesign -s 99FM488X57 --force --options runtime --entitlements build/azure-pipelines/darwin/helper-renderer-entitlements.plist "$APP_FRAMEWORK_PATH/$HELPER_APP_NAME Helper (Renderer).app"
|
||||||
displayName: Set Hardened Entitlements
|
displayName: Set Hardened Entitlements
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@@ -211,6 +210,13 @@ steps:
|
|||||||
zip -d $(agent.builddirectory)/VSCode-darwin.zip "*.pkg"
|
zip -d $(agent.builddirectory)/VSCode-darwin.zip "*.pkg"
|
||||||
displayName: Clean Archive
|
displayName: Clean Archive
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
|
node build/azure-pipelines/common/createAsset.js darwin-unnotarized archive "VSCode-darwin-$VSCODE_QUALITY.zip" $(agent.builddirectory)/VSCode-darwin.zip
|
||||||
|
displayName: Publish Unnotarized Build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||||
@@ -242,28 +248,16 @@ steps:
|
|||||||
SessionTimeout: 60
|
SessionTimeout: 60
|
||||||
displayName: Notarization
|
displayName: Notarization
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
|
||||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
|
||||||
"$APP_ROOT/$APP_NAME/Contents/Resources/app/bin/code" --export-default-configuration=.build
|
|
||||||
displayName: Verify start after signing (export configuration)
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
|
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
||||||
./build/azure-pipelines/darwin/publish.sh
|
./build/azure-pipelines/darwin/publish.sh
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
- script: |
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
|
||||||
yarn gulp upload-vscode-configuration
|
|
||||||
displayName: Upload configuration (for Bing settings search)
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
displayName: 'Component Detection'
|
displayName: 'Component Detection'
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
|
|||||||
@@ -17,3 +17,11 @@ node build/azure-pipelines/common/createAsset.js \
|
|||||||
archive-unsigned \
|
archive-unsigned \
|
||||||
"vscode-server-darwin.zip" \
|
"vscode-server-darwin.zip" \
|
||||||
../vscode-server-darwin.zip
|
../vscode-server-darwin.zip
|
||||||
|
|
||||||
|
# publish hockeyapp symbols
|
||||||
|
# node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" x64 "$VSCODE_HOCKEYAPP_ID_MACOS"
|
||||||
|
# Skip hockey app because build failure.
|
||||||
|
# https://github.com/microsoft/vscode/issues/90491
|
||||||
|
|
||||||
|
# upload configuration
|
||||||
|
yarn gulp upload-vscode-configuration
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: InstallAppleCertificate@2
|
|
||||||
displayName: 'Install developer certificate'
|
|
||||||
inputs:
|
|
||||||
certSecureFile: 'osx_signing_key.p12'
|
|
||||||
condition: eq(variables['signed'], true)
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: 'Download Build Artifacts'
|
|
||||||
inputs:
|
|
||||||
downloadType: specific
|
|
||||||
itemPattern: 'drop/darwin/archive/azuredatastudio-darwin-unsigned.zip'
|
|
||||||
downloadPath: '$(Build.SourcesDirectory)/.build/'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
pushd $(Build.SourcesDirectory)/.build/drop/darwin/archive
|
|
||||||
mv azuredatastudio-darwin-unsigned.zip azuredatastudio-darwin.zip
|
|
||||||
displayName: 'Rename the file'
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
displayName: 'ESRP CodeSigning'
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '$(Build.SourcesDirectory)/.build/drop/darwin/archive'
|
|
||||||
Pattern: 'azuredatastudio-darwin.zip'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-401337-Apple",
|
|
||||||
"operationCode": "MacAppDeveloperSign",
|
|
||||||
"parameters": {
|
|
||||||
"Hardening": "Enable"
|
|
||||||
},
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 90
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
zip -d $(Build.SourcesDirectory)/.build/drop/darwin/archive/azuredatastudio-darwin.zip "*.pkg"
|
|
||||||
displayName: Clean Archive
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- task: EsrpCodeSigning@1
|
|
||||||
displayName: 'ESRP Notarization'
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '$(Build.SourcesDirectory)/.build/drop/darwin/archive'
|
|
||||||
Pattern: 'azuredatastudio-darwin.zip'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"KeyCode": "CP-401337-Apple",
|
|
||||||
"OperationCode": "MacAppNotarize",
|
|
||||||
"Parameters": {
|
|
||||||
"BundleId": "com.microsoft.azuredatastudio-$(VSCODE_QUALITY)"
|
|
||||||
},
|
|
||||||
"ToolName": "sign",
|
|
||||||
"ToolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 120
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)/darwin/archive'
|
|
||||||
inputs:
|
|
||||||
SourceFolder: '$(Build.SourcesDirectory)/.build/drop/darwin/archive'
|
|
||||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/darwin/archive'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
condition: always()
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
inputs:
|
|
||||||
failOnAlert: true
|
|
||||||
@@ -27,11 +27,11 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: '10.15.3'
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: '1.x'
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
@@ -104,40 +104,24 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
./scripts/test.sh --build --coverage --reporter mocha-junit-reporter --tfs "Unit Tests"
|
./scripts/test.sh --build --coverage --reporter mocha-junit-reporter
|
||||||
displayName: Run unit tests
|
displayName: Run unit tests
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin
|
|
||||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-darwin" \
|
|
||||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
|
||||||
displayName: Run integration tests (Electron)
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin
|
APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin
|
||||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||||
yarn smoketest --build "$APP_ROOT/$APP_NAME" --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
yarn smoketest --build "$APP_ROOT/$APP_NAME" --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
||||||
displayName: Run smoke tests (Electron)
|
displayName: Run smoke tests (Electron)
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||||
|
|
||||||
- script: |
|
# - script: |
|
||||||
set -e
|
# set -e
|
||||||
node ./node_modules/playwright/install.js
|
# VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-web-darwin" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-web-darwin" \
|
# yarn smoketest --web --headless --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
||||||
yarn smoketest --web --headless --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
# displayName: Run smoke tests (Browser)
|
||||||
displayName: Run smoke tests (Browser)
|
# condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
@@ -174,16 +158,55 @@ steps:
|
|||||||
pushd ../azuredatastudio-darwin
|
pushd ../azuredatastudio-darwin
|
||||||
ditto -c -k --keepParent *.app $(Build.SourcesDirectory)/.build/darwin/archive/azuredatastudio-darwin.zip
|
ditto -c -k --keepParent *.app $(Build.SourcesDirectory)/.build/darwin/archive/azuredatastudio-darwin.zip
|
||||||
popd
|
popd
|
||||||
displayName: 'Archive (no signing)'
|
displayName: 'Archive'
|
||||||
condition: and(succeeded(), eq(variables['signed'], false))
|
|
||||||
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
|
displayName: 'ESRP CodeSigning'
|
||||||
|
inputs:
|
||||||
|
ConnectedServiceName: 'Code Signing'
|
||||||
|
FolderPath: '$(Build.SourcesDirectory)/.build/darwin/archive'
|
||||||
|
Pattern: 'azuredatastudio-darwin.zip'
|
||||||
|
signConfigType: inlineSignParams
|
||||||
|
inlineOperation: |
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"keyCode": "CP-401337-Apple",
|
||||||
|
"operationCode": "MacAppDeveloperSign",
|
||||||
|
"parameters": {
|
||||||
|
"Hardening": "Enable"
|
||||||
|
},
|
||||||
|
"toolName": "sign",
|
||||||
|
"toolVersion": "1.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
SessionTimeout: 90
|
||||||
|
condition: and(succeeded(), eq(variables['signed'], true))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
zip -d $(Build.SourcesDirectory)/.build/darwin/archive/azuredatastudio-darwin.zip "*.pkg"
|
||||||
mkdir -p .build/darwin/archive
|
displayName: Clean Archive
|
||||||
pushd ../azuredatastudio-darwin
|
condition: and(succeeded(), eq(variables['signed'], true))
|
||||||
ditto -c -k --keepParent *.app $(Build.SourcesDirectory)/.build/darwin/archive/azuredatastudio-darwin-unsigned.zip
|
|
||||||
popd
|
- task: EsrpCodeSigning@1
|
||||||
displayName: 'Archive'
|
displayName: 'ESRP Notarization'
|
||||||
|
inputs:
|
||||||
|
ConnectedServiceName: 'Code Signing'
|
||||||
|
FolderPath: '$(Build.SourcesDirectory)/.build/darwin/archive'
|
||||||
|
Pattern: 'azuredatastudio-darwin.zip'
|
||||||
|
signConfigType: inlineSignParams
|
||||||
|
inlineOperation: |
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"KeyCode": "CP-401337-Apple",
|
||||||
|
"OperationCode": "MacAppNotarize",
|
||||||
|
"Parameters": {
|
||||||
|
"BundleId": "com.microsoft.azuredatastudio-$(VSCODE_QUALITY)"
|
||||||
|
},
|
||||||
|
"ToolName": "sign",
|
||||||
|
"ToolVersion": "1.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
SessionTimeout: 120
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
condition: and(succeeded(), eq(variables['signed'], true))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
|||||||
@@ -3,15 +3,15 @@ pool:
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
include: ['main', 'release/*']
|
include: ['master', 'release/*']
|
||||||
pr:
|
pr:
|
||||||
branches:
|
branches:
|
||||||
include: ['main', 'release/*']
|
include: ['master', 'release/*']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
@@ -34,8 +34,8 @@ steps:
|
|||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
||||||
git fetch distro
|
git fetch distro
|
||||||
|
|
||||||
# Push main branch into oss/master
|
# Push master branch into oss/master
|
||||||
git push distro origin/main:refs/heads/oss/master
|
git push distro origin/master:refs/heads/oss/master
|
||||||
|
|
||||||
# Push every release branch into oss/release
|
# Push every release branch into oss/release
|
||||||
git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro
|
git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: '10.15.1'
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
@@ -65,17 +65,17 @@ steps:
|
|||||||
node build/azure-pipelines/mixin
|
node build/azure-pipelines/mixin
|
||||||
displayName: Mix in quality
|
displayName: Mix in quality
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
downloadPath: '$(Build.SourcesDirectory)/.build'
|
targetPath: '$(Build.SourcesDirectory)/.build'
|
||||||
artifactName: drop
|
artifactName: drop
|
||||||
itemPattern: |
|
itemPattern: |
|
||||||
drop/linux/server/*.tar.gz
|
drop/linux/server/*.tar.gz
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
for f in $(Build.SourcesDirectory)/.build/drop/linux/server/*.tar.gz
|
for f in $(Build.SourcesDirectory)/.build/linux/server/*.tar.gz
|
||||||
do
|
do
|
||||||
tar -C $(agent.builddirectory) -zxvf $f
|
tar -C $(agent.builddirectory) -zxvf $f
|
||||||
rm $f
|
rm $f
|
||||||
|
|||||||
@@ -3,15 +3,15 @@ pool:
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
include: ['main']
|
include: ['master']
|
||||||
pr:
|
pr:
|
||||||
branches:
|
branches:
|
||||||
include: ['main']
|
include: ['master']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
@@ -31,10 +31,10 @@ steps:
|
|||||||
git config user.email "vscode@microsoft.com"
|
git config user.email "vscode@microsoft.com"
|
||||||
git config user.name "VSCode"
|
git config user.name "VSCode"
|
||||||
|
|
||||||
git checkout origin/electron-x.y.z
|
git checkout origin/electron-8.0.x
|
||||||
git merge origin/master
|
git merge origin/master
|
||||||
|
|
||||||
# Push master branch into exploration branch
|
# Push master branch into exploration branch
|
||||||
git push origin HEAD:electron-x.y.z
|
git push origin HEAD:electron-8.0.x
|
||||||
|
|
||||||
displayName: Sync & Merge Exploration
|
displayName: Sync & Merge Exploration
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
@@ -44,8 +44,8 @@ steps:
|
|||||||
|
|
||||||
- script: | # {{SQL CARBON EDIT}} add strict null check
|
- script: | # {{SQL CARBON EDIT}} add strict null check
|
||||||
yarn strict-vscode
|
yarn strict-vscode
|
||||||
displayName: Run Strict Null Check
|
|
||||||
|
|
||||||
|
displayName: Run Strict Null Check
|
||||||
# - script: | {{SQL CARBON EDIT}} remove monaco editor checks
|
# - script: | {{SQL CARBON EDIT}} remove monaco editor checks
|
||||||
# yarn monaco-compile-check
|
# yarn monaco-compile-check
|
||||||
# displayName: Run Monaco Editor Checks
|
# displayName: Run Monaco Editor Checks
|
||||||
@@ -67,7 +67,7 @@ steps:
|
|||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
# - script: | {{SQL CARBON EDIT}} disable
|
# - script: | {{SQL CARBON EDIT}} disable
|
||||||
# DISPLAY=:10 yarn test-browser --browser chromium --tfs "Browser Unit Tests"
|
# DISPLAY=:10 yarn test-browser --browser chromium
|
||||||
# displayName: Run Unit Tests (Browser)
|
# displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
# - script: | {{SQL CARBON EDIT}} disable
|
# - script: | {{SQL CARBON EDIT}} disable
|
||||||
@@ -81,14 +81,6 @@ steps:
|
|||||||
# displayName: 'Publish Crash Reports'
|
# displayName: 'Publish Crash Reports'
|
||||||
# condition: succeededOrFailed()
|
# condition: succeededOrFailed()
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: crash-dump-linux
|
|
||||||
targetPath: .build/crashes
|
|
||||||
displayName: 'Publish Crash Reports'
|
|
||||||
continueOnError: true
|
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
@@ -107,6 +107,7 @@ steps:
|
|||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
|
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
||||||
./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/publish.sh
|
./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/publish.sh
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
@@ -106,7 +106,7 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
DISPLAY=:10 yarn test-browser --build --browser chromium
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
@@ -123,13 +123,6 @@ steps:
|
|||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-x64" \
|
|
||||||
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
|
||||||
displayName: Run integration tests (Browser)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
||||||
@@ -140,19 +133,18 @@ steps:
|
|||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-x64" \
|
||||||
|
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
||||||
|
displayName: Run integration tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: crash-dump-linux
|
artifactName: crash-dump-linux
|
||||||
targetPath: .build/crashes
|
targetPath: .build/crashes
|
||||||
displayName: 'Publish Crash Reports'
|
displayName: 'Publish Crash Reports'
|
||||||
continueOnError: true
|
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: Publish Tests Results
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '*-results.xml'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@@ -186,6 +178,7 @@ steps:
|
|||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
|
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
||||||
./build/azure-pipelines/linux/publish.sh
|
./build/azure-pipelines/linux/publish.sh
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ rm -rf $ROOT/vscode-server-*.tar.*
|
|||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH"
|
node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH"
|
||||||
|
|
||||||
|
# Publish hockeyapp symbols
|
||||||
|
# node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "x64" "$VSCODE_HOCKEYAPP_ID_LINUX64"
|
||||||
|
# Skip hockey app because build failure.
|
||||||
|
# https://github.com/microsoft/vscode/issues/90491
|
||||||
|
|
||||||
# Publish DEB
|
# Publish DEB
|
||||||
PLATFORM_DEB="linux-deb-x64"
|
PLATFORM_DEB="linux-deb-x64"
|
||||||
DEB_ARCH="amd64"
|
DEB_ARCH="amd64"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
parameters:
|
|
||||||
extensionsToUnitTest: []
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
mkdir -p .build
|
mkdir -p .build
|
||||||
@@ -24,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: '10.15.1'
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
@@ -97,6 +94,12 @@ steps:
|
|||||||
env:
|
env:
|
||||||
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
service xvfb start
|
||||||
|
displayName: Start xvfb
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn gulp package-rebuild-extensions
|
yarn gulp package-rebuild-extensions
|
||||||
@@ -105,40 +108,14 @@ steps:
|
|||||||
displayName: Package External extensions
|
displayName: Package External extensions
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
|
||||||
service xvfb start
|
|
||||||
displayName: Start xvfb
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --coverage --reporter mocha-junit-reporter --tfs "Unit Tests"
|
|
||||||
displayName: Run unit tests (Electron)
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-linux-x64" \
|
DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
||||||
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
displayName: 'Run Stable Extension Unit Tests'
|
||||||
displayName: Run integration tests (Electron)
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||||
|
|
||||||
- ${{each extension in parameters.extensionsToUnitTest}}:
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
||||||
DISPLAY=:10 node ./scripts/test-extensions-unit.js ${{ extension }}
|
|
||||||
displayName: 'Run ${{ extension }} Stable Extension Unit Tests'
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
||||||
@@ -159,57 +136,17 @@ steps:
|
|||||||
yarn gulp vscode-linux-x64-build-rpm
|
yarn gulp vscode-linux-x64-build-rpm
|
||||||
displayName: Build Rpm
|
displayName: Build Rpm
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Install .NET Core sdk for signing'
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: 2.1.x
|
|
||||||
installationPath: $(Agent.ToolsDirectory)/dotnet
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '$(Build.SourcesDirectory)/.build'
|
|
||||||
Pattern: 'extensions/*.vsix'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-233016",
|
|
||||||
"operationSetCode": "OpcSign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "FileDigest",
|
|
||||||
"parameterValue": "/fd \"SHA256\""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyCode": "CP-233016",
|
|
||||||
"operationSetCode": "OpcVerify",
|
|
||||||
"parameters": [],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 120
|
|
||||||
displayName: 'Signing Extensions'
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
./build/azure-pipelines/linux/createDrop.sh
|
./build/azure-pipelines/linux/createDrop.sh
|
||||||
displayName: Create Drop
|
displayName: Create Drop
|
||||||
|
|
||||||
- script: |
|
- task: CopyFiles@2
|
||||||
set -e
|
displayName: 'Copy Extension Unit Test Coverage Files to: $(Build.ArtifactStagingDirectory)'
|
||||||
shopt -s globstar
|
inputs:
|
||||||
mkdir -p $(Build.ArtifactStagingDirectory)/test-results/coverage
|
SourceFolder: '$(Build.SourcesDirectory)/extensions'
|
||||||
cp --parents -r $(Build.SourcesDirectory)/extensions/*/coverage/** $(Build.ArtifactStagingDirectory)/test-results/coverage
|
Contents: '*/coverage/**'
|
||||||
displayName: Copy Coverage
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/test-results/coverage'
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: 'Publish Test Results test-results.xml'
|
displayName: 'Publish Test Results test-results.xml'
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ const es = require('event-stream');
|
|||||||
const vfs = require('vinyl-fs');
|
const vfs = require('vinyl-fs');
|
||||||
const fancyLog = require('fancy-log');
|
const fancyLog = require('fancy-log');
|
||||||
const ansiColors = require('ansi-colors');
|
const ansiColors = require('ansi-colors');
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
const quality = process.env['VSCODE_QUALITY'];
|
const quality = process.env['VSCODE_QUALITY'];
|
||||||
@@ -23,7 +21,7 @@ function main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const productJsonFilter = filter(f => f.relative === 'product.json', { restore: true });
|
const productJsonFilter = filter('**/product.json', { restore: true });
|
||||||
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
|
fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
|
||||||
return vfs
|
return vfs
|
||||||
@@ -31,32 +29,7 @@ function main() {
|
|||||||
.pipe(filter(f => !f.isDirectory()))
|
.pipe(filter(f => !f.isDirectory()))
|
||||||
.pipe(productJsonFilter)
|
.pipe(productJsonFilter)
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(json(o => {
|
.pipe(json(o => Object.assign({}, require('../../product.json'), o)))
|
||||||
const ossProduct = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'product.json'), 'utf8'));
|
|
||||||
let builtInExtensions = ossProduct.builtInExtensions;
|
|
||||||
|
|
||||||
if (Array.isArray(o.builtInExtensions)) {
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'Overwriting built-in extensions:', o.builtInExtensions.map(e => e.name));
|
|
||||||
|
|
||||||
builtInExtensions = o.builtInExtensions;
|
|
||||||
} else if (o.builtInExtensions) {
|
|
||||||
const include = o.builtInExtensions['include'] || [];
|
|
||||||
const exclude = o.builtInExtensions['exclude'] || [];
|
|
||||||
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'OSS built-in extensions:', builtInExtensions.map(e => e.name));
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'Including built-in extensions:', include.map(e => e.name));
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'Excluding built-in extensions:', exclude);
|
|
||||||
|
|
||||||
builtInExtensions = builtInExtensions.filter(ext => !include.find(e => e.name === ext.name) && !exclude.find(name => name === ext.name));
|
|
||||||
builtInExtensions = [...builtInExtensions, ...include];
|
|
||||||
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'Final built-in extensions:', builtInExtensions.map(e => e.name));
|
|
||||||
} else {
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), 'Inheriting OSS built-in extensions', builtInExtensions.map(e => e.name));
|
|
||||||
}
|
|
||||||
|
|
||||||
return { ...ossProduct, ...o, builtInExtensions };
|
|
||||||
}))
|
|
||||||
.pipe(productJsonFilter.restore)
|
.pipe(productJsonFilter.restore)
|
||||||
.pipe(es.mapSync(function (f) {
|
.pipe(es.mapSync(function (f) {
|
||||||
fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
|
fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
|
||||||
|
|||||||
@@ -1,3 +1,146 @@
|
|||||||
|
resources:
|
||||||
|
containers:
|
||||||
|
- container: vscode-x64
|
||||||
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
||||||
|
endpoint: VSCodeHub
|
||||||
|
- container: snapcraft
|
||||||
|
image: snapcore/snapcraft:stable
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: Compile
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
container: vscode-x64
|
||||||
|
steps:
|
||||||
|
- template: product-compile.yml
|
||||||
|
|
||||||
|
- job: Windows
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: VS2017-Win2016
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
|
- job: Windows32
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: VS2017-Win2016
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: ia32
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
|
- job: Linux
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
container: vscode-x64
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
|
- job: LinuxSnap
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
container: snapcraft
|
||||||
|
dependsOn: Linux
|
||||||
|
steps:
|
||||||
|
- template: linux/snap-build-linux.yml
|
||||||
|
|
||||||
|
- job: LinuxArmhf
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: armhf
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxArm64
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: arm64
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxAlpine
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: alpine
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxWeb
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: web/product-build-web.yml
|
||||||
|
|
||||||
|
- job: macOS
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
||||||
|
pool:
|
||||||
|
vmImage: macOS-latest
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
steps:
|
||||||
|
- template: darwin/product-build-darwin.yml
|
||||||
|
|
||||||
|
- job: Release
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Windows32
|
||||||
|
- Linux
|
||||||
|
- LinuxSnap
|
||||||
|
- LinuxArmhf
|
||||||
|
- LinuxArm64
|
||||||
|
- LinuxAlpine
|
||||||
|
- macOS
|
||||||
|
steps:
|
||||||
|
- template: release.yml
|
||||||
|
|
||||||
|
- job: Mooncake
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Windows32
|
||||||
|
- Linux
|
||||||
|
- LinuxSnap
|
||||||
|
- LinuxArmhf
|
||||||
|
- LinuxArm64
|
||||||
|
- LinuxAlpine
|
||||||
|
- LinuxWeb
|
||||||
|
- macOS
|
||||||
|
steps:
|
||||||
|
- template: sync-mooncake.yml
|
||||||
|
|
||||||
trigger: none
|
trigger: none
|
||||||
pr: none
|
pr: none
|
||||||
|
|
||||||
@@ -7,138 +150,3 @@ schedules:
|
|||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
resources:
|
|
||||||
containers:
|
|
||||||
- container: vscode-x64
|
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
|
||||||
endpoint: VSCodeHub
|
|
||||||
- container: snapcraft
|
|
||||||
image: snapcore/snapcraft:stable
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: Compile
|
|
||||||
jobs:
|
|
||||||
- job: Compile
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: vscode-x64
|
|
||||||
steps:
|
|
||||||
- template: product-compile.yml
|
|
||||||
|
|
||||||
- stage: Windows
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
jobs:
|
|
||||||
- job: Windows
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: Windows32
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: ia32
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: WindowsARM64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_ARM64'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32-arm64.yml
|
|
||||||
|
|
||||||
- stage: Linux
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
jobs:
|
|
||||||
- job: Linux
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
|
||||||
container: vscode-x64
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxSnap
|
|
||||||
dependsOn:
|
|
||||||
- Linux
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
|
||||||
container: snapcraft
|
|
||||||
steps:
|
|
||||||
- template: linux/snap-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxArmhf
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: armhf
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxArm64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxAlpine
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: alpine
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxWeb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
steps:
|
|
||||||
- template: web/product-build-web.yml
|
|
||||||
|
|
||||||
- stage: macOS
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: macOS-latest
|
|
||||||
jobs:
|
|
||||||
- job: macOS
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
|
||||||
steps:
|
|
||||||
- template: darwin/product-build-darwin.yml
|
|
||||||
|
|
||||||
- stage: Mooncake
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Linux
|
|
||||||
- macOS
|
|
||||||
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
jobs:
|
|
||||||
- job: SyncMooncake
|
|
||||||
displayName: Sync Mooncake
|
|
||||||
steps:
|
|
||||||
- template: sync-mooncake.yml
|
|
||||||
|
|
||||||
- stage: Publish
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Linux
|
|
||||||
- macOS
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
jobs:
|
|
||||||
- job: BuildService
|
|
||||||
displayName: Build Service
|
|
||||||
steps:
|
|
||||||
- template: release.yml
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
@@ -72,6 +72,29 @@ steps:
|
|||||||
vstsFeed: 'npm-vscode'
|
vstsFeed: 'npm-vscode'
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
yarn generate-github-config
|
||||||
|
displayName: Generate GitHub config
|
||||||
|
condition: succeeded()
|
||||||
|
env:
|
||||||
|
OSS_GITHUB_ID: "a5d3c261b032765a78de"
|
||||||
|
OSS_GITHUB_SECRET: $(oss-github-client-secret)
|
||||||
|
INSIDERS_GITHUB_ID: "31f02627809389d9f111"
|
||||||
|
INSIDERS_GITHUB_SECRET: $(insiders-github-client-secret)
|
||||||
|
STABLE_GITHUB_ID: "baa8a44b5e861d918709"
|
||||||
|
STABLE_GITHUB_SECRET: $(stable-github-client-secret)
|
||||||
|
EXPLORATION_GITHUB_ID: "94e8376d3a90429aeaea"
|
||||||
|
EXPLORATION_GITHUB_SECRET: $(exploration-github-client-secret)
|
||||||
|
VSO_GITHUB_ID: "3d4be8f37a0325b5817d"
|
||||||
|
VSO_GITHUB_SECRET: $(vso-github-client-secret)
|
||||||
|
VSO_PPE_GITHUB_ID: "eabf35024dc2e891a492"
|
||||||
|
VSO_PPE_GITHUB_SECRET: $(vso-ppe-github-client-secret)
|
||||||
|
VSO_DEV_GITHUB_ID: "84383ebd8a7c5f5efc5c"
|
||||||
|
VSO_DEV_GITHUB_SECRET: $(vso-dev-github-client-secret)
|
||||||
|
GITHUB_APP_ID: "Iv1.ae51e546bef24ff1"
|
||||||
|
GITHUB_APP_SECRET: $(github-app-client-secret)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn postinstall
|
yarn postinstall
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ pr: none
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -36,18 +36,6 @@ function updateDTSFile(outPath: string, tag: string) {
|
|||||||
fs.writeFileSync(outPath, newContent);
|
fs.writeFileSync(outPath, newContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
function repeat(str: string, times: number): string {
|
|
||||||
const result = new Array(times);
|
|
||||||
for (let i = 0; i < times; i++) {
|
|
||||||
result[i] = str;
|
|
||||||
}
|
|
||||||
return result.join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertTabsToSpaces(str: string): string {
|
|
||||||
return str.replace(/\t/gm, value => repeat(' ', value.length));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNewFileContent(content: string, tag: string) {
|
function getNewFileContent(content: string, tag: string) {
|
||||||
const oldheader = [
|
const oldheader = [
|
||||||
`/*---------------------------------------------------------------------------------------------`,
|
`/*---------------------------------------------------------------------------------------------`,
|
||||||
@@ -56,7 +44,7 @@ function getNewFileContent(content: string, tag: string) {
|
|||||||
` *--------------------------------------------------------------------------------------------*/`
|
` *--------------------------------------------------------------------------------------------*/`
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
return convertTabsToSpaces(getNewFileHeader(tag) + content.slice(oldheader.length));
|
return getNewFileHeader(tag) + content.slice(oldheader.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNewFileHeader(tag: string) {
|
function getNewFileHeader(tag: string) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: linux-x64
|
- container: linux-x64
|
||||||
image: sqltoolscontainers.azurecr.io/linux-build-agent:2
|
image: sqltoolscontainers.azurecr.io/linux-build-agent:1
|
||||||
endpoint: ContainerRegistry
|
endpoint: ContainerRegistry
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- template: sql-product-compile.yml
|
- template: sql-product-compile.yml
|
||||||
|
|
||||||
- job: macOS
|
- job: macOS
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_MACOS'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: macOS-latest
|
vmImage: macOS-latest
|
||||||
dependsOn:
|
dependsOn:
|
||||||
@@ -26,18 +26,8 @@ jobs:
|
|||||||
- template: darwin/sql-product-build-darwin.yml
|
- template: darwin/sql-product-build-darwin.yml
|
||||||
timeoutInMinutes: 180
|
timeoutInMinutes: 180
|
||||||
|
|
||||||
- job: macOS_Signing
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'), eq(variables['signed'], true))
|
|
||||||
pool:
|
|
||||||
vmImage: macOS-latest
|
|
||||||
dependsOn:
|
|
||||||
- macOS
|
|
||||||
steps:
|
|
||||||
- template: darwin/sql-product-build-darwin-signing.yml
|
|
||||||
timeoutInMinutes: 60
|
|
||||||
|
|
||||||
- job: Linux
|
- job: Linux
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_LINUX'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: 'Ubuntu-16.04'
|
||||||
container: linux-x64
|
container: linux-x64
|
||||||
@@ -45,22 +35,8 @@ jobs:
|
|||||||
- Compile
|
- Compile
|
||||||
steps:
|
steps:
|
||||||
- template: linux/sql-product-build-linux.yml
|
- template: linux/sql-product-build-linux.yml
|
||||||
parameters:
|
|
||||||
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azdata", "azurecore", "cms", "dacpac", "import", "schema-compare", "notebook", "resource-deployment", "machine-learning", "sql-database-projects", "data-workspace"]
|
|
||||||
timeoutInMinutes: 70
|
timeoutInMinutes: 70
|
||||||
|
|
||||||
- job: LinuxWeb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: linux-x64
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: web/sql-product-build-web.yml
|
|
||||||
|
|
||||||
- job: Docker
|
- job: Docker
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_DOCKER'], 'true'))
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_DOCKER'], 'true'))
|
||||||
pool:
|
pool:
|
||||||
@@ -72,7 +48,7 @@ jobs:
|
|||||||
- template: docker/sql-product-build-docker.yml
|
- template: docker/sql-product-build-docker.yml
|
||||||
|
|
||||||
- job: Windows
|
- job: Windows
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_WIN32'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: VS2017-Win2016
|
vmImage: VS2017-Win2016
|
||||||
dependsOn:
|
dependsOn:
|
||||||
@@ -101,10 +77,15 @@ jobs:
|
|||||||
- Docker
|
- Docker
|
||||||
- Windows
|
- Windows
|
||||||
- Windows_Test
|
- Windows_Test
|
||||||
- LinuxWeb
|
|
||||||
- macOS_Signing
|
|
||||||
steps:
|
steps:
|
||||||
- template: sql-release.yml
|
- template: sql-release.yml
|
||||||
|
|
||||||
trigger: none
|
trigger: none
|
||||||
pr: none
|
pr: none
|
||||||
|
|
||||||
|
schedules:
|
||||||
|
- cron: "0 5 * * Mon-Fri"
|
||||||
|
displayName: Mon-Fri at 7:00
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
@@ -101,14 +101,6 @@ steps:
|
|||||||
displayName: Compile
|
displayName: Compile
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_STORAGE_ACCOUNT="$(sourcemap-storage-account)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(sourcemap-storage-key)" \
|
|
||||||
node build/azure-pipelines/upload-sourcemaps
|
|
||||||
displayName: Upload sourcemaps
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,108 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
SecretsFilter: 'github-distro-mixin-password'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine github.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(github-distro-mixin-password)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
# inputs:
|
|
||||||
# keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
# vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
# condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
# inputs:
|
|
||||||
# keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
# vstsFeed: 'npm-vscode'
|
|
||||||
# condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# - script: |
|
|
||||||
# set -e
|
|
||||||
# yarn postinstall
|
|
||||||
# displayName: Run postinstall scripts
|
|
||||||
# condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-web-min-ci
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
# upload only the workbench.web.api.js source maps because
|
|
||||||
# we just compiled these bits in the previous step and the
|
|
||||||
# general task to upload source maps has already been run
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_STORAGE_ACCOUNT="$(sourcemap-storage-account)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(sourcemap-storage-key)" \
|
|
||||||
node build/azure-pipelines/upload-sourcemaps out-vscode-web-min out-vscode-web-min/vs/workbench/workbench.web.api.js.map
|
|
||||||
displayName: Upload sourcemaps (Web)
|
|
||||||
|
|
||||||
# - script: |
|
|
||||||
# set -e
|
|
||||||
# AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
# AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
# VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
# ./build/azure-pipelines/web/publish.sh
|
|
||||||
# displayName: Publish
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
||||||
inputs:
|
inputs:
|
||||||
@@ -36,7 +36,15 @@ steps:
|
|||||||
yarn electron
|
yarn electron
|
||||||
displayName: Download Electron
|
displayName: Download Electron
|
||||||
|
|
||||||
# - powershell: | {{SQL CARBON EDIT}} remove editor check
|
- script: |
|
||||||
|
yarn gulp hygiene
|
||||||
|
displayName: Run Hygiene Checks
|
||||||
|
|
||||||
|
- script: | # {{SQL CARBON EDIT}} add step
|
||||||
|
yarn strict-vscode
|
||||||
|
displayName: Run Strict Null Check
|
||||||
|
|
||||||
|
# - powershell: | {{SQL CARBON EDIT}} remove step
|
||||||
# yarn monaco-compile-check
|
# yarn monaco-compile-check
|
||||||
# displayName: Run Monaco Editor Checks
|
# displayName: Run Monaco Editor Checks
|
||||||
|
|
||||||
@@ -57,20 +65,19 @@ steps:
|
|||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
# - powershell: | {{SQL CARBON EDIT}} disable
|
# - powershell: | {{SQL CARBON EDIT}} disable
|
||||||
# yarn test-browser --browser chromium --browser firefox --tfs "Browser Unit Tests"
|
# yarn test-browser --browser chromium --browser firefox
|
||||||
# displayName: Run Unit Tests (Browser)
|
# displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
# - powershell: | {{SQL CARBON EDIT}} disable
|
# - powershell: | {{SQL CARBON EDIT}} disable
|
||||||
# .\scripts\test-integration.bat --tfs "Integration Tests"
|
# .\scripts\test-integration.bat --tfs "Integration Tests"
|
||||||
# displayName: Run Integration Tests (Electron)
|
# displayName: Run Integration Tests (Electron)
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
# - task: PublishPipelineArtifact@0
|
||||||
displayName: 'Publish Crash Reports'
|
# displayName: 'Publish Crash Reports'
|
||||||
inputs:
|
# inputs:
|
||||||
artifactName: crash-dump-windows
|
# artifactName: crash-dump-windows
|
||||||
targetPath: .build\crashes
|
# targetPath: .build\crashes
|
||||||
continueOnError: true
|
# condition: succeededOrFailed()
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
|
|||||||
@@ -1,190 +0,0 @@
|
|||||||
steps:
|
|
||||||
- powershell: |
|
|
||||||
mkdir .build -ea 0
|
|
||||||
"$env:BUILD_SOURCEVERSION" | Out-File -Encoding ascii -NoNewLine .build\commit
|
|
||||||
"$env:VSCODE_QUALITY" | Out-File -Encoding ascii -NoNewLine .build\quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.14.1"
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: '2.x'
|
|
||||||
addToPath: true
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
"machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
|
||||||
|
|
||||||
exec { git config user.email "vscode@microsoft.com" }
|
|
||||||
exec { git config user.name "VSCode" }
|
|
||||||
|
|
||||||
mkdir .build -ea 0
|
|
||||||
"$(VSCODE_ARCH)" | Out-File -Encoding ascii -NoNewLine .build\arch
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" }
|
|
||||||
exec { git fetch distro }
|
|
||||||
exec { git merge $(node -p "require('./package.json').distro") }
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:npm_config_arch="$(VSCODE_ARCH)"
|
|
||||||
$env:CHILD_CONCURRENCY="1"
|
|
||||||
exec { yarn --frozen-lockfile }
|
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn postinstall }
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { node build/azure-pipelines/mixin }
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-code-helper" }
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-inno-updater" }
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'ESRP CodeSign'
|
|
||||||
FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)'
|
|
||||||
Pattern: '*.dll,*.exe,*.node'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolSign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "OpusName",
|
|
||||||
"parameterValue": "VS Code"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "OpusInfo",
|
|
||||||
"parameterValue": "https://code.visualstudio.com/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "Append",
|
|
||||||
"parameterValue": "/as"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "FileDigest",
|
|
||||||
"parameterValue": "/fd \"SHA256\""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "PageHash",
|
|
||||||
"parameterValue": "/NPH"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "TimeStamp",
|
|
||||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolVerify",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "VerifyAll",
|
|
||||||
"parameterValue": "/all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 120
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Install ESRPClient.exe
|
|
||||||
inputs:
|
|
||||||
restoreSolution: 'build\azure-pipelines\win32\ESRPClient\packages.config'
|
|
||||||
feedsToUse: config
|
|
||||||
nugetConfigPath: 'build\azure-pipelines\win32\ESRPClient\NuGet.config'
|
|
||||||
externalFeedCredentials: 3fc0b7f7-da09-4ae7-a9c8-d69824b1819b
|
|
||||||
restoreDirectory: packages
|
|
||||||
|
|
||||||
- task: ESRPImportCertTask@1
|
|
||||||
displayName: Import ESRP Request Signing Certificate
|
|
||||||
inputs:
|
|
||||||
ESRP: 'ESRP CodeSign'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
.\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(esrp-auth-certificate) -AuthCertificateKey $(esrp-auth-certificate-key)
|
|
||||||
displayName: Import ESRP Auth Certificate
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
|
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
|
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
|
||||||
.\build\azure-pipelines\win32\publish.ps1
|
|
||||||
displayName: Publish
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
continueOnError: true
|
|
||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.13.0"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
@@ -115,7 +115,7 @@ steps:
|
|||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { yarn test-browser --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
|
exec { yarn test-browser --build --browser chromium --browser firefox }
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
@@ -132,13 +132,6 @@ steps:
|
|||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox }
|
|
||||||
displayName: Run integration tests (Browser)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
@@ -149,19 +142,18 @@ steps:
|
|||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- powershell: |
|
||||||
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox }
|
||||||
|
displayName: Run integration tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: crash-dump-windows-$(VSCODE_ARCH)
|
artifactName: crash-dump-windows-$(VSCODE_ARCH)
|
||||||
targetPath: .build\crashes
|
targetPath: .build\crashes
|
||||||
displayName: 'Publish Crash Reports'
|
displayName: 'Publish Crash Reports'
|
||||||
continueOnError: true
|
|
||||||
condition: failed()
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: Publish Tests Results
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '*-results.xml'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
@@ -225,7 +217,7 @@ steps:
|
|||||||
restoreSolution: 'build\azure-pipelines\win32\ESRPClient\packages.config'
|
restoreSolution: 'build\azure-pipelines\win32\ESRPClient\packages.config'
|
||||||
feedsToUse: config
|
feedsToUse: config
|
||||||
nugetConfigPath: 'build\azure-pipelines\win32\ESRPClient\NuGet.config'
|
nugetConfigPath: 'build\azure-pipelines\win32\ESRPClient\NuGet.config'
|
||||||
externalFeedCredentials: 'ESRP Nuget'
|
externalFeedCredentials: 3fc0b7f7-da09-4ae7-a9c8-d69824b1819b
|
||||||
restoreDirectory: packages
|
restoreDirectory: packages
|
||||||
|
|
||||||
- task: ESRPImportCertTask@1
|
- task: ESRPImportCertTask@1
|
||||||
@@ -243,6 +235,7 @@ steps:
|
|||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
|
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
|
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
|
||||||
|
$env:VSCODE_HOCKEYAPP_TOKEN = "$(vscode-hockeyapp-token)"
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
||||||
.\build\azure-pipelines\win32\publish.ps1
|
.\build\azure-pipelines\win32\publish.ps1
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|||||||
@@ -16,21 +16,22 @@ $ServerZip = "$Repo\.build\vscode-server-win32-$Arch.zip"
|
|||||||
$Build = "$Root\VSCode-win32-$Arch"
|
$Build = "$Root\VSCode-win32-$Arch"
|
||||||
|
|
||||||
# Create server archive
|
# Create server archive
|
||||||
if ("$Arch" -ne "arm64") {
|
exec { xcopy $LegacyServer $Server /H /E /I }
|
||||||
exec { xcopy $LegacyServer $Server /H /E /I }
|
exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r }
|
||||||
exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r }
|
|
||||||
}
|
|
||||||
|
|
||||||
# get version
|
# get version
|
||||||
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
||||||
$Version = $PackageJson.version
|
$Version = $PackageJson.version
|
||||||
|
|
||||||
$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-$Arch" }
|
$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" }
|
||||||
|
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Zip }
|
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Zip }
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $SystemExe }
|
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $SystemExe }
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $UserExe }
|
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $UserExe }
|
||||||
|
exec { node build/azure-pipelines/common/createAsset.js "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $ServerZip }
|
||||||
|
|
||||||
if ("$Arch" -ne "arm64") {
|
# Skip hockey app because build failure.
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $ServerZip }
|
# https://github.com/microsoft/vscode/issues/90491
|
||||||
}
|
# publish hockeyapp symbols
|
||||||
|
# $hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" }
|
||||||
|
# exec { node build/azure-pipelines/common/symbols.js "$env:VSCODE_MIXIN_PASSWORD" "$env:VSCODE_HOCKEYAPP_TOKEN" "$Arch" $hockeyAppId }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ steps:
|
|||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
@@ -103,38 +103,6 @@ steps:
|
|||||||
env:
|
env:
|
||||||
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
||||||
|
|
||||||
- task: UniversalPackages@0
|
|
||||||
displayName: Download SAW Python package
|
|
||||||
inputs:
|
|
||||||
command: 'download'
|
|
||||||
downloadDirectory: '$(agent.builddirectory)\azuredatastudio-win32-x64\resources\app\ads-python'
|
|
||||||
feedsToUse: 'internal'
|
|
||||||
vstsFeed: '2191dd5f-4aec-491b-ac50-568bbc331c8a'
|
|
||||||
vstsFeedPackage: '2e355f03-a97e-499a-949b-f02d62b6160c'
|
|
||||||
vstsPackageVersion: '*'
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_QUALITY'], 'saw'))
|
|
||||||
|
|
||||||
# - powershell: | @anthonydresser unit tests timeout never existing the node process
|
|
||||||
# . build/azure-pipelines/win32/exec.ps1
|
|
||||||
# $ErrorActionPreference = "Stop"
|
|
||||||
# exec { yarn electron x64 }
|
|
||||||
# exec { .\scripts\test.bat --build --coverage --reporter mocha-junit-reporter --tfs "Unit Tests" }
|
|
||||||
# displayName: Run unit tests (Electron)
|
|
||||||
# condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$AppRoot = "$(agent.builddirectory)\azuredatastudio-win32-x64"
|
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\azuredatastudio-reh-win32-x64"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
|
||||||
displayName: Run integration tests (Electron)
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ const path = require('path');
|
|||||||
let window = null;
|
let window = null;
|
||||||
|
|
||||||
app.once('ready', () => {
|
app.once('ready', () => {
|
||||||
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false, nativeWindowOpen: true } });
|
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true } });
|
||||||
window.setMenuBarVisibility(false);
|
window.setMenuBarVisibility(false);
|
||||||
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
|
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
|
||||||
// window.webContents.openDevTools();
|
// window.webContents.openDevTools();
|
||||||
window.once('closed', () => window = null);
|
window.once('closed', () => window = null);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on('window-all-closed', () => app.quit());
|
app.on('window-all-closed', () => app.quit());
|
||||||
@@ -1,61 +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';
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const codesign = require("electron-osx-sign");
|
|
||||||
const path = require("path");
|
|
||||||
const util = require("../lib/util");
|
|
||||||
const product = require("../../product.json");
|
|
||||||
async function main() {
|
|
||||||
const buildDir = process.env['AGENT_BUILDDIRECTORY'];
|
|
||||||
const tempDir = process.env['AGENT_TEMPDIRECTORY'];
|
|
||||||
if (!buildDir) {
|
|
||||||
throw new Error('$AGENT_BUILDDIRECTORY not set');
|
|
||||||
}
|
|
||||||
if (!tempDir) {
|
|
||||||
throw new Error('$AGENT_TEMPDIRECTORY not set');
|
|
||||||
}
|
|
||||||
const baseDir = path.dirname(__dirname);
|
|
||||||
const appRoot = path.join(buildDir, 'VSCode-darwin');
|
|
||||||
const appName = product.nameLong + '.app';
|
|
||||||
const appFrameworkPath = path.join(appRoot, appName, 'Contents', 'Frameworks');
|
|
||||||
const helperAppBaseName = product.nameShort;
|
|
||||||
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
|
|
||||||
const pluginHelperAppName = helperAppBaseName + ' Helper (Plugin).app';
|
|
||||||
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
|
|
||||||
const defaultOpts = {
|
|
||||||
app: path.join(appRoot, appName),
|
|
||||||
platform: 'darwin',
|
|
||||||
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'app-entitlements.plist'),
|
|
||||||
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'app-entitlements.plist'),
|
|
||||||
hardenedRuntime: true,
|
|
||||||
'pre-auto-entitlements': false,
|
|
||||||
'pre-embed-provisioning-profile': false,
|
|
||||||
keychain: path.join(tempDir, 'buildagent.keychain'),
|
|
||||||
version: util.getElectronVersion(),
|
|
||||||
identity: '99FM488X57',
|
|
||||||
'gatekeeper-assess': false
|
|
||||||
};
|
|
||||||
const appOpts = Object.assign(Object.assign({}, defaultOpts), {
|
|
||||||
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
|
|
||||||
ignore: (filePath) => {
|
|
||||||
return filePath.includes(gpuHelperAppName) ||
|
|
||||||
filePath.includes(pluginHelperAppName) ||
|
|
||||||
filePath.includes(rendererHelperAppName);
|
|
||||||
} });
|
|
||||||
const gpuHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, gpuHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist') });
|
|
||||||
const pluginHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, pluginHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist') });
|
|
||||||
const rendererHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, rendererHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist') });
|
|
||||||
await codesign.signAsync(gpuHelperOpts);
|
|
||||||
await codesign.signAsync(pluginHelperOpts);
|
|
||||||
await codesign.signAsync(rendererHelperOpts);
|
|
||||||
await codesign.signAsync(appOpts);
|
|
||||||
}
|
|
||||||
if (require.main === module) {
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,90 +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 codesign from 'electron-osx-sign';
|
|
||||||
import * as path from 'path';
|
|
||||||
import * as util from '../lib/util';
|
|
||||||
import * as product from '../../product.json';
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
|
||||||
const buildDir = process.env['AGENT_BUILDDIRECTORY'];
|
|
||||||
const tempDir = process.env['AGENT_TEMPDIRECTORY'];
|
|
||||||
|
|
||||||
if (!buildDir) {
|
|
||||||
throw new Error('$AGENT_BUILDDIRECTORY not set');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!tempDir) {
|
|
||||||
throw new Error('$AGENT_TEMPDIRECTORY not set');
|
|
||||||
}
|
|
||||||
|
|
||||||
const baseDir = path.dirname(__dirname);
|
|
||||||
const appRoot = path.join(buildDir, 'VSCode-darwin');
|
|
||||||
const appName = product.nameLong + '.app';
|
|
||||||
const appFrameworkPath = path.join(appRoot, appName, 'Contents', 'Frameworks');
|
|
||||||
const helperAppBaseName = product.nameShort;
|
|
||||||
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
|
|
||||||
const pluginHelperAppName = helperAppBaseName + ' Helper (Plugin).app';
|
|
||||||
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
|
|
||||||
|
|
||||||
const defaultOpts: codesign.SignOptions = {
|
|
||||||
app: path.join(appRoot, appName),
|
|
||||||
platform: 'darwin',
|
|
||||||
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'app-entitlements.plist'),
|
|
||||||
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'app-entitlements.plist'),
|
|
||||||
hardenedRuntime: true,
|
|
||||||
'pre-auto-entitlements': false,
|
|
||||||
'pre-embed-provisioning-profile': false,
|
|
||||||
keychain: path.join(tempDir, 'buildagent.keychain'),
|
|
||||||
version: util.getElectronVersion(),
|
|
||||||
identity: '99FM488X57',
|
|
||||||
'gatekeeper-assess': false
|
|
||||||
};
|
|
||||||
|
|
||||||
const appOpts = {
|
|
||||||
...defaultOpts,
|
|
||||||
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
|
|
||||||
ignore: (filePath: string) => {
|
|
||||||
return filePath.includes(gpuHelperAppName) ||
|
|
||||||
filePath.includes(pluginHelperAppName) ||
|
|
||||||
filePath.includes(rendererHelperAppName);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const gpuHelperOpts: codesign.SignOptions = {
|
|
||||||
...defaultOpts,
|
|
||||||
app: path.join(appFrameworkPath, gpuHelperAppName),
|
|
||||||
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist'),
|
|
||||||
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist'),
|
|
||||||
};
|
|
||||||
|
|
||||||
const pluginHelperOpts: codesign.SignOptions = {
|
|
||||||
...defaultOpts,
|
|
||||||
app: path.join(appFrameworkPath, pluginHelperAppName),
|
|
||||||
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
|
|
||||||
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-plugin-entitlements.plist'),
|
|
||||||
};
|
|
||||||
|
|
||||||
const rendererHelperOpts: codesign.SignOptions = {
|
|
||||||
...defaultOpts,
|
|
||||||
app: path.join(appFrameworkPath, rendererHelperAppName),
|
|
||||||
entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
|
|
||||||
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
|
|
||||||
};
|
|
||||||
|
|
||||||
await codesign.signAsync(gpuHelperOpts);
|
|
||||||
await codesign.signAsync(pluginHelperOpts);
|
|
||||||
await codesign.signAsync(rendererHelperOpts);
|
|
||||||
await codesign.signAsync(appOpts as any);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (require.main === module) {
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -127,7 +127,6 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
|
|||||||
|
|
||||||
const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
||||||
const KEEP_PREV_ANALYSIS = false;
|
const KEEP_PREV_ANALYSIS = false;
|
||||||
const FAIL_ON_PURPOSE = false;
|
|
||||||
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
|
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
|
||||||
let result;
|
let result;
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
@@ -143,7 +142,7 @@ const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
|||||||
console.log(result.stdout.toString());
|
console.log(result.stdout.toString());
|
||||||
console.log(result.stderr.toString());
|
console.log(result.stderr.toString());
|
||||||
|
|
||||||
if (FAIL_ON_PURPOSE || result.status !== 0) {
|
if (result.status !== 0) {
|
||||||
console.log(`The TS Compilation failed, preparing analysis folder...`);
|
console.log(`The TS Compilation failed, preparing analysis folder...`);
|
||||||
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
|
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
|
||||||
const keepPrevAnalysis = (KEEP_PREV_ANALYSIS && fs.existsSync(destPath));
|
const keepPrevAnalysis = (KEEP_PREV_ANALYSIS && fs.existsSync(destPath));
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ require('events').EventEmitter.defaultMaxListeners = 100;
|
|||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const nodeUtil = require('util');
|
|
||||||
const tsb = require('gulp-tsb');
|
const tsb = require('gulp-tsb');
|
||||||
const es = require('event-stream');
|
const es = require('event-stream');
|
||||||
const filter = require('gulp-filter');
|
const filter = require('gulp-filter');
|
||||||
const webpack = require('webpack');
|
|
||||||
const util = require('./lib/util');
|
const util = require('./lib/util');
|
||||||
const task = require('./lib/task');
|
const task = require('./lib/task');
|
||||||
const watcher = require('./lib/watch');
|
const watcher = require('./lib/watch');
|
||||||
@@ -23,8 +21,6 @@ const nlsDev = require('vscode-nls-dev');
|
|||||||
const root = path.dirname(__dirname);
|
const root = path.dirname(__dirname);
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
const plumber = require('gulp-plumber');
|
const plumber = require('gulp-plumber');
|
||||||
const fancyLog = require('fancy-log');
|
|
||||||
const ansiColors = require('ansi-colors');
|
|
||||||
const ext = require('./lib/extensions');
|
const ext = require('./lib/extensions');
|
||||||
|
|
||||||
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
||||||
@@ -40,7 +36,7 @@ const compilations = glob.sync('**/tsconfig.json', {
|
|||||||
ignore: ['**/out/**', '**/node_modules/**']
|
ignore: ['**/out/**', '**/node_modules/**']
|
||||||
});
|
});
|
||||||
|
|
||||||
const getBaseUrl = out => `https://sqlopsbuilds.blob.core.windows.net/sourcemaps/${commit}/${out}`;
|
const getBaseUrl = out => `https://ticino.blob.core.windows.net/sourcemaps/${commit}/${out}`;
|
||||||
|
|
||||||
const tasks = compilations.map(function (tsconfigFile) {
|
const tasks = compilations.map(function (tsconfigFile) {
|
||||||
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
||||||
@@ -171,84 +167,9 @@ gulp.task(compileExtensionsBuildLegacyTask);
|
|||||||
const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions'));
|
const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions'));
|
||||||
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
|
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
|
||||||
cleanExtensionsBuildTask,
|
cleanExtensionsBuildTask,
|
||||||
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream(false).pipe(gulp.dest('.build'))),
|
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream().pipe(gulp.dest('.build'))),
|
||||||
task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false).pipe(gulp.dest('.build'))),
|
task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream().pipe(gulp.dest('.build')))
|
||||||
));
|
));
|
||||||
|
|
||||||
gulp.task(compileExtensionsBuildTask);
|
gulp.task(compileExtensionsBuildTask);
|
||||||
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
||||||
|
|
||||||
const compileWebExtensionsTask = task.define('compile-web', () => buildWebExtensions(false));
|
|
||||||
gulp.task(compileWebExtensionsTask);
|
|
||||||
exports.compileWebExtensionsTask = compileWebExtensionsTask;
|
|
||||||
|
|
||||||
const watchWebExtensionsTask = task.define('watch-web', () => buildWebExtensions(true));
|
|
||||||
gulp.task(watchWebExtensionsTask);
|
|
||||||
exports.watchWebExtensionsTask = watchWebExtensionsTask;
|
|
||||||
|
|
||||||
async function buildWebExtensions(isWatch) {
|
|
||||||
|
|
||||||
const webpackConfigLocations = await nodeUtil.promisify(glob)(
|
|
||||||
path.join(extensionsPath, '**', 'extension-browser.webpack.config.js'),
|
|
||||||
{ ignore: ['**/node_modules'] }
|
|
||||||
);
|
|
||||||
|
|
||||||
const webpackConfigs = [];
|
|
||||||
|
|
||||||
for (const webpackConfigPath of webpackConfigLocations) {
|
|
||||||
const configOrFnOrArray = require(webpackConfigPath);
|
|
||||||
function addConfig(configOrFn) {
|
|
||||||
if (typeof configOrFn === 'function') {
|
|
||||||
webpackConfigs.push(configOrFn({}, {}));
|
|
||||||
} else {
|
|
||||||
webpackConfigs.push(configOrFn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
addConfig(configOrFnOrArray);
|
|
||||||
}
|
|
||||||
function reporter(fullStats) {
|
|
||||||
if (Array.isArray(fullStats.children)) {
|
|
||||||
for (const stats of fullStats.children) {
|
|
||||||
const outputPath = stats.outputPath;
|
|
||||||
if (outputPath) {
|
|
||||||
const relativePath = path.relative(extensionsPath, outputPath).replace(/\\/g, '/');
|
|
||||||
const match = relativePath.match(/[^\/]+(\/server|\/client)?/);
|
|
||||||
fancyLog(`Finished ${ansiColors.green('packaging web extension')} ${ansiColors.cyan(match[0])} with ${stats.errors.length} errors.`);
|
|
||||||
}
|
|
||||||
if (Array.isArray(stats.errors)) {
|
|
||||||
stats.errors.forEach(error => {
|
|
||||||
fancyLog.error(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (Array.isArray(stats.warnings)) {
|
|
||||||
stats.warnings.forEach(warning => {
|
|
||||||
fancyLog.warn(warning);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
if (isWatch) {
|
|
||||||
webpack(webpackConfigs).watch({}, (err, stats) => {
|
|
||||||
if (err) {
|
|
||||||
reject();
|
|
||||||
} else {
|
|
||||||
reporter(stats.toJson());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
webpack(webpackConfigs).run((err, stats) => {
|
|
||||||
if (err) {
|
|
||||||
fancyLog.error(err);
|
|
||||||
reject();
|
|
||||||
} else {
|
|
||||||
reporter(stats.toJson());
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ const indentationFilter = [
|
|||||||
'**',
|
'**',
|
||||||
|
|
||||||
// except specific files
|
// except specific files
|
||||||
'!**/ThirdPartyNotices.txt',
|
'!ThirdPartyNotices.txt',
|
||||||
'!**/LICENSE.{txt,rtf}',
|
'!LICENSE.{txt,rtf}',
|
||||||
'!LICENSES.chromium.html',
|
'!LICENSES.chromium.html',
|
||||||
'!**/LICENSE',
|
'!**/LICENSE',
|
||||||
'!src/vs/nls.js',
|
'!src/vs/nls.js',
|
||||||
@@ -60,7 +60,6 @@ const indentationFilter = [
|
|||||||
// except specific folders
|
// except specific folders
|
||||||
'!test/automation/out/**',
|
'!test/automation/out/**',
|
||||||
'!test/smoke/out/**',
|
'!test/smoke/out/**',
|
||||||
'!extensions/typescript-language-features/test-workspace/**',
|
|
||||||
'!extensions/vscode-api-tests/testWorkspace/**',
|
'!extensions/vscode-api-tests/testWorkspace/**',
|
||||||
'!extensions/vscode-api-tests/testWorkspace2/**',
|
'!extensions/vscode-api-tests/testWorkspace2/**',
|
||||||
'!build/monaco/**',
|
'!build/monaco/**',
|
||||||
@@ -86,7 +85,7 @@ const indentationFilter = [
|
|||||||
'!src/typings/**/*.d.ts',
|
'!src/typings/**/*.d.ts',
|
||||||
'!extensions/**/*.d.ts',
|
'!extensions/**/*.d.ts',
|
||||||
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns,plist}',
|
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns,plist}',
|
||||||
'!build/{lib,download,darwin}/**/*.js',
|
'!build/{lib,download}/**/*.js',
|
||||||
'!build/**/*.sh',
|
'!build/**/*.sh',
|
||||||
'!build/azure-pipelines/**/*.js',
|
'!build/azure-pipelines/**/*.js',
|
||||||
'!build/azure-pipelines/**/*.config',
|
'!build/azure-pipelines/**/*.config',
|
||||||
@@ -96,7 +95,6 @@ const indentationFilter = [
|
|||||||
'!**/*.dockerfile',
|
'!**/*.dockerfile',
|
||||||
'!extensions/markdown-language-features/media/*.js',
|
'!extensions/markdown-language-features/media/*.js',
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
'!**/*.gif',
|
|
||||||
'!build/actions/**/*.js',
|
'!build/actions/**/*.js',
|
||||||
'!**/*.{xlf,docx,sql,vsix,bacpac,ipynb,jpg}',
|
'!**/*.{xlf,docx,sql,vsix,bacpac,ipynb,jpg}',
|
||||||
'!extensions/mssql/sqltoolsservice/**',
|
'!extensions/mssql/sqltoolsservice/**',
|
||||||
@@ -105,12 +103,9 @@ const indentationFilter = [
|
|||||||
'!extensions/resource-deployment/notebooks/**',
|
'!extensions/resource-deployment/notebooks/**',
|
||||||
'!extensions/mssql/notebooks/**',
|
'!extensions/mssql/notebooks/**',
|
||||||
'!extensions/integration-tests/testData/**',
|
'!extensions/integration-tests/testData/**',
|
||||||
'!extensions/arc/src/controller/generated/**',
|
|
||||||
'!extensions/sql-database-projects/resources/templates/*.xml',
|
'!extensions/sql-database-projects/resources/templates/*.xml',
|
||||||
'!extensions/sql-database-projects/src/test/baselines/*.xml',
|
'!extensions/sql-database-projects/src/test/baselines/*.xml',
|
||||||
'!extensions/sql-database-projects/src/test/baselines/*.json',
|
'!extensions/sql-database-projects/src/test/baselines/*.json',
|
||||||
'!extensions/sql-database-projects/src/test/baselines/*.sqlproj',
|
|
||||||
'!extensions/sql-database-projects/BuildDirectory/SystemDacpacs/**',
|
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts',
|
'!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts',
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/clusterApiGenerated2.ts',
|
'!extensions/big-data-cluster/src/bigDataCluster/controller/clusterApiGenerated2.ts',
|
||||||
'!resources/linux/snap/electron-launch'
|
'!resources/linux/snap/electron-launch'
|
||||||
@@ -139,15 +134,12 @@ const copyrightFilter = [
|
|||||||
'!resources/linux/snap/snapcraft.yaml',
|
'!resources/linux/snap/snapcraft.yaml',
|
||||||
'!resources/linux/snap/electron-launch',
|
'!resources/linux/snap/electron-launch',
|
||||||
'!resources/win32/bin/code.js',
|
'!resources/win32/bin/code.js',
|
||||||
'!resources/web/code-web.js',
|
|
||||||
'!resources/completions/**',
|
'!resources/completions/**',
|
||||||
'!extensions/markdown-language-features/media/highlight.css',
|
'!extensions/markdown-language-features/media/highlight.css',
|
||||||
'!extensions/html-language-features/server/src/modes/typescript/*',
|
'!extensions/html-language-features/server/src/modes/typescript/*',
|
||||||
'!extensions/*/server/bin/*',
|
'!extensions/*/server/bin/*',
|
||||||
'!src/vs/editor/test/node/classification/typescript-test.ts',
|
'!src/vs/editor/test/node/classification/typescript-test.ts',
|
||||||
'!scripts/code-web.js',
|
'!scripts/code-web.js',
|
||||||
'!resources/serverless/code-web.js',
|
|
||||||
'!src/vs/editor/test/node/classification/typescript-test.ts',
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
'!extensions/notebook/src/intellisense/text.ts',
|
'!extensions/notebook/src/intellisense/text.ts',
|
||||||
'!extensions/mssql/src/hdfs/webhdfs.ts',
|
'!extensions/mssql/src/hdfs/webhdfs.ts',
|
||||||
@@ -171,19 +163,16 @@ const copyrightFilter = [
|
|||||||
'!extensions/markdown-language-features/media/tomorrow.css',
|
'!extensions/markdown-language-features/media/tomorrow.css',
|
||||||
'!src/sql/workbench/browser/modelComponents/media/highlight.css',
|
'!src/sql/workbench/browser/modelComponents/media/highlight.css',
|
||||||
'!src/sql/workbench/contrib/notebook/electron-browser/cellViews/media/highlight.css',
|
'!src/sql/workbench/contrib/notebook/electron-browser/cellViews/media/highlight.css',
|
||||||
'!src/sql/workbench/contrib/notebook/browser/turndownPluginGfm.ts',
|
|
||||||
'!extensions/mssql/sqltoolsservice/**',
|
'!extensions/mssql/sqltoolsservice/**',
|
||||||
'!extensions/import/flatfileimportservice/**',
|
'!extensions/import/flatfileimportservice/**',
|
||||||
'!extensions/notebook/src/prompts/**',
|
'!extensions/notebook/src/prompts/**',
|
||||||
'!extensions/mssql/src/prompts/**',
|
'!extensions/mssql/src/prompts/**',
|
||||||
'!extensions/kusto/src/prompts/**',
|
|
||||||
'!extensions/notebook/resources/jupyter_config/**',
|
'!extensions/notebook/resources/jupyter_config/**',
|
||||||
'!extensions/query-history/images/**',
|
'!extensions/query-history/images/**',
|
||||||
'!**/*.gif',
|
'!**/*.gif',
|
||||||
'!**/*.xlf',
|
'!**/*.xlf',
|
||||||
'!**/*.dacpac',
|
'!**/*.dacpac',
|
||||||
'!**/*.bacpac',
|
'!**/*.bacpac'
|
||||||
'!**/*.py'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const jsHygieneFilter = [
|
const jsHygieneFilter = [
|
||||||
|
|||||||
@@ -36,13 +36,28 @@ const { compileBuildTask } = require('./gulpfile.compile');
|
|||||||
const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
|
const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
|
||||||
|
|
||||||
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
||||||
|
const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n));
|
||||||
|
const nodeModules = [ // {{SQL CARBON EDIT}}
|
||||||
|
'electron',
|
||||||
|
'original-fs',
|
||||||
|
'rxjs/Observable',
|
||||||
|
'rxjs/add/observable/fromPromise',
|
||||||
|
'rxjs/Subject',
|
||||||
|
'rxjs/Observer',
|
||||||
|
'slickgrid/lib/jquery.event.drag-2.3.0',
|
||||||
|
'slickgrid/lib/jquery-ui-1.9.2',
|
||||||
|
'slickgrid/slick.core',
|
||||||
|
'slickgrid/slick.grid',
|
||||||
|
'slickgrid/slick.editors',
|
||||||
|
'slickgrid/slick.dataview']
|
||||||
|
.concat(Object.keys(product.dependencies || {}))
|
||||||
|
.concat(_.uniq(productionDependencies.map(d => d.name)))
|
||||||
|
.concat(baseModules);
|
||||||
|
|
||||||
// Build
|
// Build
|
||||||
const vscodeEntryPoints = _.flatten([
|
const vscodeEntryPoints = _.flatten([
|
||||||
buildfile.entrypoint('vs/workbench/workbench.desktop.main'),
|
buildfile.entrypoint('vs/workbench/workbench.desktop.main'),
|
||||||
buildfile.base,
|
buildfile.base,
|
||||||
buildfile.workerExtensionHost,
|
|
||||||
buildfile.workerNotebook,
|
|
||||||
buildfile.workbenchDesktop,
|
buildfile.workbenchDesktop,
|
||||||
buildfile.code
|
buildfile.code
|
||||||
]);
|
]);
|
||||||
@@ -54,30 +69,28 @@ const vscodeResources = [
|
|||||||
'out-build/bootstrap.js',
|
'out-build/bootstrap.js',
|
||||||
'out-build/bootstrap-fork.js',
|
'out-build/bootstrap-fork.js',
|
||||||
'out-build/bootstrap-amd.js',
|
'out-build/bootstrap-amd.js',
|
||||||
'out-build/bootstrap-node.js',
|
|
||||||
'out-build/bootstrap-window.js',
|
'out-build/bootstrap-window.js',
|
||||||
'out-build/paths.js',
|
'out-build/paths.js',
|
||||||
'out-build/vs/**/*.{svg,png,html}',
|
'out-build/vs/**/*.{svg,png,html}',
|
||||||
'!out-build/vs/code/browser/**/*.html',
|
'!out-build/vs/code/browser/**/*.html',
|
||||||
'!out-build/vs/editor/standalone/**/*.svg',
|
|
||||||
'out-build/vs/base/common/performance.js',
|
'out-build/vs/base/common/performance.js',
|
||||||
'out-build/vs/base/node/languagePacks.js',
|
'out-build/vs/base/node/languagePacks.js',
|
||||||
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
|
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
|
||||||
'out-build/vs/base/browser/ui/codicons/codicon/**',
|
'out-build/vs/base/browser/ui/codicons/codicon/**',
|
||||||
'out-build/vs/base/parts/sandbox/electron-browser/preload.js',
|
|
||||||
'out-build/vs/workbench/browser/media/*-theme.css',
|
'out-build/vs/workbench/browser/media/*-theme.css',
|
||||||
'out-build/vs/workbench/contrib/debug/**/*.json',
|
'out-build/vs/workbench/contrib/debug/**/*.json',
|
||||||
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
||||||
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
||||||
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
|
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
|
||||||
'out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js',
|
|
||||||
'out-build/vs/**/markdown.css',
|
'out-build/vs/**/markdown.css',
|
||||||
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
||||||
'out-build/vs/platform/files/**/*.exe',
|
'out-build/vs/platform/files/**/*.exe',
|
||||||
'out-build/vs/platform/files/**/*.md',
|
'out-build/vs/platform/files/**/*.md',
|
||||||
'out-build/vs/code/electron-browser/workbench/**',
|
'out-build/vs/code/electron-browser/workbench/**',
|
||||||
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
|
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
|
||||||
'out-build/vs/code/electron-sandbox/issue/issueReporter.js',
|
'out-build/vs/code/electron-browser/issue/issueReporter.js',
|
||||||
|
'out-build/vs/code/electron-browser/processExplorer/processExplorer.js',
|
||||||
|
'out-build/sql/workbench/electron-browser/splashscreen/*', // {{SQL CARBON EDIT}} STart
|
||||||
'out-build/sql/**/*.{svg,png,cur,html}',
|
'out-build/sql/**/*.{svg,png,cur,html}',
|
||||||
'out-build/sql/base/browser/ui/table/media/*.{gif,png,svg}',
|
'out-build/sql/base/browser/ui/table/media/*.{gif,png,svg}',
|
||||||
'out-build/sql/base/browser/ui/checkbox/media/*.{gif,png,svg}',
|
'out-build/sql/base/browser/ui/checkbox/media/*.{gif,png,svg}',
|
||||||
@@ -96,8 +109,7 @@ const vscodeResources = [
|
|||||||
'out-build/sql/media/icons/*.svg',
|
'out-build/sql/media/icons/*.svg',
|
||||||
'out-build/sql/workbench/parts/notebook/media/**/*.svg',
|
'out-build/sql/workbench/parts/notebook/media/**/*.svg',
|
||||||
'out-build/sql/setup.js', // {{SQL CARBON EDIT}} end
|
'out-build/sql/setup.js', // {{SQL CARBON EDIT}} end
|
||||||
'out-build/vs/code/electron-sandbox/processExplorer/processExplorer.js',
|
'out-build/vs/platform/auth/common/auth.css',
|
||||||
'out-build/vs/code/electron-sandbox/proxy/auth.js',
|
|
||||||
'!**/test/**'
|
'!**/test/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -107,17 +119,23 @@ const optimizeVSCodeTask = task.define('optimize-vscode', task.series(
|
|||||||
src: 'out-build',
|
src: 'out-build',
|
||||||
entryPoints: vscodeEntryPoints,
|
entryPoints: vscodeEntryPoints,
|
||||||
resources: vscodeResources,
|
resources: vscodeResources,
|
||||||
loaderConfig: common.loaderConfig(),
|
loaderConfig: common.loaderConfig(nodeModules),
|
||||||
out: 'out-vscode',
|
out: 'out-vscode',
|
||||||
bundleInfo: undefined
|
bundleInfo: undefined
|
||||||
})
|
})
|
||||||
));
|
));
|
||||||
gulp.task(optimizeVSCodeTask);
|
gulp.task(optimizeVSCodeTask);
|
||||||
|
|
||||||
const sourceMappingURLBase = `https://sqlopsbuilds.blob.core.windows.net/sourcemaps/${commit}`;
|
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
|
||||||
const minifyVSCodeTask = task.define('minify-vscode', task.series(
|
const minifyVSCodeTask = task.define('minify-vscode', task.series(
|
||||||
optimizeVSCodeTask,
|
optimizeVSCodeTask,
|
||||||
util.rimraf('out-vscode-min'),
|
util.rimraf('out-vscode-min'),
|
||||||
|
() => {
|
||||||
|
const fullpath = path.join(process.cwd(), 'out-vscode/bootstrap-window.js');
|
||||||
|
const contents = fs.readFileSync(fullpath).toString();
|
||||||
|
const newContents = contents.replace('[/*BUILD->INSERT_NODE_MODULES*/]', JSON.stringify(nodeModules));
|
||||||
|
fs.writeFileSync(fullpath, newContents);
|
||||||
|
},
|
||||||
common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
|
common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`)
|
||||||
));
|
));
|
||||||
gulp.task(minifyVSCodeTask);
|
gulp.task(minifyVSCodeTask);
|
||||||
@@ -166,7 +184,6 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
|||||||
const out = sourceFolderName;
|
const out = sourceFolderName;
|
||||||
|
|
||||||
const checksums = computeChecksums(out, [
|
const checksums = computeChecksums(out, [
|
||||||
'vs/base/parts/sandbox/electron-browser/preload.js',
|
|
||||||
'vs/workbench/workbench.desktop.main.js',
|
'vs/workbench/workbench.desktop.main.js',
|
||||||
'vs/workbench/workbench.desktop.main.css',
|
'vs/workbench/workbench.desktop.main.css',
|
||||||
'vs/workbench/services/extensions/node/extensionHostProcess.js',
|
'vs/workbench/services/extensions/node/extensionHostProcess.js',
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ function buildWin32Setup(arch, target) {
|
|||||||
return cb => {
|
return cb => {
|
||||||
const ia32AppId = target === 'system' ? product.win32AppId : product.win32UserAppId;
|
const ia32AppId = target === 'system' ? product.win32AppId : product.win32UserAppId;
|
||||||
const x64AppId = target === 'system' ? product.win32x64AppId : product.win32x64UserAppId;
|
const x64AppId = target === 'system' ? product.win32x64AppId : product.win32x64UserAppId;
|
||||||
const arm64AppId = target === 'system' ? product.win32arm64AppId : product.win32arm64UserAppId;
|
|
||||||
|
|
||||||
const sourcePath = buildPath(arch);
|
const sourcePath = buildPath(arch);
|
||||||
const outputPath = setupDir(arch, target);
|
const outputPath = setupDir(arch, target);
|
||||||
@@ -90,12 +89,12 @@ function buildWin32Setup(arch, target) {
|
|||||||
ShellNameShort: product.win32ShellNameShort,
|
ShellNameShort: product.win32ShellNameShort,
|
||||||
AppMutex: product.win32MutexName,
|
AppMutex: product.win32MutexName,
|
||||||
Arch: arch,
|
Arch: arch,
|
||||||
AppId: { 'ia32': ia32AppId, 'x64': x64AppId, 'arm64': arm64AppId }[arch],
|
AppId: arch === 'ia32' ? ia32AppId : x64AppId,
|
||||||
IncompatibleTargetAppId: { 'ia32': product.win32AppId, 'x64': product.win32x64AppId, 'arm64': product.win32arm64AppId }[arch],
|
IncompatibleTargetAppId: arch === 'ia32' ? product.win32AppId : product.win32x64AppId,
|
||||||
IncompatibleArchAppId: { 'ia32': x64AppId, 'x64': ia32AppId, 'arm64': ia32AppId }[arch],
|
IncompatibleArchAppId: arch === 'ia32' ? x64AppId : ia32AppId,
|
||||||
AppUserId: product.win32AppUserModelId,
|
AppUserId: product.win32AppUserModelId,
|
||||||
ArchitecturesAllowed: { 'ia32': '', 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
ArchitecturesAllowed: arch === 'ia32' ? '' : 'x64',
|
||||||
ArchitecturesInstallIn64BitMode: { 'ia32': '', 'x64': 'x64', 'arm64': 'arm64' }[arch],
|
ArchitecturesInstallIn64BitMode: arch === 'ia32' ? '' : 'x64',
|
||||||
SourceDir: sourcePath,
|
SourceDir: sourcePath,
|
||||||
RepoDir: repoPath,
|
RepoDir: repoPath,
|
||||||
OutputDir: outputPath,
|
OutputDir: outputPath,
|
||||||
@@ -114,10 +113,8 @@ function defineWin32SetupTasks(arch, target) {
|
|||||||
|
|
||||||
defineWin32SetupTasks('ia32', 'system');
|
defineWin32SetupTasks('ia32', 'system');
|
||||||
defineWin32SetupTasks('x64', 'system');
|
defineWin32SetupTasks('x64', 'system');
|
||||||
defineWin32SetupTasks('arm64', 'system');
|
|
||||||
defineWin32SetupTasks('ia32', 'user');
|
defineWin32SetupTasks('ia32', 'user');
|
||||||
defineWin32SetupTasks('x64', 'user');
|
defineWin32SetupTasks('x64', 'user');
|
||||||
defineWin32SetupTasks('arm64', 'user');
|
|
||||||
|
|
||||||
function archiveWin32Setup(arch) {
|
function archiveWin32Setup(arch) {
|
||||||
return cb => {
|
return cb => {
|
||||||
@@ -149,7 +146,6 @@ function updateIcon(executablePath) {
|
|||||||
|
|
||||||
gulp.task(task.define('vscode-win32-ia32-inno-updater', task.series(copyInnoUpdater('ia32'), updateIcon(path.join(buildPath('ia32'), 'tools', 'inno_updater.exe')))));
|
gulp.task(task.define('vscode-win32-ia32-inno-updater', task.series(copyInnoUpdater('ia32'), updateIcon(path.join(buildPath('ia32'), 'tools', 'inno_updater.exe')))));
|
||||||
gulp.task(task.define('vscode-win32-x64-inno-updater', task.series(copyInnoUpdater('x64'), updateIcon(path.join(buildPath('x64'), 'tools', 'inno_updater.exe')))));
|
gulp.task(task.define('vscode-win32-x64-inno-updater', task.series(copyInnoUpdater('x64'), updateIcon(path.join(buildPath('x64'), 'tools', 'inno_updater.exe')))));
|
||||||
gulp.task(task.define('vscode-win32-arm64-inno-updater', task.series(copyInnoUpdater('arm64'), updateIcon(path.join(buildPath('arm64'), 'tools', 'inno_updater.exe')))));
|
|
||||||
|
|
||||||
// CodeHelper.exe icon
|
// CodeHelper.exe icon
|
||||||
|
|
||||||
|
|||||||
@@ -53,9 +53,7 @@ function createAsar(folderPath, unpackGlobs, destFilename) {
|
|||||||
const insertFile = (relativePath, stat, shouldUnpack) => {
|
const insertFile = (relativePath, stat, shouldUnpack) => {
|
||||||
insertDirectoryForFile(relativePath);
|
insertDirectoryForFile(relativePath);
|
||||||
pendingInserts++;
|
pendingInserts++;
|
||||||
// Do not pass `onFileInserted` directly because it gets overwritten below.
|
filesystem.insertFile(relativePath, shouldUnpack, { stat: stat }, {}, onFileInserted);
|
||||||
// Create a closure capturing `onFileInserted`.
|
|
||||||
filesystem.insertFile(relativePath, shouldUnpack, { stat: stat }, {}).then(() => onFileInserted(), () => onFileInserted());
|
|
||||||
};
|
};
|
||||||
return es.through(function (file) {
|
return es.through(function (file) {
|
||||||
if (file.stat.isDirectory()) {
|
if (file.stat.isDirectory()) {
|
||||||
|
|||||||
@@ -8,17 +8,10 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as es from 'event-stream';
|
import * as es from 'event-stream';
|
||||||
const pickle = require('chromium-pickle-js');
|
const pickle = require('chromium-pickle-js');
|
||||||
const Filesystem = <typeof AsarFilesystem>require('asar/lib/filesystem');
|
const Filesystem = require('asar/lib/filesystem');
|
||||||
import * as VinylFile from 'vinyl';
|
import * as VinylFile from 'vinyl';
|
||||||
import * as minimatch from 'minimatch';
|
import * as minimatch from 'minimatch';
|
||||||
|
|
||||||
declare class AsarFilesystem {
|
|
||||||
readonly header: unknown;
|
|
||||||
constructor(src: string);
|
|
||||||
insertDirectory(path: string, shouldUnpack?: boolean): unknown;
|
|
||||||
insertFile(path: string, shouldUnpack: boolean, file: { stat: { size: number; mode: number; }; }, options: {}): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createAsar(folderPath: string, unpackGlobs: string[], destFilename: string): NodeJS.ReadWriteStream {
|
export function createAsar(folderPath: string, unpackGlobs: string[], destFilename: string): NodeJS.ReadWriteStream {
|
||||||
|
|
||||||
const shouldUnpackFile = (file: VinylFile): boolean => {
|
const shouldUnpackFile = (file: VinylFile): boolean => {
|
||||||
@@ -68,9 +61,7 @@ export function createAsar(folderPath: string, unpackGlobs: string[], destFilena
|
|||||||
const insertFile = (relativePath: string, stat: { size: number; mode: number; }, shouldUnpack: boolean) => {
|
const insertFile = (relativePath: string, stat: { size: number; mode: number; }, shouldUnpack: boolean) => {
|
||||||
insertDirectoryForFile(relativePath);
|
insertDirectoryForFile(relativePath);
|
||||||
pendingInserts++;
|
pendingInserts++;
|
||||||
// Do not pass `onFileInserted` directly because it gets overwritten below.
|
filesystem.insertFile(relativePath, shouldUnpack, { stat: stat }, {}, onFileInserted);
|
||||||
// Create a closure capturing `onFileInserted`.
|
|
||||||
filesystem.insertFile(relativePath, shouldUnpack, { stat: stat }, {}).then(() => onFileInserted(), () => onFileInserted());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return es.through(function (file) {
|
return es.through(function (file) {
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ const fancyLog = require('fancy-log');
|
|||||||
const ansiColors = require('ansi-colors');
|
const ansiColors = require('ansi-colors');
|
||||||
|
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
const root = path.dirname(path.dirname(__dirname));
|
||||||
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
const builtInExtensions = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')).builtInExtensions;
|
||||||
const builtInExtensions = productjson.builtInExtensions;
|
|
||||||
const webBuiltInExtensions = productjson.webBuiltInExtensions;
|
|
||||||
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
||||||
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
|
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
|
||||||
|
|
||||||
@@ -102,14 +100,14 @@ function writeControlFile(control) {
|
|||||||
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
|
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getBuiltInExtensions = function getBuiltInExtensions() {
|
function main() {
|
||||||
log('Syncronizing built-in extensions...');
|
log('Syncronizing built-in extensions...');
|
||||||
log(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
|
log(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
|
||||||
|
|
||||||
const control = readControlFile();
|
const control = readControlFile();
|
||||||
const streams = [];
|
const streams = [];
|
||||||
|
|
||||||
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
|
for (const extension of builtInExtensions) {
|
||||||
let controlState = control[extension.name] || 'marketplace';
|
let controlState = control[extension.name] || 'marketplace';
|
||||||
control[extension.name] = controlState;
|
control[extension.name] = controlState;
|
||||||
|
|
||||||
@@ -118,16 +116,14 @@ exports.getBuiltInExtensions = function getBuiltInExtensions() {
|
|||||||
|
|
||||||
writeControlFile(control);
|
writeControlFile(control);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
es.merge(streams)
|
||||||
es.merge(streams)
|
.on('error', err => {
|
||||||
.on('error', reject)
|
console.error(err);
|
||||||
.on('end', resolve);
|
process.exit(1);
|
||||||
});
|
})
|
||||||
};
|
.on('end', () => {
|
||||||
|
process.exit(0);
|
||||||
if (require.main === module) {
|
});
|
||||||
exports.getBuiltInExtensions().then(() => process.exit(0)).catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ const reporter_1 = require("./reporter");
|
|||||||
const util = require("./util");
|
const util = require("./util");
|
||||||
const fancyLog = require("fancy-log");
|
const fancyLog = require("fancy-log");
|
||||||
const ansiColors = require("ansi-colors");
|
const ansiColors = require("ansi-colors");
|
||||||
const os = require("os");
|
|
||||||
const watch = require('./watch');
|
const watch = require('./watch');
|
||||||
const reporter = reporter_1.createReporter();
|
const reporter = reporter_1.createReporter();
|
||||||
function getTypeScriptCompilerOptions(src) {
|
function getTypeScriptCompilerOptions(src) {
|
||||||
@@ -70,9 +69,6 @@ function createCompile(src, build, emitError) {
|
|||||||
}
|
}
|
||||||
function compileTask(src, out, build) {
|
function compileTask(src, out, build) {
|
||||||
return function () {
|
return function () {
|
||||||
if (os.totalmem() < 4000000000) {
|
|
||||||
throw new Error('compilation requires 4GB of RAM');
|
|
||||||
}
|
|
||||||
const compile = createCompile(src, build, true);
|
const compile = createCompile(src, build, true);
|
||||||
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
||||||
let generator = new MonacoGenerator(false);
|
let generator = new MonacoGenerator(false);
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import { createReporter } from './reporter';
|
|||||||
import * as util from './util';
|
import * as util from './util';
|
||||||
import * as fancyLog from 'fancy-log';
|
import * as fancyLog from 'fancy-log';
|
||||||
import * as ansiColors from 'ansi-colors';
|
import * as ansiColors from 'ansi-colors';
|
||||||
import * as os from 'os';
|
|
||||||
import ts = require('typescript');
|
import ts = require('typescript');
|
||||||
|
|
||||||
const watch = require('./watch');
|
const watch = require('./watch');
|
||||||
@@ -82,11 +81,6 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
|
|||||||
export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
|
export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
|
||||||
if (os.totalmem() < 4_000_000_000) {
|
|
||||||
throw new Error('compilation requires 4GB of RAM');
|
|
||||||
}
|
|
||||||
|
|
||||||
const compile = createCompile(src, build, true);
|
const compile = createCompile(src, build, true);
|
||||||
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
||||||
let generator = new MonacoGenerator(false);
|
let generator = new MonacoGenerator(false);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.config = void 0;
|
exports.config = exports.getElectronVersion = void 0;
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const vfs = require("vinyl-fs");
|
const vfs = require("vinyl-fs");
|
||||||
@@ -16,6 +16,12 @@ const electron = require('gulp-atom-electron');
|
|||||||
const root = path.dirname(path.dirname(__dirname));
|
const root = path.dirname(path.dirname(__dirname));
|
||||||
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
|
function getElectronVersion() {
|
||||||
|
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||||
|
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
exports.getElectronVersion = getElectronVersion;
|
||||||
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
|
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
|
||||||
function darwinBundleDocumentType(extensions, icon) {
|
function darwinBundleDocumentType(extensions, icon) {
|
||||||
return {
|
return {
|
||||||
@@ -27,7 +33,7 @@ function darwinBundleDocumentType(extensions, icon) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
exports.config = {
|
exports.config = {
|
||||||
version: util.getElectronVersion(),
|
version: getElectronVersion(),
|
||||||
productAppName: product.nameLong,
|
productAppName: product.nameLong,
|
||||||
companyName: 'Microsoft Corporation',
|
companyName: 'Microsoft Corporation',
|
||||||
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
||||||
@@ -67,7 +73,7 @@ function getElectron(arch) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
async function main(arch = process.arch) {
|
async function main(arch = process.arch) {
|
||||||
const version = util.getElectronVersion();
|
const version = getElectronVersion();
|
||||||
const electronPath = path.join(root, '.build', 'electron');
|
const electronPath = path.join(root, '.build', 'electron');
|
||||||
const versionFile = path.join(electronPath, 'version');
|
const versionFile = path.join(electronPath, 'version');
|
||||||
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
|
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ const root = path.dirname(path.dirname(__dirname));
|
|||||||
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8'));
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
|
|
||||||
|
export function getElectronVersion(): string {
|
||||||
|
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||||
|
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
|
const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8'));
|
||||||
|
|
||||||
function darwinBundleDocumentType(extensions: string[], icon: string) {
|
function darwinBundleDocumentType(extensions: string[], icon: string) {
|
||||||
@@ -32,7 +38,7 @@ function darwinBundleDocumentType(extensions: string[], icon: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
version: util.getElectronVersion(),
|
version: getElectronVersion(),
|
||||||
productAppName: product.nameLong,
|
productAppName: product.nameLong,
|
||||||
companyName: 'Microsoft Corporation',
|
companyName: 'Microsoft Corporation',
|
||||||
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
||||||
@@ -75,7 +81,7 @@ function getElectron(arch: string): () => NodeJS.ReadWriteStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main(arch = process.arch): Promise<void> {
|
async function main(arch = process.arch): Promise<void> {
|
||||||
const version = util.getElectronVersion();
|
const version = getElectronVersion();
|
||||||
const electronPath = path.join(root, '.build', 'electron');
|
const electronPath = path.join(root, '.build', 'electron');
|
||||||
const versionFile = path.join(electronPath, 'version');
|
const versionFile = path.join(electronPath, 'version');
|
||||||
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
|
const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ module.exports = new class ApiLiteralOrTypes {
|
|||||||
create(context) {
|
create(context) {
|
||||||
return {
|
return {
|
||||||
['TSTypeAnnotation TSUnionType TSLiteralType']: (node) => {
|
['TSTypeAnnotation TSUnionType TSLiteralType']: (node) => {
|
||||||
var _a;
|
|
||||||
if (((_a = node.literal) === null || _a === void 0 ? void 0 : _a.type) === 'TSNullKeyword') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
context.report({
|
context.report({
|
||||||
node: node,
|
node: node,
|
||||||
messageId: 'useEnum'
|
messageId: 'useEnum'
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ export = new class ApiLiteralOrTypes implements eslint.Rule.RuleModule {
|
|||||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||||
return {
|
return {
|
||||||
['TSTypeAnnotation TSUnionType TSLiteralType']: (node: any) => {
|
['TSTypeAnnotation TSUnionType TSLiteralType']: (node: any) => {
|
||||||
if (node.literal?.type === 'TSNullKeyword') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
context.report({
|
context.report({
|
||||||
node: node,
|
node: node,
|
||||||
messageId: 'useEnum'
|
messageId: 'useEnum'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.translatePackageJSON = exports.packageRebuildExtensionsStream = exports.cleanRebuildExtensions = exports.packageExternalExtensionsStream = exports.scanBuiltinExtensions = exports.packageMarketplaceExtensionsStream = exports.packageLocalExtensionsStream = exports.fromMarketplace = void 0;
|
exports.packageRebuildExtensionsStream = exports.cleanRebuildExtensions = exports.packageExternalExtensionsStream = exports.packageMarketplaceExtensionsStream = exports.packageLocalExtensionsStream = exports.fromMarketplace = void 0;
|
||||||
const es = require("event-stream");
|
const es = require("event-stream");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const glob = require("glob");
|
const glob = require("glob");
|
||||||
@@ -22,66 +22,33 @@ const fancyLog = require("fancy-log");
|
|||||||
const ansiColors = require("ansi-colors");
|
const ansiColors = require("ansi-colors");
|
||||||
const buffer = require('gulp-buffer');
|
const buffer = require('gulp-buffer');
|
||||||
const json = require("gulp-json-editor");
|
const json = require("gulp-json-editor");
|
||||||
const jsoncParser = require("jsonc-parser");
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const webpackGulp = require('webpack-stream');
|
const webpackGulp = require('webpack-stream');
|
||||||
const util = require('./util');
|
const util = require('./util');
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
const root = path.dirname(path.dirname(__dirname));
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
const sourceMappingURLBase = `https://sqlopsbuilds.blob.core.windows.net/sourcemaps/${commit}`;
|
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
|
||||||
function minifyExtensionResources(input) {
|
function fromLocal(extensionPath) {
|
||||||
const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true });
|
const webpackFilename = path.join(extensionPath, 'extension.webpack.config.js');
|
||||||
return input
|
const input = fs.existsSync(webpackFilename)
|
||||||
.pipe(jsonFilter)
|
? fromLocalWebpack(extensionPath)
|
||||||
.pipe(buffer())
|
|
||||||
.pipe(es.mapSync((f) => {
|
|
||||||
const errors = [];
|
|
||||||
const value = jsoncParser.parse(f.contents.toString('utf8'), errors);
|
|
||||||
if (errors.length === 0) {
|
|
||||||
// file parsed OK => just stringify to drop whitespace and comments
|
|
||||||
f.contents = Buffer.from(JSON.stringify(value));
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}))
|
|
||||||
.pipe(jsonFilter.restore);
|
|
||||||
}
|
|
||||||
function updateExtensionPackageJSON(input, update) {
|
|
||||||
const packageJsonFilter = filter('extensions/*/package.json', { restore: true });
|
|
||||||
return input
|
|
||||||
.pipe(packageJsonFilter)
|
|
||||||
.pipe(buffer())
|
|
||||||
.pipe(es.mapSync((f) => {
|
|
||||||
const data = JSON.parse(f.contents.toString('utf8'));
|
|
||||||
f.contents = Buffer.from(JSON.stringify(update(data)));
|
|
||||||
return f;
|
|
||||||
}))
|
|
||||||
.pipe(packageJsonFilter.restore);
|
|
||||||
}
|
|
||||||
function fromLocal(extensionPath, forWeb) {
|
|
||||||
const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js';
|
|
||||||
const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName));
|
|
||||||
let input = isWebPacked
|
|
||||||
? fromLocalWebpack(extensionPath, webpackConfigFileName)
|
|
||||||
: fromLocalNormal(extensionPath);
|
: fromLocalNormal(extensionPath);
|
||||||
if (isWebPacked) {
|
const tmLanguageJsonFilter = filter('**/*.tmLanguage.json', { restore: true });
|
||||||
input = updateExtensionPackageJSON(input, (data) => {
|
return input
|
||||||
delete data.scripts;
|
.pipe(tmLanguageJsonFilter)
|
||||||
delete data.dependencies;
|
.pipe(buffer())
|
||||||
delete data.devDependencies;
|
.pipe(es.mapSync((f) => {
|
||||||
if (data.main) {
|
f.contents = Buffer.from(JSON.stringify(JSON.parse(f.contents.toString('utf8'))));
|
||||||
data.main = data.main.replace('/out/', /dist/);
|
return f;
|
||||||
}
|
}))
|
||||||
return data;
|
.pipe(tmLanguageJsonFilter.restore);
|
||||||
});
|
|
||||||
}
|
|
||||||
return input;
|
|
||||||
}
|
}
|
||||||
function fromLocalWebpack(extensionPath, webpackConfigFileName) {
|
function fromLocalWebpack(extensionPath) {
|
||||||
const result = es.through();
|
const result = es.through();
|
||||||
const packagedDependencies = [];
|
const packagedDependencies = [];
|
||||||
const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
|
const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
|
||||||
if (packageJsonConfig.dependencies) {
|
if (packageJsonConfig.dependencies) {
|
||||||
const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName));
|
const webpackRootConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
|
||||||
for (const key in webpackRootConfig.externals) {
|
for (const key in webpackRootConfig.externals) {
|
||||||
if (key in packageJsonConfig.dependencies) {
|
if (key in packageJsonConfig.dependencies) {
|
||||||
packagedDependencies.push(key);
|
packagedDependencies.push(key);
|
||||||
@@ -97,9 +64,30 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName) {
|
|||||||
base: extensionPath,
|
base: extensionPath,
|
||||||
contents: fs.createReadStream(filePath)
|
contents: fs.createReadStream(filePath)
|
||||||
}));
|
}));
|
||||||
|
const filesStream = es.readArray(files);
|
||||||
// check for a webpack configuration files, then invoke webpack
|
// check for a webpack configuration files, then invoke webpack
|
||||||
// and merge its output with the files stream.
|
// and merge its output with the files stream. also rewrite the package.json
|
||||||
const webpackConfigLocations = glob.sync(path.join(extensionPath, '**', webpackConfigFileName), { ignore: ['**/node_modules'] });
|
// file to a new entry point
|
||||||
|
const webpackConfigLocations = glob.sync(path.join(extensionPath, '/**/extension.webpack.config.js'), { ignore: ['**/node_modules'] });
|
||||||
|
const packageJsonFilter = filter(f => {
|
||||||
|
if (path.basename(f.path) === 'package.json') {
|
||||||
|
// only modify package.json's next to the webpack file.
|
||||||
|
// to be safe, use existsSync instead of path comparison.
|
||||||
|
return fs.existsSync(path.join(path.dirname(f.path), 'extension.webpack.config.js'));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}, { restore: true });
|
||||||
|
const patchFilesStream = filesStream
|
||||||
|
.pipe(packageJsonFilter)
|
||||||
|
.pipe(buffer())
|
||||||
|
.pipe(json((data) => {
|
||||||
|
if (data.main) {
|
||||||
|
// hardcoded entry point directory!
|
||||||
|
data.main = data.main.replace('/out/', /dist/);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}))
|
||||||
|
.pipe(packageJsonFilter.restore);
|
||||||
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
||||||
const webpackDone = (err, stats) => {
|
const webpackDone = (err, stats) => {
|
||||||
fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`);
|
||||||
@@ -133,7 +121,7 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName) {
|
|||||||
this.emit('data', data);
|
this.emit('data', data);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
es.merge(...webpackStreams, es.readArray(files))
|
es.merge(...webpackStreams, patchFilesStream)
|
||||||
// .pipe(es.through(function (data) {
|
// .pipe(es.through(function (data) {
|
||||||
// // debug
|
// // debug
|
||||||
// console.log('out', data.path, data.contents.length);
|
// console.log('out', data.path, data.contents.length);
|
||||||
@@ -194,6 +182,7 @@ function fromMarketplace(extensionName, version, metadata) {
|
|||||||
exports.fromMarketplace = fromMarketplace;
|
exports.fromMarketplace = fromMarketplace;
|
||||||
const excludedExtensions = [
|
const excludedExtensions = [
|
||||||
'vscode-api-tests',
|
'vscode-api-tests',
|
||||||
|
'vscode-web-playground',
|
||||||
'vscode-colorize-tests',
|
'vscode-colorize-tests',
|
||||||
'vscode-test-resolver',
|
'vscode-test-resolver',
|
||||||
'ms-vscode.node-debug',
|
'ms-vscode.node-debug',
|
||||||
@@ -209,8 +198,6 @@ const externalExtensions = [
|
|||||||
// Any extension not included here will be installed by default.
|
// Any extension not included here will be installed by default.
|
||||||
'admin-tool-ext-win',
|
'admin-tool-ext-win',
|
||||||
'agent',
|
'agent',
|
||||||
'arc',
|
|
||||||
'azdata',
|
|
||||||
'import',
|
'import',
|
||||||
'profiler',
|
'profiler',
|
||||||
'admin-pack',
|
'admin-pack',
|
||||||
@@ -218,120 +205,44 @@ const externalExtensions = [
|
|||||||
'schema-compare',
|
'schema-compare',
|
||||||
'cms',
|
'cms',
|
||||||
'query-history',
|
'query-history',
|
||||||
'kusto',
|
|
||||||
'liveshare',
|
'liveshare',
|
||||||
'sql-database-projects',
|
'sql-database-projects',
|
||||||
'machine-learning',
|
'machine-learning'
|
||||||
'sql-assessment',
|
|
||||||
'asde-deployment',
|
|
||||||
'sql-migration',
|
|
||||||
'data-workspace'
|
|
||||||
];
|
];
|
||||||
// extensions that require a rebuild since they have native parts
|
// extensions that require a rebuild since they have native parts
|
||||||
const rebuildExtensions = [
|
const rebuildExtensions = [
|
||||||
'big-data-cluster',
|
'big-data-cluster',
|
||||||
'mssql'
|
'mssql'
|
||||||
];
|
];
|
||||||
const marketplaceWebExtensions = [
|
const builtInExtensions = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')).builtInExtensions;
|
||||||
'ms-vscode.references-view'
|
function packageLocalExtensionsStream() {
|
||||||
];
|
const localExtensionDescriptions = glob.sync('extensions/*/package.json')
|
||||||
const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
|
||||||
const builtInExtensions = productJson.builtInExtensions || [];
|
|
||||||
const webBuiltInExtensions = productJson.webBuiltInExtensions || [];
|
|
||||||
/**
|
|
||||||
* Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts`
|
|
||||||
*/
|
|
||||||
function isWebExtension(manifest) {
|
|
||||||
if (typeof manifest.extensionKind !== 'undefined') {
|
|
||||||
const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind];
|
|
||||||
return (extensionKind.indexOf('web') >= 0);
|
|
||||||
}
|
|
||||||
return (!Boolean(manifest.main) || Boolean(manifest.browser));
|
|
||||||
}
|
|
||||||
function packageLocalExtensionsStream(forWeb) {
|
|
||||||
const localExtensionsDescriptions = (glob.sync('extensions/*/package.json')
|
|
||||||
.map(manifestPath => {
|
.map(manifestPath => {
|
||||||
const absoluteManifestPath = path.join(root, manifestPath);
|
|
||||||
const extensionPath = path.dirname(path.join(root, manifestPath));
|
const extensionPath = path.dirname(path.join(root, manifestPath));
|
||||||
const extensionName = path.basename(extensionPath);
|
const extensionName = path.basename(extensionPath);
|
||||||
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
return { name: extensionName, path: extensionPath };
|
||||||
})
|
})
|
||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ name }) => externalExtensions.indexOf(name) === -1) // {{SQL CARBON EDIT}} Remove external Extensions with separate package
|
.filter(({ name }) => externalExtensions.indexOf(name) === -1); // {{SQL CARBON EDIT}} Remove external Extensions with separate package
|
||||||
);
|
const nodeModules = gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
const localExtensionsStream = minifyExtensionResources(es.merge(...localExtensionsDescriptions.map(extension => {
|
const localExtensions = localExtensionDescriptions.map(extension => {
|
||||||
return fromLocal(extension.path, forWeb)
|
return fromLocal(extension.path)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
})));
|
});
|
||||||
let result;
|
return es.merge(nodeModules, ...localExtensions)
|
||||||
if (forWeb) {
|
.pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
result = localExtensionsStream;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// also include shared node modules
|
|
||||||
result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' }));
|
|
||||||
}
|
|
||||||
return (result
|
|
||||||
.pipe(util2.setExecutableBit(['**/*.sh'])));
|
|
||||||
}
|
}
|
||||||
exports.packageLocalExtensionsStream = packageLocalExtensionsStream;
|
exports.packageLocalExtensionsStream = packageLocalExtensionsStream;
|
||||||
function packageMarketplaceExtensionsStream(forWeb) {
|
function packageMarketplaceExtensionsStream() {
|
||||||
const marketplaceExtensionsDescriptions = [
|
const extensions = builtInExtensions.map(extension => {
|
||||||
...builtInExtensions.filter(({ name }) => (forWeb ? marketplaceWebExtensions.indexOf(name) >= 0 : true)),
|
return fromMarketplace(extension.name, extension.version, extension.metadata)
|
||||||
...(forWeb ? webBuiltInExtensions : [])
|
|
||||||
];
|
|
||||||
const marketplaceExtensionsStream = minifyExtensionResources(es.merge(...marketplaceExtensionsDescriptions
|
|
||||||
.map(extension => {
|
|
||||||
const input = fromMarketplace(extension.name, extension.version, extension.metadata)
|
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
return updateExtensionPackageJSON(input, (data) => {
|
});
|
||||||
delete data.scripts;
|
return es.merge(extensions)
|
||||||
delete data.dependencies;
|
.pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
delete data.devDependencies;
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
})));
|
|
||||||
return (marketplaceExtensionsStream
|
|
||||||
.pipe(util2.setExecutableBit(['**/*.sh'])));
|
|
||||||
}
|
}
|
||||||
exports.packageMarketplaceExtensionsStream = packageMarketplaceExtensionsStream;
|
exports.packageMarketplaceExtensionsStream = packageMarketplaceExtensionsStream;
|
||||||
function scanBuiltinExtensions(extensionsRoot, exclude = []) {
|
|
||||||
const scannedExtensions = [];
|
|
||||||
try {
|
|
||||||
const extensionsFolders = fs.readdirSync(extensionsRoot);
|
|
||||||
for (const extensionFolder of extensionsFolders) {
|
|
||||||
if (exclude.indexOf(extensionFolder) >= 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json');
|
|
||||||
if (!fs.existsSync(packageJSONPath)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
|
|
||||||
if (!isWebExtension(packageJSON)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder));
|
|
||||||
const packageNLSPath = children.filter(child => child === 'package.nls.json')[0];
|
|
||||||
const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined;
|
|
||||||
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
|
|
||||||
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];
|
|
||||||
scannedExtensions.push({
|
|
||||||
extensionPath: extensionFolder,
|
|
||||||
packageJSON,
|
|
||||||
packageNLS,
|
|
||||||
readmePath: readme ? path.join(extensionFolder, readme) : undefined,
|
|
||||||
changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return scannedExtensions;
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
return scannedExtensions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.scanBuiltinExtensions = scanBuiltinExtensions;
|
|
||||||
function packageExternalExtensionsStream() {
|
function packageExternalExtensionsStream() {
|
||||||
const extenalExtensionDescriptions = glob.sync('extensions/*/package.json')
|
const extenalExtensionDescriptions = glob.sync('extensions/*/package.json')
|
||||||
.map(manifestPath => {
|
.map(manifestPath => {
|
||||||
@@ -341,13 +252,13 @@ function packageExternalExtensionsStream() {
|
|||||||
})
|
})
|
||||||
.filter(({ name }) => externalExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => externalExtensions.indexOf(name) >= 0);
|
||||||
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
||||||
return fromLocal(extension.path, false)
|
return fromLocal(extension.path)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
});
|
});
|
||||||
return es.merge(builtExtensions);
|
return es.merge(builtExtensions);
|
||||||
}
|
}
|
||||||
exports.packageExternalExtensionsStream = packageExternalExtensionsStream;
|
exports.packageExternalExtensionsStream = packageExternalExtensionsStream;
|
||||||
// {{SQL CARBON EDIT}} start
|
// {{SQL CARBON EDIT}} - End
|
||||||
function cleanRebuildExtensions(root) {
|
function cleanRebuildExtensions(root) {
|
||||||
return Promise.all(rebuildExtensions.map(async (e) => {
|
return Promise.all(rebuildExtensions.map(async (e) => {
|
||||||
await util2.rimraf(path.join(root, e))();
|
await util2.rimraf(path.join(root, e))();
|
||||||
@@ -363,34 +274,9 @@ function packageRebuildExtensionsStream() {
|
|||||||
})
|
})
|
||||||
.filter(({ name }) => rebuildExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => rebuildExtensions.indexOf(name) >= 0);
|
||||||
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
||||||
return fromLocal(extension.path, false)
|
return fromLocal(extension.path)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
});
|
});
|
||||||
return es.merge(builtExtensions);
|
return es.merge(builtExtensions);
|
||||||
}
|
}
|
||||||
exports.packageRebuildExtensionsStream = packageRebuildExtensionsStream;
|
exports.packageRebuildExtensionsStream = packageRebuildExtensionsStream;
|
||||||
// {{SQL CARBON EDIT}} end
|
|
||||||
function translatePackageJSON(packageJSON, packageNLSPath) {
|
|
||||||
const CharCode_PC = '%'.charCodeAt(0);
|
|
||||||
const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString());
|
|
||||||
const translate = (obj) => {
|
|
||||||
for (let key in obj) {
|
|
||||||
const val = obj[key];
|
|
||||||
if (Array.isArray(val)) {
|
|
||||||
val.forEach(translate);
|
|
||||||
}
|
|
||||||
else if (val && typeof val === 'object') {
|
|
||||||
translate(val);
|
|
||||||
}
|
|
||||||
else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) {
|
|
||||||
const translated = packageNls[val.substr(1, val.length - 2)];
|
|
||||||
if (translated) {
|
|
||||||
obj[key] = translated;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
translate(packageJSON);
|
|
||||||
return packageJSON;
|
|
||||||
}
|
|
||||||
exports.translatePackageJSON = translatePackageJSON;
|
|
||||||
|
|||||||
@@ -21,75 +21,38 @@ import * as fancyLog from 'fancy-log';
|
|||||||
import * as ansiColors from 'ansi-colors';
|
import * as ansiColors from 'ansi-colors';
|
||||||
const buffer = require('gulp-buffer');
|
const buffer = require('gulp-buffer');
|
||||||
import json = require('gulp-json-editor');
|
import json = require('gulp-json-editor');
|
||||||
import * as jsoncParser from 'jsonc-parser';
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const webpackGulp = require('webpack-stream');
|
const webpackGulp = require('webpack-stream');
|
||||||
const util = require('./util');
|
const util = require('./util');
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
const root = path.dirname(path.dirname(__dirname));
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
const sourceMappingURLBase = `https://sqlopsbuilds.blob.core.windows.net/sourcemaps/${commit}`;
|
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
|
||||||
|
|
||||||
function minifyExtensionResources(input: Stream): Stream {
|
function fromLocal(extensionPath: string): Stream {
|
||||||
const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true });
|
const webpackFilename = path.join(extensionPath, 'extension.webpack.config.js');
|
||||||
return input
|
const input = fs.existsSync(webpackFilename)
|
||||||
.pipe(jsonFilter)
|
? fromLocalWebpack(extensionPath)
|
||||||
.pipe(buffer())
|
|
||||||
.pipe(es.mapSync((f: File) => {
|
|
||||||
const errors: jsoncParser.ParseError[] = [];
|
|
||||||
const value = jsoncParser.parse(f.contents.toString('utf8'), errors);
|
|
||||||
if (errors.length === 0) {
|
|
||||||
// file parsed OK => just stringify to drop whitespace and comments
|
|
||||||
f.contents = Buffer.from(JSON.stringify(value));
|
|
||||||
}
|
|
||||||
return f;
|
|
||||||
}))
|
|
||||||
.pipe(jsonFilter.restore);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateExtensionPackageJSON(input: Stream, update: (data: any) => any): Stream {
|
|
||||||
const packageJsonFilter = filter('extensions/*/package.json', { restore: true });
|
|
||||||
return input
|
|
||||||
.pipe(packageJsonFilter)
|
|
||||||
.pipe(buffer())
|
|
||||||
.pipe(es.mapSync((f: File) => {
|
|
||||||
const data = JSON.parse(f.contents.toString('utf8'));
|
|
||||||
f.contents = Buffer.from(JSON.stringify(update(data)));
|
|
||||||
return f;
|
|
||||||
}))
|
|
||||||
.pipe(packageJsonFilter.restore);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fromLocal(extensionPath: string, forWeb: boolean): Stream {
|
|
||||||
const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js';
|
|
||||||
|
|
||||||
const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName));
|
|
||||||
let input = isWebPacked
|
|
||||||
? fromLocalWebpack(extensionPath, webpackConfigFileName)
|
|
||||||
: fromLocalNormal(extensionPath);
|
: fromLocalNormal(extensionPath);
|
||||||
|
|
||||||
if (isWebPacked) {
|
const tmLanguageJsonFilter = filter('**/*.tmLanguage.json', { restore: true });
|
||||||
input = updateExtensionPackageJSON(input, (data: any) => {
|
|
||||||
delete data.scripts;
|
|
||||||
delete data.dependencies;
|
|
||||||
delete data.devDependencies;
|
|
||||||
if (data.main) {
|
|
||||||
data.main = data.main.replace('/out/', /dist/);
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return input;
|
return input
|
||||||
|
.pipe(tmLanguageJsonFilter)
|
||||||
|
.pipe(buffer())
|
||||||
|
.pipe(es.mapSync((f: File) => {
|
||||||
|
f.contents = Buffer.from(JSON.stringify(JSON.parse(f.contents.toString('utf8'))));
|
||||||
|
return f;
|
||||||
|
}))
|
||||||
|
.pipe(tmLanguageJsonFilter.restore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fromLocalWebpack(extensionPath: string): Stream {
|
||||||
function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string): Stream {
|
|
||||||
const result = es.through();
|
const result = es.through();
|
||||||
|
|
||||||
const packagedDependencies: string[] = [];
|
const packagedDependencies: string[] = [];
|
||||||
const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
|
const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
|
||||||
if (packageJsonConfig.dependencies) {
|
if (packageJsonConfig.dependencies) {
|
||||||
const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName));
|
const webpackRootConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
|
||||||
for (const key in webpackRootConfig.externals) {
|
for (const key in webpackRootConfig.externals) {
|
||||||
if (key in packageJsonConfig.dependencies) {
|
if (key in packageJsonConfig.dependencies) {
|
||||||
packagedDependencies.push(key);
|
packagedDependencies.push(key);
|
||||||
@@ -107,13 +70,38 @@ function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string):
|
|||||||
contents: fs.createReadStream(filePath) as any
|
contents: fs.createReadStream(filePath) as any
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const filesStream = es.readArray(files);
|
||||||
|
|
||||||
// check for a webpack configuration files, then invoke webpack
|
// check for a webpack configuration files, then invoke webpack
|
||||||
// and merge its output with the files stream.
|
// and merge its output with the files stream. also rewrite the package.json
|
||||||
|
// file to a new entry point
|
||||||
const webpackConfigLocations = (<string[]>glob.sync(
|
const webpackConfigLocations = (<string[]>glob.sync(
|
||||||
path.join(extensionPath, '**', webpackConfigFileName),
|
path.join(extensionPath, '/**/extension.webpack.config.js'),
|
||||||
{ ignore: ['**/node_modules'] }
|
{ ignore: ['**/node_modules'] }
|
||||||
));
|
));
|
||||||
|
|
||||||
|
const packageJsonFilter = filter(f => {
|
||||||
|
if (path.basename(f.path) === 'package.json') {
|
||||||
|
// only modify package.json's next to the webpack file.
|
||||||
|
// to be safe, use existsSync instead of path comparison.
|
||||||
|
return fs.existsSync(path.join(path.dirname(f.path), 'extension.webpack.config.js'));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}, { restore: true });
|
||||||
|
|
||||||
|
const patchFilesStream = filesStream
|
||||||
|
.pipe(packageJsonFilter)
|
||||||
|
.pipe(buffer())
|
||||||
|
.pipe(json((data: any) => {
|
||||||
|
if (data.main) {
|
||||||
|
// hardcoded entry point directory!
|
||||||
|
data.main = data.main.replace('/out/', /dist/);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}))
|
||||||
|
.pipe(packageJsonFilter.restore);
|
||||||
|
|
||||||
|
|
||||||
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
const webpackStreams = webpackConfigLocations.map(webpackConfigPath => {
|
||||||
|
|
||||||
const webpackDone = (err: any, stats: any) => {
|
const webpackDone = (err: any, stats: any) => {
|
||||||
@@ -155,7 +143,7 @@ function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string):
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
es.merge(...webpackStreams, es.readArray(files))
|
es.merge(...webpackStreams, patchFilesStream)
|
||||||
// .pipe(es.through(function (data) {
|
// .pipe(es.through(function (data) {
|
||||||
// // debug
|
// // debug
|
||||||
// console.log('out', data.path, data.contents.length);
|
// console.log('out', data.path, data.contents.length);
|
||||||
@@ -225,8 +213,10 @@ export function fromMarketplace(extensionName: string, version: string, metadata
|
|||||||
.pipe(json({ __metadata: metadata }))
|
.pipe(json({ __metadata: metadata }))
|
||||||
.pipe(packageJsonFilter.restore);
|
.pipe(packageJsonFilter.restore);
|
||||||
}
|
}
|
||||||
|
|
||||||
const excludedExtensions = [
|
const excludedExtensions = [
|
||||||
'vscode-api-tests',
|
'vscode-api-tests',
|
||||||
|
'vscode-web-playground',
|
||||||
'vscode-colorize-tests',
|
'vscode-colorize-tests',
|
||||||
'vscode-test-resolver',
|
'vscode-test-resolver',
|
||||||
'ms-vscode.node-debug',
|
'ms-vscode.node-debug',
|
||||||
@@ -243,8 +233,6 @@ const externalExtensions = [
|
|||||||
// Any extension not included here will be installed by default.
|
// Any extension not included here will be installed by default.
|
||||||
'admin-tool-ext-win',
|
'admin-tool-ext-win',
|
||||||
'agent',
|
'agent',
|
||||||
'arc',
|
|
||||||
'azdata',
|
|
||||||
'import',
|
'import',
|
||||||
'profiler',
|
'profiler',
|
||||||
'admin-pack',
|
'admin-pack',
|
||||||
@@ -252,14 +240,9 @@ const externalExtensions = [
|
|||||||
'schema-compare',
|
'schema-compare',
|
||||||
'cms',
|
'cms',
|
||||||
'query-history',
|
'query-history',
|
||||||
'kusto',
|
|
||||||
'liveshare',
|
'liveshare',
|
||||||
'sql-database-projects',
|
'sql-database-projects',
|
||||||
'machine-learning',
|
'machine-learning'
|
||||||
'sql-assessment',
|
|
||||||
'asde-deployment',
|
|
||||||
'sql-migration',
|
|
||||||
'data-workspace'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// extensions that require a rebuild since they have native parts
|
// extensions that require a rebuild since they have native parts
|
||||||
@@ -268,10 +251,6 @@ const rebuildExtensions = [
|
|||||||
'mssql'
|
'mssql'
|
||||||
];
|
];
|
||||||
|
|
||||||
const marketplaceWebExtensions = [
|
|
||||||
'ms-vscode.references-view'
|
|
||||||
];
|
|
||||||
|
|
||||||
interface IBuiltInExtension {
|
interface IBuiltInExtension {
|
||||||
name: string;
|
name: string;
|
||||||
version: string;
|
version: string;
|
||||||
@@ -279,133 +258,37 @@ interface IBuiltInExtension {
|
|||||||
metadata: any;
|
metadata: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
const builtInExtensions: IBuiltInExtension[] = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')).builtInExtensions;
|
||||||
const builtInExtensions: IBuiltInExtension[] = productJson.builtInExtensions || [];
|
|
||||||
const webBuiltInExtensions: IBuiltInExtension[] = productJson.webBuiltInExtensions || [];
|
|
||||||
|
|
||||||
type ExtensionKind = 'ui' | 'workspace' | 'web';
|
export function packageLocalExtensionsStream(): NodeJS.ReadWriteStream {
|
||||||
interface IExtensionManifest {
|
const localExtensionDescriptions = (<string[]>glob.sync('extensions/*/package.json'))
|
||||||
main: string;
|
.map(manifestPath => {
|
||||||
browser: string;
|
const extensionPath = path.dirname(path.join(root, manifestPath));
|
||||||
extensionKind?: ExtensionKind | ExtensionKind[];
|
const extensionName = path.basename(extensionPath);
|
||||||
}
|
return { name: extensionName, path: extensionPath };
|
||||||
/**
|
})
|
||||||
* Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts`
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
*/
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
function isWebExtension(manifest: IExtensionManifest): boolean {
|
.filter(({ name }) => externalExtensions.indexOf(name) === -1); // {{SQL CARBON EDIT}} Remove external Extensions with separate package
|
||||||
if (typeof manifest.extensionKind !== 'undefined') {
|
|
||||||
const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind];
|
const nodeModules = gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
return (extensionKind.indexOf('web') >= 0);
|
const localExtensions = localExtensionDescriptions.map(extension => {
|
||||||
}
|
return fromLocal(extension.path)
|
||||||
return (!Boolean(manifest.main) || Boolean(manifest.browser));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
|
});
|
||||||
|
|
||||||
|
return es.merge(nodeModules, ...localExtensions)
|
||||||
|
.pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function packageLocalExtensionsStream(forWeb: boolean): Stream {
|
export function packageMarketplaceExtensionsStream(): NodeJS.ReadWriteStream {
|
||||||
const localExtensionsDescriptions = (
|
const extensions = builtInExtensions.map(extension => {
|
||||||
(<string[]>glob.sync('extensions/*/package.json'))
|
return fromMarketplace(extension.name, extension.version, extension.metadata)
|
||||||
.map(manifestPath => {
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
const absoluteManifestPath = path.join(root, manifestPath);
|
});
|
||||||
const extensionPath = path.dirname(path.join(root, manifestPath));
|
|
||||||
const extensionName = path.basename(extensionPath);
|
|
||||||
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
|
||||||
})
|
|
||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
|
||||||
.filter(({ name }) => externalExtensions.indexOf(name) === -1) // {{SQL CARBON EDIT}} Remove external Extensions with separate package
|
|
||||||
);
|
|
||||||
const localExtensionsStream = minifyExtensionResources(
|
|
||||||
es.merge(
|
|
||||||
...localExtensionsDescriptions.map(extension => {
|
|
||||||
return fromLocal(extension.path, forWeb)
|
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
let result: Stream;
|
return es.merge(extensions)
|
||||||
if (forWeb) {
|
.pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
result = localExtensionsStream;
|
|
||||||
} else {
|
|
||||||
// also include shared node modules
|
|
||||||
result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' }));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
result
|
|
||||||
.pipe(util2.setExecutableBit(['**/*.sh']))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream {
|
|
||||||
const marketplaceExtensionsDescriptions = [
|
|
||||||
...builtInExtensions.filter(({ name }) => (forWeb ? marketplaceWebExtensions.indexOf(name) >= 0 : true)),
|
|
||||||
...(forWeb ? webBuiltInExtensions : [])
|
|
||||||
];
|
|
||||||
const marketplaceExtensionsStream = minifyExtensionResources(
|
|
||||||
es.merge(
|
|
||||||
...marketplaceExtensionsDescriptions
|
|
||||||
.map(extension => {
|
|
||||||
const input = fromMarketplace(extension.name, extension.version, extension.metadata)
|
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
|
||||||
return updateExtensionPackageJSON(input, (data: any) => {
|
|
||||||
delete data.scripts;
|
|
||||||
delete data.dependencies;
|
|
||||||
delete data.devDependencies;
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
marketplaceExtensionsStream
|
|
||||||
.pipe(util2.setExecutableBit(['**/*.sh']))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IScannedBuiltinExtension {
|
|
||||||
extensionPath: string;
|
|
||||||
packageJSON: any;
|
|
||||||
packageNLS?: any;
|
|
||||||
readmePath?: string;
|
|
||||||
changelogPath?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[] = []): IScannedBuiltinExtension[] {
|
|
||||||
const scannedExtensions: IScannedBuiltinExtension[] = [];
|
|
||||||
|
|
||||||
try {
|
|
||||||
const extensionsFolders = fs.readdirSync(extensionsRoot);
|
|
||||||
for (const extensionFolder of extensionsFolders) {
|
|
||||||
if (exclude.indexOf(extensionFolder) >= 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json');
|
|
||||||
if (!fs.existsSync(packageJSONPath)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8'));
|
|
||||||
if (!isWebExtension(packageJSON)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder));
|
|
||||||
const packageNLSPath = children.filter(child => child === 'package.nls.json')[0];
|
|
||||||
const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined;
|
|
||||||
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
|
|
||||||
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];
|
|
||||||
|
|
||||||
scannedExtensions.push({
|
|
||||||
extensionPath: extensionFolder,
|
|
||||||
packageJSON,
|
|
||||||
packageNLS,
|
|
||||||
readmePath: readme ? path.join(extensionFolder, readme) : undefined,
|
|
||||||
changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return scannedExtensions;
|
|
||||||
} catch (ex) {
|
|
||||||
return scannedExtensions;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function packageExternalExtensionsStream(): NodeJS.ReadWriteStream {
|
export function packageExternalExtensionsStream(): NodeJS.ReadWriteStream {
|
||||||
@@ -418,14 +301,14 @@ export function packageExternalExtensionsStream(): NodeJS.ReadWriteStream {
|
|||||||
.filter(({ name }) => externalExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => externalExtensions.indexOf(name) >= 0);
|
||||||
|
|
||||||
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
||||||
return fromLocal(extension.path, false)
|
return fromLocal(extension.path)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
});
|
});
|
||||||
|
|
||||||
return es.merge(builtExtensions);
|
return es.merge(builtExtensions);
|
||||||
}
|
}
|
||||||
|
// {{SQL CARBON EDIT}} - End
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} start
|
|
||||||
export function cleanRebuildExtensions(root: string): Promise<void> {
|
export function cleanRebuildExtensions(root: string): Promise<void> {
|
||||||
return Promise.all(rebuildExtensions.map(async e => {
|
return Promise.all(rebuildExtensions.map(async e => {
|
||||||
await util2.rimraf(path.join(root, e))();
|
await util2.rimraf(path.join(root, e))();
|
||||||
@@ -442,32 +325,9 @@ export function packageRebuildExtensionsStream(): NodeJS.ReadWriteStream {
|
|||||||
.filter(({ name }) => rebuildExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => rebuildExtensions.indexOf(name) >= 0);
|
||||||
|
|
||||||
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
const builtExtensions = extenalExtensionDescriptions.map(extension => {
|
||||||
return fromLocal(extension.path, false)
|
return fromLocal(extension.path)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
});
|
});
|
||||||
|
|
||||||
return es.merge(builtExtensions);
|
return es.merge(builtExtensions);
|
||||||
}
|
}
|
||||||
// {{SQL CARBON EDIT}} end
|
|
||||||
|
|
||||||
export function translatePackageJSON(packageJSON: string, packageNLSPath: string) {
|
|
||||||
const CharCode_PC = '%'.charCodeAt(0);
|
|
||||||
const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString());
|
|
||||||
const translate = (obj: any) => {
|
|
||||||
for (let key in obj) {
|
|
||||||
const val = obj[key];
|
|
||||||
if (Array.isArray(val)) {
|
|
||||||
val.forEach(translate);
|
|
||||||
} else if (val && typeof val === 'object') {
|
|
||||||
translate(val);
|
|
||||||
} else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) {
|
|
||||||
const translated = packageNls[val.substr(1, val.length - 2)];
|
|
||||||
if (translated) {
|
|
||||||
obj[key] = translated;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
translate(packageJSON);
|
|
||||||
return packageJSON;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const https = require("https");
|
|||||||
const gulp = require("gulp");
|
const gulp = require("gulp");
|
||||||
const fancyLog = require("fancy-log");
|
const fancyLog = require("fancy-log");
|
||||||
const ansiColors = require("ansi-colors");
|
const ansiColors = require("ansi-colors");
|
||||||
const iconv = require("iconv-lite-umd");
|
const iconv = require("iconv-lite");
|
||||||
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
||||||
function log(message, ...rest) {
|
function log(message, ...rest) {
|
||||||
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
|
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
|
||||||
@@ -101,158 +101,161 @@ class TextModel {
|
|||||||
return this._lines;
|
return this._lines;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class XLF {
|
let XLF = /** @class */ (() => {
|
||||||
constructor(project) {
|
class XLF {
|
||||||
this.project = project;
|
constructor(project) {
|
||||||
this.buffer = [];
|
this.project = project;
|
||||||
this.files = Object.create(null);
|
this.buffer = [];
|
||||||
this.numberOfMessages = 0;
|
this.files = Object.create(null);
|
||||||
}
|
this.numberOfMessages = 0;
|
||||||
toString() {
|
|
||||||
this.appendHeader();
|
|
||||||
for (let file in this.files) {
|
|
||||||
this.appendNewLine(`<file original="${file}" source-language="en" datatype="plaintext"><body>`, 2);
|
|
||||||
for (let item of this.files[file]) {
|
|
||||||
this.addStringItem(file, item);
|
|
||||||
}
|
|
||||||
this.appendNewLine('</body></file>', 2);
|
|
||||||
}
|
}
|
||||||
this.appendFooter();
|
toString() {
|
||||||
return this.buffer.join('\r\n');
|
this.appendHeader();
|
||||||
}
|
for (let file in this.files) {
|
||||||
addFile(original, keys, messages) {
|
this.appendNewLine(`<file original="${file}" source-language="en" datatype="plaintext"><body>`, 2);
|
||||||
if (keys.length === 0) {
|
for (let item of this.files[file]) {
|
||||||
console.log('No keys in ' + original);
|
this.addStringItem(file, item);
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (keys.length !== messages.length) {
|
|
||||||
throw new Error(`Unmatching keys(${keys.length}) and messages(${messages.length}).`);
|
|
||||||
}
|
|
||||||
this.numberOfMessages += keys.length;
|
|
||||||
this.files[original] = [];
|
|
||||||
let existingKeys = new Set();
|
|
||||||
for (let i = 0; i < keys.length; i++) {
|
|
||||||
let key = keys[i];
|
|
||||||
let realKey;
|
|
||||||
let comment;
|
|
||||||
if (Is.string(key)) {
|
|
||||||
realKey = key;
|
|
||||||
comment = undefined;
|
|
||||||
}
|
|
||||||
else if (LocalizeInfo.is(key)) {
|
|
||||||
realKey = key.key;
|
|
||||||
if (key.comment && key.comment.length > 0) {
|
|
||||||
comment = key.comment.map(comment => encodeEntities(comment)).join('\r\n');
|
|
||||||
}
|
}
|
||||||
|
this.appendNewLine('</body></file>', 2);
|
||||||
}
|
}
|
||||||
if (!realKey || existingKeys.has(realKey)) {
|
this.appendFooter();
|
||||||
continue;
|
return this.buffer.join('\r\n');
|
||||||
|
}
|
||||||
|
addFile(original, keys, messages) {
|
||||||
|
if (keys.length === 0) {
|
||||||
|
console.log('No keys in ' + original);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
existingKeys.add(realKey);
|
if (keys.length !== messages.length) {
|
||||||
let message = encodeEntities(messages[i]);
|
throw new Error(`Unmatching keys(${keys.length}) and messages(${messages.length}).`);
|
||||||
this.files[original].push({ id: realKey, message: message, comment: comment });
|
}
|
||||||
|
this.numberOfMessages += keys.length;
|
||||||
|
this.files[original] = [];
|
||||||
|
let existingKeys = new Set();
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
let key = keys[i];
|
||||||
|
let realKey;
|
||||||
|
let comment;
|
||||||
|
if (Is.string(key)) {
|
||||||
|
realKey = key;
|
||||||
|
comment = undefined;
|
||||||
|
}
|
||||||
|
else if (LocalizeInfo.is(key)) {
|
||||||
|
realKey = key.key;
|
||||||
|
if (key.comment && key.comment.length > 0) {
|
||||||
|
comment = key.comment.map(comment => encodeEntities(comment)).join('\r\n');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!realKey || existingKeys.has(realKey)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
existingKeys.add(realKey);
|
||||||
|
let message = encodeEntities(messages[i]);
|
||||||
|
this.files[original].push({ id: realKey, message: message, comment: comment });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addStringItem(file, item) {
|
||||||
|
if (!item.id || item.message === undefined || item.message === null) {
|
||||||
|
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`);
|
||||||
|
}
|
||||||
|
if (item.message.length === 0) {
|
||||||
|
log(`Item with id ${item.id} in file ${file} has an empty message.`);
|
||||||
|
}
|
||||||
|
this.appendNewLine(`<trans-unit id="${item.id}">`, 4);
|
||||||
|
this.appendNewLine(`<source xml:lang="en">${item.message}</source>`, 6);
|
||||||
|
if (item.comment) {
|
||||||
|
this.appendNewLine(`<note>${item.comment}</note>`, 6);
|
||||||
|
}
|
||||||
|
this.appendNewLine('</trans-unit>', 4);
|
||||||
|
}
|
||||||
|
appendHeader() {
|
||||||
|
this.appendNewLine('<?xml version="1.0" encoding="utf-8"?>', 0);
|
||||||
|
this.appendNewLine('<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">', 0);
|
||||||
|
}
|
||||||
|
appendFooter() {
|
||||||
|
this.appendNewLine('</xliff>', 0);
|
||||||
|
}
|
||||||
|
appendNewLine(content, indent) {
|
||||||
|
let line = new Line(indent);
|
||||||
|
line.append(content);
|
||||||
|
this.buffer.push(line.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addStringItem(file, item) {
|
XLF.parsePseudo = function (xlfString) {
|
||||||
if (!item.id || item.message === undefined || item.message === null) {
|
return new Promise((resolve) => {
|
||||||
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`);
|
let parser = new xml2js.Parser();
|
||||||
}
|
let files = [];
|
||||||
if (item.message.length === 0) {
|
parser.parseString(xlfString, function (_err, result) {
|
||||||
log(`Item with id ${item.id} in file ${file} has an empty message.`);
|
const fileNodes = result['xliff']['file'];
|
||||||
}
|
fileNodes.forEach(file => {
|
||||||
this.appendNewLine(`<trans-unit id="${item.id}">`, 4);
|
const originalFilePath = file.$.original;
|
||||||
this.appendNewLine(`<source xml:lang="en">${item.message}</source>`, 6);
|
const messages = {};
|
||||||
if (item.comment) {
|
const transUnits = file.body[0]['trans-unit'];
|
||||||
this.appendNewLine(`<note>${item.comment}</note>`, 6);
|
if (transUnits) {
|
||||||
}
|
transUnits.forEach((unit) => {
|
||||||
this.appendNewLine('</trans-unit>', 4);
|
const key = unit.$.id;
|
||||||
}
|
const val = pseudify(unit.source[0]['_'].toString());
|
||||||
appendHeader() {
|
if (key && val) {
|
||||||
this.appendNewLine('<?xml version="1.0" encoding="utf-8"?>', 0);
|
messages[key] = decodeEntities(val);
|
||||||
this.appendNewLine('<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">', 0);
|
}
|
||||||
}
|
});
|
||||||
appendFooter() {
|
files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' });
|
||||||
this.appendNewLine('</xliff>', 0);
|
}
|
||||||
}
|
});
|
||||||
appendNewLine(content, indent) {
|
resolve(files);
|
||||||
let line = new Line(indent);
|
});
|
||||||
line.append(content);
|
});
|
||||||
this.buffer.push(line.toString());
|
};
|
||||||
}
|
XLF.parse = function (xlfString) {
|
||||||
}
|
return new Promise((resolve, reject) => {
|
||||||
|
let parser = new xml2js.Parser();
|
||||||
|
let files = [];
|
||||||
|
parser.parseString(xlfString, function (err, result) {
|
||||||
|
if (err) {
|
||||||
|
reject(new Error(`XLF parsing error: Failed to parse XLIFF string. ${err}`));
|
||||||
|
}
|
||||||
|
const fileNodes = result['xliff']['file'];
|
||||||
|
if (!fileNodes) {
|
||||||
|
reject(new Error(`XLF parsing error: XLIFF file does not contain "xliff" or "file" node(s) required for parsing.`));
|
||||||
|
}
|
||||||
|
fileNodes.forEach((file) => {
|
||||||
|
const originalFilePath = file.$.original;
|
||||||
|
if (!originalFilePath) {
|
||||||
|
reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`));
|
||||||
|
}
|
||||||
|
let language = file.$['target-language'];
|
||||||
|
if (!language) {
|
||||||
|
reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`));
|
||||||
|
}
|
||||||
|
const messages = {};
|
||||||
|
const transUnits = file.body[0]['trans-unit'];
|
||||||
|
if (transUnits) {
|
||||||
|
transUnits.forEach((unit) => {
|
||||||
|
const key = unit.$.id;
|
||||||
|
if (!unit.target) {
|
||||||
|
return; // No translation available
|
||||||
|
}
|
||||||
|
let val = unit.target[0];
|
||||||
|
if (typeof val !== 'string') {
|
||||||
|
val = val._;
|
||||||
|
}
|
||||||
|
if (key && val) {
|
||||||
|
messages[key] = decodeEntities(val);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reject(new Error(`XLF parsing error: XLIFF file ${originalFilePath} does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
resolve(files);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return XLF;
|
||||||
|
})();
|
||||||
exports.XLF = XLF;
|
exports.XLF = XLF;
|
||||||
XLF.parsePseudo = function (xlfString) {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
let parser = new xml2js.Parser();
|
|
||||||
let files = [];
|
|
||||||
parser.parseString(xlfString, function (_err, result) {
|
|
||||||
const fileNodes = result['xliff']['file'];
|
|
||||||
fileNodes.forEach(file => {
|
|
||||||
const originalFilePath = file.$.original;
|
|
||||||
const messages = {};
|
|
||||||
const transUnits = file.body[0]['trans-unit'];
|
|
||||||
if (transUnits) {
|
|
||||||
transUnits.forEach((unit) => {
|
|
||||||
const key = unit.$.id;
|
|
||||||
const val = pseudify(unit.source[0]['_'].toString());
|
|
||||||
if (key && val) {
|
|
||||||
messages[key] = decodeEntities(val);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resolve(files);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
XLF.parse = function (xlfString) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
let parser = new xml2js.Parser();
|
|
||||||
let files = [];
|
|
||||||
parser.parseString(xlfString, function (err, result) {
|
|
||||||
if (err) {
|
|
||||||
reject(new Error(`XLF parsing error: Failed to parse XLIFF string. ${err}`));
|
|
||||||
}
|
|
||||||
const fileNodes = result['xliff']['file'];
|
|
||||||
if (!fileNodes) {
|
|
||||||
reject(new Error(`XLF parsing error: XLIFF file does not contain "xliff" or "file" node(s) required for parsing.`));
|
|
||||||
}
|
|
||||||
fileNodes.forEach((file) => {
|
|
||||||
const originalFilePath = file.$.original;
|
|
||||||
if (!originalFilePath) {
|
|
||||||
reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`));
|
|
||||||
}
|
|
||||||
let language = file.$['target-language'];
|
|
||||||
if (!language) {
|
|
||||||
reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`));
|
|
||||||
}
|
|
||||||
const messages = {};
|
|
||||||
const transUnits = file.body[0]['trans-unit'];
|
|
||||||
if (transUnits) {
|
|
||||||
transUnits.forEach((unit) => {
|
|
||||||
const key = unit.$.id;
|
|
||||||
if (!unit.target) {
|
|
||||||
return; // No translation available
|
|
||||||
}
|
|
||||||
let val = unit.target[0];
|
|
||||||
if (typeof val !== 'string') {
|
|
||||||
val = val._;
|
|
||||||
}
|
|
||||||
if (key && val) {
|
|
||||||
messages[key] = decodeEntities(val);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
reject(new Error(`XLF parsing error: XLIFF file ${originalFilePath} does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.`));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resolve(files);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
class Limiter {
|
class Limiter {
|
||||||
constructor(maxDegreeOfParalellism) {
|
constructor(maxDegreeOfParalellism) {
|
||||||
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
||||||
@@ -1147,7 +1150,12 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
|
|||||||
if (line.length > 0) {
|
if (line.length > 0) {
|
||||||
let firstChar = line.charAt(0);
|
let firstChar = line.charAt(0);
|
||||||
if (firstChar === '[' || firstChar === ';') {
|
if (firstChar === '[' || firstChar === ';') {
|
||||||
content.push(line);
|
if (line === '; *** Inno Setup version 5.5.3+ English messages ***') {
|
||||||
|
content.push(`; *** Inno Setup version 5.5.3+ ${innoSetup.defaultInfo.name} messages ***`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
content.push(line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let sections = line.split('=');
|
let sections = line.split('=');
|
||||||
@@ -1176,10 +1184,9 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
|
|||||||
});
|
});
|
||||||
const basename = path.basename(originalFilePath);
|
const basename = path.basename(originalFilePath);
|
||||||
const filePath = `${basename}.${language.id}.isl`;
|
const filePath = `${basename}.${language.id}.isl`;
|
||||||
const encoded = iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage);
|
|
||||||
return new File({
|
return new File({
|
||||||
path: filePath,
|
path: filePath,
|
||||||
contents: Buffer.from(encoded),
|
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function encodeEntities(value) {
|
function encodeEntities(value) {
|
||||||
|
|||||||
@@ -94,10 +94,6 @@
|
|||||||
"name": "vs/workbench/contrib/issue",
|
"name": "vs/workbench/contrib/issue",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/contrib/keybindings",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/contrib/markers",
|
"name": "vs/workbench/contrib/markers",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
@@ -142,10 +138,6 @@
|
|||||||
"name": "vs/workbench/contrib/relauncher",
|
"name": "vs/workbench/contrib/relauncher",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/contrib/sash",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/contrib/scm",
|
"name": "vs/workbench/contrib/scm",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
@@ -222,10 +214,6 @@
|
|||||||
"name": "vs/workbench/contrib/userDataSync",
|
"name": "vs/workbench/contrib/userDataSync",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/contrib/views",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/services/actions",
|
"name": "vs/workbench/services/actions",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
@@ -250,6 +238,10 @@
|
|||||||
"name": "vs/workbench/services/configurationResolver",
|
"name": "vs/workbench/services/configurationResolver",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "vs/workbench/services/crashReporter",
|
||||||
|
"project": "vscode-workbench"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/services/dialogs",
|
"name": "vs/workbench/services/dialogs",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
@@ -346,10 +338,6 @@
|
|||||||
"name": "vs/workbench/services/userDataSync",
|
"name": "vs/workbench/services/userDataSync",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/services/views",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/contrib/timeline",
|
"name": "vs/workbench/contrib/timeline",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import * as https from 'https';
|
|||||||
import * as gulp from 'gulp';
|
import * as gulp from 'gulp';
|
||||||
import * as fancyLog from 'fancy-log';
|
import * as fancyLog from 'fancy-log';
|
||||||
import * as ansiColors from 'ansi-colors';
|
import * as ansiColors from 'ansi-colors';
|
||||||
import * as iconv from 'iconv-lite-umd';
|
import * as iconv from 'iconv-lite';
|
||||||
|
|
||||||
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
||||||
|
|
||||||
@@ -1316,7 +1316,11 @@ function createIslFile(originalFilePath: string, messages: Map<string>, language
|
|||||||
if (line.length > 0) {
|
if (line.length > 0) {
|
||||||
let firstChar = line.charAt(0);
|
let firstChar = line.charAt(0);
|
||||||
if (firstChar === '[' || firstChar === ';') {
|
if (firstChar === '[' || firstChar === ';') {
|
||||||
content.push(line);
|
if (line === '; *** Inno Setup version 5.5.3+ English messages ***') {
|
||||||
|
content.push(`; *** Inno Setup version 5.5.3+ ${innoSetup.defaultInfo!.name} messages ***`);
|
||||||
|
} else {
|
||||||
|
content.push(line);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let sections: string[] = line.split('=');
|
let sections: string[] = line.split('=');
|
||||||
let key = sections[0];
|
let key = sections[0];
|
||||||
@@ -1343,11 +1347,10 @@ function createIslFile(originalFilePath: string, messages: Map<string>, language
|
|||||||
|
|
||||||
const basename = path.basename(originalFilePath);
|
const basename = path.basename(originalFilePath);
|
||||||
const filePath = `${basename}.${language.id}.isl`;
|
const filePath = `${basename}.${language.id}.isl`;
|
||||||
const encoded = iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage);
|
|
||||||
|
|
||||||
return new File({
|
return new File({
|
||||||
path: filePath,
|
path: filePath,
|
||||||
contents: Buffer.from(encoded),
|
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,14 +130,6 @@ const RULES = [
|
|||||||
'lib.dom.d.ts' // no DOM
|
'lib.dom.d.ts' // no DOM
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// Electron (sandbox)
|
|
||||||
{
|
|
||||||
target: '**/vs/**/electron-sandbox/**',
|
|
||||||
allowedTypes: CORE_TYPES,
|
|
||||||
disallowedDefinitions: [
|
|
||||||
'@types/node' // no node.js
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// Electron (renderer): skip
|
// Electron (renderer): skip
|
||||||
{
|
{
|
||||||
target: '**/{vs,sql}/**/electron-browser/**',
|
target: '**/{vs,sql}/**/electron-browser/**',
|
||||||
|
|||||||
@@ -143,15 +143,6 @@ const RULES = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Electron (sandbox)
|
|
||||||
{
|
|
||||||
target: '**/vs/**/electron-sandbox/**',
|
|
||||||
allowedTypes: CORE_TYPES,
|
|
||||||
disallowedDefinitions: [
|
|
||||||
'@types/node' // no node.js
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// Electron (renderer): skip
|
// Electron (renderer): skip
|
||||||
{
|
{
|
||||||
target: '**/{vs,sql}/**/electron-browser/**',
|
target: '**/{vs,sql}/**/electron-browser/**',
|
||||||
|
|||||||
@@ -28,15 +28,14 @@ const REPO_ROOT_PATH = path.join(__dirname, '../..');
|
|||||||
function log(prefix, message) {
|
function log(prefix, message) {
|
||||||
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
||||||
}
|
}
|
||||||
function loaderConfig() {
|
function loaderConfig(emptyPaths) {
|
||||||
const result = {
|
const result = {
|
||||||
paths: {
|
paths: {
|
||||||
'vs': 'out-build/vs',
|
'vs': 'out-build/vs',
|
||||||
'sql': 'out-build/sql',
|
'sql': 'out-build/sql',
|
||||||
'vscode': 'empty:',
|
'vscode': 'empty:'
|
||||||
'azdata': 'empty:' // {{SQL CARBON EDIT}}
|
|
||||||
},
|
},
|
||||||
amdModulesPattern: /^(vs|sql)\// // {{SQL CARBON EDIT}} include sql in regex
|
nodeModules: emptyPaths || []
|
||||||
};
|
};
|
||||||
result['vs/css'] = { inlineResources: true };
|
result['vs/css'] = { inlineResources: true };
|
||||||
return result;
|
return result;
|
||||||
@@ -72,7 +71,7 @@ function loader(src, bundledFileHeader, bundleLoader) {
|
|||||||
}))
|
}))
|
||||||
.pipe(concat('vs/loader.js')));
|
.pipe(concat('vs/loader.js')));
|
||||||
}
|
}
|
||||||
function toConcatStream(src, bundledFileHeader, sources, dest, fileContentMapper) {
|
function toConcatStream(src, bundledFileHeader, sources, dest) {
|
||||||
const useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest);
|
const useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest);
|
||||||
// If a bundle ends up including in any of the sources our copyright, then
|
// If a bundle ends up including in any of the sources our copyright, then
|
||||||
// insert a fake source at the beginning of each bundle with our copyright
|
// insert a fake source at the beginning of each bundle with our copyright
|
||||||
@@ -93,12 +92,10 @@ function toConcatStream(src, bundledFileHeader, sources, dest, fileContentMapper
|
|||||||
const treatedSources = sources.map(function (source) {
|
const treatedSources = sources.map(function (source) {
|
||||||
const root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : '';
|
const root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : '';
|
||||||
const base = source.path ? root + `/${src}` : '';
|
const base = source.path ? root + `/${src}` : '';
|
||||||
const path = source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake';
|
|
||||||
const contents = source.path ? fileContentMapper(source.contents, path) : source.contents;
|
|
||||||
return new VinylFile({
|
return new VinylFile({
|
||||||
path: path,
|
path: source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake',
|
||||||
base: base,
|
base: base,
|
||||||
contents: Buffer.from(contents)
|
contents: Buffer.from(source.contents)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return es.readArray(treatedSources)
|
return es.readArray(treatedSources)
|
||||||
@@ -106,9 +103,9 @@ function toConcatStream(src, bundledFileHeader, sources, dest, fileContentMapper
|
|||||||
.pipe(concat(dest))
|
.pipe(concat(dest))
|
||||||
.pipe(stats_1.createStatsStream(dest));
|
.pipe(stats_1.createStatsStream(dest));
|
||||||
}
|
}
|
||||||
function toBundleStream(src, bundledFileHeader, bundles, fileContentMapper) {
|
function toBundleStream(src, bundledFileHeader, bundles) {
|
||||||
return es.merge(bundles.map(function (bundle) {
|
return es.merge(bundles.map(function (bundle) {
|
||||||
return toConcatStream(src, bundledFileHeader, bundle.sources, bundle.dest, fileContentMapper);
|
return toConcatStream(src, bundledFileHeader, bundle.sources, bundle.dest);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
const DEFAULT_FILE_HEADER = [
|
const DEFAULT_FILE_HEADER = [
|
||||||
@@ -124,7 +121,6 @@ function optimizeTask(opts) {
|
|||||||
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
|
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
|
||||||
const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
|
const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
|
||||||
const out = opts.out;
|
const out = opts.out;
|
||||||
const fileContentMapper = opts.fileContentMapper || ((contents, _path) => contents);
|
|
||||||
return function () {
|
return function () {
|
||||||
const bundlesStream = es.through(); // this stream will contain the bundled files
|
const bundlesStream = es.through(); // this stream will contain the bundled files
|
||||||
const resourcesStream = es.through(); // this stream will contain the resources
|
const resourcesStream = es.through(); // this stream will contain the resources
|
||||||
@@ -133,7 +129,7 @@ function optimizeTask(opts) {
|
|||||||
if (err || !result) {
|
if (err || !result) {
|
||||||
return bundlesStream.emit('error', JSON.stringify(err));
|
return bundlesStream.emit('error', JSON.stringify(err));
|
||||||
}
|
}
|
||||||
toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
|
toBundleStream(src, bundledFileHeader, result.files).pipe(bundlesStream);
|
||||||
// Remove css inlined resources
|
// Remove css inlined resources
|
||||||
const filteredResources = resources.slice();
|
const filteredResources = resources.slice();
|
||||||
result.cssInlinedResources.forEach(function (resource) {
|
result.cssInlinedResources.forEach(function (resource) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import * as fancyLog from 'fancy-log';
|
|||||||
import * as ansiColors from 'ansi-colors';
|
import * as ansiColors from 'ansi-colors';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as pump from 'pump';
|
import * as pump from 'pump';
|
||||||
|
import * as sm from 'source-map';
|
||||||
import * as terser from 'terser';
|
import * as terser from 'terser';
|
||||||
import * as VinylFile from 'vinyl';
|
import * as VinylFile from 'vinyl';
|
||||||
import * as bundle from './bundle';
|
import * as bundle from './bundle';
|
||||||
@@ -31,15 +32,14 @@ function log(prefix: string, message: string): void {
|
|||||||
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loaderConfig() {
|
export function loaderConfig(emptyPaths?: string[]) {
|
||||||
const result: any = {
|
const result: any = {
|
||||||
paths: {
|
paths: {
|
||||||
'vs': 'out-build/vs',
|
'vs': 'out-build/vs',
|
||||||
'sql': 'out-build/sql', // {{SQL CARBON EDIT}}
|
'sql': 'out-build/sql', // {{SQL CARBON EDIT}}
|
||||||
'vscode': 'empty:',
|
'vscode': 'empty:'
|
||||||
'azdata': 'empty:' // {{SQL CARBON EDIT}}
|
|
||||||
},
|
},
|
||||||
amdModulesPattern: /^(vs|sql)\// // {{SQL CARBON EDIT}} include sql in regex
|
nodeModules: emptyPaths || []
|
||||||
};
|
};
|
||||||
|
|
||||||
result['vs/css'] = { inlineResources: true };
|
result['vs/css'] = { inlineResources: true };
|
||||||
@@ -49,6 +49,10 @@ export function loaderConfig() {
|
|||||||
|
|
||||||
const IS_OUR_COPYRIGHT_REGEXP = /Copyright \(C\) Microsoft Corporation/i;
|
const IS_OUR_COPYRIGHT_REGEXP = /Copyright \(C\) Microsoft Corporation/i;
|
||||||
|
|
||||||
|
declare class FileSourceMap extends VinylFile {
|
||||||
|
public sourceMap: sm.RawSourceMap;
|
||||||
|
}
|
||||||
|
|
||||||
function loader(src: string, bundledFileHeader: string, bundleLoader: boolean): NodeJS.ReadWriteStream {
|
function loader(src: string, bundledFileHeader: string, bundleLoader: boolean): NodeJS.ReadWriteStream {
|
||||||
let sources = [
|
let sources = [
|
||||||
`${src}/vs/loader.js`
|
`${src}/vs/loader.js`
|
||||||
@@ -81,7 +85,7 @@ function loader(src: string, bundledFileHeader: string, bundleLoader: boolean):
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toConcatStream(src: string, bundledFileHeader: string, sources: bundle.IFile[], dest: string, fileContentMapper: (contents: string, path: string) => string): NodeJS.ReadWriteStream {
|
function toConcatStream(src: string, bundledFileHeader: string, sources: bundle.IFile[], dest: string): NodeJS.ReadWriteStream {
|
||||||
const useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest);
|
const useSourcemaps = /\.js$/.test(dest) && !/\.nls\.js$/.test(dest);
|
||||||
|
|
||||||
// If a bundle ends up including in any of the sources our copyright, then
|
// If a bundle ends up including in any of the sources our copyright, then
|
||||||
@@ -105,13 +109,11 @@ function toConcatStream(src: string, bundledFileHeader: string, sources: bundle.
|
|||||||
const treatedSources = sources.map(function (source) {
|
const treatedSources = sources.map(function (source) {
|
||||||
const root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : '';
|
const root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : '';
|
||||||
const base = source.path ? root + `/${src}` : '';
|
const base = source.path ? root + `/${src}` : '';
|
||||||
const path = source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake';
|
|
||||||
const contents = source.path ? fileContentMapper(source.contents, path) : source.contents;
|
|
||||||
|
|
||||||
return new VinylFile({
|
return new VinylFile({
|
||||||
path: path,
|
path: source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake',
|
||||||
base: base,
|
base: base,
|
||||||
contents: Buffer.from(contents)
|
contents: Buffer.from(source.contents)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -121,9 +123,9 @@ function toConcatStream(src: string, bundledFileHeader: string, sources: bundle.
|
|||||||
.pipe(createStatsStream(dest));
|
.pipe(createStatsStream(dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
function toBundleStream(src: string, bundledFileHeader: string, bundles: bundle.IConcatFile[], fileContentMapper: (contents: string, path: string) => string): NodeJS.ReadWriteStream {
|
function toBundleStream(src: string, bundledFileHeader: string, bundles: bundle.IConcatFile[]): NodeJS.ReadWriteStream {
|
||||||
return es.merge(bundles.map(function (bundle) {
|
return es.merge(bundles.map(function (bundle) {
|
||||||
return toConcatStream(src, bundledFileHeader, bundle.sources, bundle.dest, fileContentMapper);
|
return toConcatStream(src, bundledFileHeader, bundle.sources, bundle.dest);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,12 +163,6 @@ export interface IOptimizeTaskOpts {
|
|||||||
* (out folder name)
|
* (out folder name)
|
||||||
*/
|
*/
|
||||||
languages?: Language[];
|
languages?: Language[];
|
||||||
/**
|
|
||||||
* File contents interceptor
|
|
||||||
* @param contents The contens of the file
|
|
||||||
* @param path The absolute file path, always using `/`, even on Windows
|
|
||||||
*/
|
|
||||||
fileContentMapper?: (contents: string, path: string) => string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_FILE_HEADER = [
|
const DEFAULT_FILE_HEADER = [
|
||||||
@@ -183,7 +179,6 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
|
|||||||
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
|
const bundledFileHeader = opts.header || DEFAULT_FILE_HEADER;
|
||||||
const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
|
const bundleLoader = (typeof opts.bundleLoader === 'undefined' ? true : opts.bundleLoader);
|
||||||
const out = opts.out;
|
const out = opts.out;
|
||||||
const fileContentMapper = opts.fileContentMapper || ((contents: string, _path: string) => contents);
|
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
const bundlesStream = es.through(); // this stream will contain the bundled files
|
const bundlesStream = es.through(); // this stream will contain the bundled files
|
||||||
@@ -193,7 +188,7 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr
|
|||||||
bundle.bundle(entryPoints, loaderConfig, function (err, result) {
|
bundle.bundle(entryPoints, loaderConfig, function (err, result) {
|
||||||
if (err || !result) { return bundlesStream.emit('error', JSON.stringify(err)); }
|
if (err || !result) { return bundlesStream.emit('error', JSON.stringify(err)); }
|
||||||
|
|
||||||
toBundleStream(src, bundledFileHeader, result.files, fileContentMapper).pipe(bundlesStream);
|
toBundleStream(src, bundledFileHeader, result.files).pipe(bundlesStream);
|
||||||
|
|
||||||
// Remove css inlined resources
|
// Remove css inlined resources
|
||||||
const filteredResources = resources.slice();
|
const filteredResources = resources.slice();
|
||||||
|
|||||||
@@ -1,55 +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';
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
// @ts-check
|
|
||||||
const path = require("path");
|
|
||||||
const child_process_1 = require("child_process");
|
|
||||||
const fs_1 = require("fs");
|
|
||||||
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
|
|
||||||
const rootDir = path.resolve(__dirname, '..', '..');
|
|
||||||
function runProcess(command, args = []) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const child = child_process_1.spawn(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env });
|
|
||||||
child.on('exit', err => !err ? resolve() : process.exit(err !== null && err !== void 0 ? err : 1));
|
|
||||||
child.on('error', reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function exists(subdir) {
|
|
||||||
try {
|
|
||||||
await fs_1.promises.stat(path.join(rootDir, subdir));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (_a) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function ensureNodeModules() {
|
|
||||||
if (!(await exists('node_modules'))) {
|
|
||||||
await runProcess(yarn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function getElectron() {
|
|
||||||
await runProcess(yarn, ['electron']);
|
|
||||||
}
|
|
||||||
async function ensureCompiled() {
|
|
||||||
if (!(await exists('out'))) {
|
|
||||||
await runProcess(yarn, ['compile']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function main() {
|
|
||||||
await ensureNodeModules();
|
|
||||||
await getElectron();
|
|
||||||
await ensureCompiled();
|
|
||||||
// Can't require this until after dependencies are installed
|
|
||||||
const { getBuiltInExtensions } = require('./builtInExtensions');
|
|
||||||
await getBuiltInExtensions();
|
|
||||||
}
|
|
||||||
if (require.main === module) {
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,65 +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';
|
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
import * as path from 'path';
|
|
||||||
import { spawn } from 'child_process';
|
|
||||||
import { promises as fs } from 'fs';
|
|
||||||
|
|
||||||
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
|
|
||||||
const rootDir = path.resolve(__dirname, '..', '..');
|
|
||||||
|
|
||||||
function runProcess(command: string, args: ReadonlyArray<string> = []) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const child = spawn(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env });
|
|
||||||
child.on('exit', err => !err ? resolve() : process.exit(err ?? 1));
|
|
||||||
child.on('error', reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function exists(subdir: string) {
|
|
||||||
try {
|
|
||||||
await fs.stat(path.join(rootDir, subdir));
|
|
||||||
return true;
|
|
||||||
} catch {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function ensureNodeModules() {
|
|
||||||
if (!(await exists('node_modules'))) {
|
|
||||||
await runProcess(yarn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getElectron() {
|
|
||||||
await runProcess(yarn, ['electron']);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function ensureCompiled() {
|
|
||||||
if (!(await exists('out'))) {
|
|
||||||
await runProcess(yarn, ['compile']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
await ensureNodeModules();
|
|
||||||
await getElectron();
|
|
||||||
await ensureCompiled();
|
|
||||||
|
|
||||||
// Can't require this until after dependencies are installed
|
|
||||||
const { getBuiltInExtensions } = require('./builtInExtensions');
|
|
||||||
await getBuiltInExtensions();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (require.main === module) {
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -420,7 +420,7 @@ function markNodes(languageService, options) {
|
|||||||
// (they can be the declaration of a module import)
|
// (they can be the declaration of a module import)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (options.shakeLevel === 2 /* ClassMembers */ && (ts.isClassDeclaration(declaration) || ts.isInterfaceDeclaration(declaration)) && !isLocalCodeExtendingOrInheritingFromDefaultLibSymbol(program, checker, declaration)) {
|
if (options.shakeLevel === 2 /* ClassMembers */ && (ts.isClassDeclaration(declaration) || ts.isInterfaceDeclaration(declaration))) {
|
||||||
enqueue_black(declaration.name);
|
enqueue_black(declaration.name);
|
||||||
for (let j = 0; j < declaration.members.length; j++) {
|
for (let j = 0; j < declaration.members.length; j++) {
|
||||||
const member = declaration.members[j];
|
const member = declaration.members[j];
|
||||||
@@ -614,34 +614,6 @@ function generateResult(languageService, shakeLevel) {
|
|||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
//#region Utils
|
//#region Utils
|
||||||
function isLocalCodeExtendingOrInheritingFromDefaultLibSymbol(program, checker, declaration) {
|
|
||||||
if (!program.isSourceFileDefaultLibrary(declaration.getSourceFile()) && declaration.heritageClauses) {
|
|
||||||
for (const heritageClause of declaration.heritageClauses) {
|
|
||||||
for (const type of heritageClause.types) {
|
|
||||||
const symbol = findSymbolFromHeritageType(checker, type);
|
|
||||||
if (symbol) {
|
|
||||||
const decl = symbol.valueDeclaration || (symbol.declarations && symbol.declarations[0]);
|
|
||||||
if (decl && program.isSourceFileDefaultLibrary(decl.getSourceFile())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
function findSymbolFromHeritageType(checker, type) {
|
|
||||||
if (ts.isExpressionWithTypeArguments(type)) {
|
|
||||||
return findSymbolFromHeritageType(checker, type.expression);
|
|
||||||
}
|
|
||||||
if (ts.isIdentifier(type)) {
|
|
||||||
return getRealNodeSymbol(checker, type)[0];
|
|
||||||
}
|
|
||||||
if (ts.isPropertyAccessExpression(type)) {
|
|
||||||
return findSymbolFromHeritageType(checker, type.name);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Returns the node's symbol and the `import` node (if the symbol resolved from a different module)
|
* Returns the node's symbol and the `import` node (if the symbol resolved from a different module)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ function markNodes(languageService: ts.LanguageService, options: ITreeShakingOpt
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.shakeLevel === ShakeLevel.ClassMembers && (ts.isClassDeclaration(declaration) || ts.isInterfaceDeclaration(declaration)) && !isLocalCodeExtendingOrInheritingFromDefaultLibSymbol(program, checker, declaration)) {
|
if (options.shakeLevel === ShakeLevel.ClassMembers && (ts.isClassDeclaration(declaration) || ts.isInterfaceDeclaration(declaration))) {
|
||||||
enqueue_black(declaration.name!);
|
enqueue_black(declaration.name!);
|
||||||
|
|
||||||
for (let j = 0; j < declaration.members.length; j++) {
|
for (let j = 0; j < declaration.members.length; j++) {
|
||||||
@@ -752,36 +752,6 @@ function generateResult(languageService: ts.LanguageService, shakeLevel: ShakeLe
|
|||||||
|
|
||||||
//#region Utils
|
//#region Utils
|
||||||
|
|
||||||
function isLocalCodeExtendingOrInheritingFromDefaultLibSymbol(program: ts.Program, checker: ts.TypeChecker, declaration: ts.ClassDeclaration | ts.InterfaceDeclaration): boolean {
|
|
||||||
if (!program.isSourceFileDefaultLibrary(declaration.getSourceFile()) && declaration.heritageClauses) {
|
|
||||||
for (const heritageClause of declaration.heritageClauses) {
|
|
||||||
for (const type of heritageClause.types) {
|
|
||||||
const symbol = findSymbolFromHeritageType(checker, type);
|
|
||||||
if (symbol) {
|
|
||||||
const decl = symbol.valueDeclaration || (symbol.declarations && symbol.declarations[0]);
|
|
||||||
if (decl && program.isSourceFileDefaultLibrary(decl.getSourceFile())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function findSymbolFromHeritageType(checker: ts.TypeChecker, type: ts.ExpressionWithTypeArguments | ts.Expression | ts.PrivateIdentifier): ts.Symbol | null {
|
|
||||||
if (ts.isExpressionWithTypeArguments(type)) {
|
|
||||||
return findSymbolFromHeritageType(checker, type.expression);
|
|
||||||
}
|
|
||||||
if (ts.isIdentifier(type)) {
|
|
||||||
return getRealNodeSymbol(checker, type)[0];
|
|
||||||
}
|
|
||||||
if (ts.isPropertyAccessExpression(type)) {
|
|
||||||
return findSymbolFromHeritageType(checker, type.name);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the node's symbol and the `import` node (if the symbol resolved from a different module)
|
* Returns the node's symbol and the `import` node (if the symbol resolved from a different module)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getElectronVersion = exports.streamToPromise = exports.versionStringToNumber = exports.filter = exports.rebase = exports.getVersion = exports.ensureDir = exports.rreddir = exports.rimraf = exports.stripSourceMappingURL = exports.loadSourcemaps = exports.cleanNodeModules = exports.skipDirectories = exports.toFileUri = exports.setExecutableBit = exports.fixWin32DirectoryPermissions = exports.incremental = void 0;
|
exports.streamToPromise = exports.versionStringToNumber = exports.filter = exports.rebase = exports.getVersion = exports.ensureDir = exports.rreddir = exports.rimraf = exports.stripSourceMappingURL = exports.loadSourcemaps = exports.cleanNodeModules = exports.skipDirectories = exports.toFileUri = exports.setExecutableBit = exports.fixWin32DirectoryPermissions = exports.incremental = void 0;
|
||||||
const es = require("event-stream");
|
const es = require("event-stream");
|
||||||
const debounce = require("debounce");
|
const debounce = require("debounce");
|
||||||
const _filter = require("gulp-filter");
|
const _filter = require("gulp-filter");
|
||||||
@@ -14,7 +14,6 @@ const fs = require("fs");
|
|||||||
const _rimraf = require("rimraf");
|
const _rimraf = require("rimraf");
|
||||||
const git = require("./git");
|
const git = require("./git");
|
||||||
const VinylFile = require("vinyl");
|
const VinylFile = require("vinyl");
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
|
||||||
const NoCancellationToken = { isCancellationRequested: () => false };
|
const NoCancellationToken = { isCancellationRequested: () => false };
|
||||||
function incremental(streamProvider, initial, supportsCancellation) {
|
function incremental(streamProvider, initial, supportsCancellation) {
|
||||||
const input = es.through();
|
const input = es.through();
|
||||||
@@ -138,7 +137,7 @@ function loadSourcemaps() {
|
|||||||
version: '3',
|
version: '3',
|
||||||
names: [],
|
names: [],
|
||||||
mappings: '',
|
mappings: '',
|
||||||
sources: [f.relative],
|
sources: [f.relative.replace(/\//g, '/')],
|
||||||
sourcesContent: [contents]
|
sourcesContent: [contents]
|
||||||
};
|
};
|
||||||
cb(undefined, f);
|
cb(undefined, f);
|
||||||
@@ -256,9 +255,3 @@ function streamToPromise(stream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.streamToPromise = streamToPromise;
|
exports.streamToPromise = streamToPromise;
|
||||||
function getElectronVersion() {
|
|
||||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
|
||||||
const target = /^target "(.*)"$/m.exec(yarnrc)[1];
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
exports.getElectronVersion = getElectronVersion;
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import * as VinylFile from 'vinyl';
|
|||||||
import { ThroughStream } from 'through';
|
import { ThroughStream } from 'through';
|
||||||
import * as sm from 'source-map';
|
import * as sm from 'source-map';
|
||||||
|
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
|
||||||
|
|
||||||
export interface ICancellationToken {
|
export interface ICancellationToken {
|
||||||
isCancellationRequested(): boolean;
|
isCancellationRequested(): boolean;
|
||||||
}
|
}
|
||||||
@@ -186,7 +184,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream {
|
|||||||
version: '3',
|
version: '3',
|
||||||
names: [],
|
names: [],
|
||||||
mappings: '',
|
mappings: '',
|
||||||
sources: [f.relative],
|
sources: [f.relative.replace(/\//g, '/')],
|
||||||
sourcesContent: [contents]
|
sourcesContent: [contents]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -320,9 +318,3 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
|
|||||||
stream.on('end', () => c());
|
stream.on('end', () => c());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getElectronVersion(): string {
|
|
||||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
|
||||||
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ function yarnInstall(location, opts) {
|
|||||||
|
|
||||||
yarnInstall('extensions'); // node modules shared by all extensions
|
yarnInstall('extensions'); // node modules shared by all extensions
|
||||||
|
|
||||||
if (!(process.platform === 'win32' && (process.arch === 'arm64' || process.env['npm_config_arch'] === 'arm64'))) {
|
yarnInstall('remote'); // node modules used by vscode server
|
||||||
yarnInstall('remote'); // node modules used by vscode server
|
|
||||||
yarnInstall('remote/web'); // node modules used by vscode web
|
yarnInstall('remote/web'); // node modules used by vscode web
|
||||||
}
|
|
||||||
|
|
||||||
const allExtensionFolders = fs.readdirSync('extensions');
|
const allExtensionFolders = fs.readdirSync('extensions');
|
||||||
const extensions = allExtensionFolders.filter(e => {
|
const extensions = allExtensionFolders.filter(e => {
|
||||||
@@ -73,5 +72,3 @@ yarnInstall('test/automation'); // node modules required for smoketest
|
|||||||
yarnInstall('test/smoke'); // node modules required for smoketest
|
yarnInstall('test/smoke'); // node modules required for smoketest
|
||||||
yarnInstall('test/integration/browser'); // node modules required for integration
|
yarnInstall('test/integration/browser'); // node modules required for integration
|
||||||
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
|
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
|
||||||
|
|
||||||
cp.execSync('git config pull.rebase true');
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user