├── .devcontainer ├── Dockerfile ├── base.Dockerfile └── devcontainer.json ├── .github └── workflows │ └── main.yml ├── .gitignore ├── LICENSE ├── README.md ├── SECURITY.md ├── action.yml ├── dist ├── index.js └── xdg-open ├── index.js ├── package-lock.json ├── package.json ├── storage-accounts.svg └── workflows-samples ├── blazor-web-assembly.yml ├── blob-container-as-cdn.yml ├── spa-react.yml └── static-web-site.yml /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster 2 | ARG VARIANT=16-bullseye 3 | FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} 4 | 5 | # [Optional] Uncomment this section to install additional OS packages. 6 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 7 | # && apt-get -y install --no-install-recommends 8 | 9 | # [Optional] Uncomment if you want to install an additional version of node using nvm 10 | # ARG EXTRA_NODE_VERSION=10 11 | # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" 12 | 13 | # [Optional] Uncomment if you want to install more global node modules 14 | # RUN su node -c "npm install -g " 15 | -------------------------------------------------------------------------------- /.devcontainer/base.Dockerfile: -------------------------------------------------------------------------------- 1 | # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster 2 | ARG VARIANT=16-bullseye 3 | FROM node:${VARIANT} 4 | 5 | # [Option] Install zsh 6 | ARG INSTALL_ZSH="true" 7 | # [Option] Upgrade OS packages to their latest versions 8 | ARG UPGRADE_PACKAGES="true" 9 | 10 | # Install needed packages, yarn, nvm and setup non-root user. Use a separate RUN statement to add your own dependencies. 11 | ARG USERNAME=node 12 | ARG USER_UID=1000 13 | ARG USER_GID=$USER_UID 14 | ARG NPM_GLOBAL=/usr/local/share/npm-global 15 | ENV NVM_DIR=/usr/local/share/nvm 16 | ENV NVM_SYMLINK_CURRENT=true \ 17 | PATH=${NPM_GLOBAL}/bin:${NVM_DIR}/current/bin:${PATH} 18 | COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/ 19 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 20 | # Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131 21 | && apt-get purge -y imagemagick imagemagick-6-common \ 22 | # Install common packages, non-root user, update yarn and install nvm 23 | && bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ 24 | # Install yarn, nvm 25 | && rm -rf /opt/yarn-* /usr/local/bin/yarn /usr/local/bin/yarnpkg \ 26 | && bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \ 27 | # Configure global npm install location, use group to adapt to UID/GID changes 28 | && if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \ 29 | && usermod -a -G npm ${USERNAME} \ 30 | && umask 0002 \ 31 | && mkdir -p ${NPM_GLOBAL} \ 32 | && touch /usr/local/etc/npmrc \ 33 | && chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \ 34 | && chmod g+s ${NPM_GLOBAL} \ 35 | && npm config -g set prefix ${NPM_GLOBAL} \ 36 | && sudo -u ${USERNAME} npm config -g set prefix ${NPM_GLOBAL} \ 37 | # Install eslint 38 | && su ${USERNAME} -c "umask 0002 && npm install -g eslint" \ 39 | && npm cache clean --force > /dev/null 2>&1 \ 40 | # Install python-is-python3 on bullseye to prevent node-gyp regressions 41 | && . /etc/os-release \ 42 | && if [ "${VERSION_CODENAME}" = "bullseye" ]; then apt-get -y install --no-install-recommends python-is-python3; fi \ 43 | # Clean up 44 | && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /root/.gnupg /tmp/library-scripts 45 | 46 | # [Optional] Uncomment this section to install additional OS packages. 47 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 48 | # && apt-get -y install --no-install-recommends 49 | 50 | # [Optional] Uncomment if you want to install an additional version of node using nvm 51 | # ARG EXTRA_NODE_VERSION=10 52 | # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" 53 | 54 | # [Optional] Uncomment if you want to install more global node modules 55 | # RUN su node -c "npm install -g "" -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/javascript-node 3 | { 4 | "name": "Node.js", 5 | "build": { 6 | "dockerfile": "Dockerfile", 7 | // Update 'VARIANT' to pick a Node version: 18, 16, 14. 8 | // Append -bullseye or -buster to pin to an OS version. 9 | // Use -bullseye variants on local arm64/Apple Silicon. 10 | "args": { "VARIANT": "16-bullseye" } 11 | }, 12 | 13 | // Configure tool-specific properties. 14 | "customizations": { 15 | // Configure properties specific to VS Code. 16 | "vscode": { 17 | // Add the IDs of extensions you want installed when the container is created. 18 | "extensions": [ 19 | "dbaeumer.vscode-eslint" 20 | ] 21 | } 22 | }, 23 | 24 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 25 | // "forwardPorts": [], 26 | 27 | // Use 'postCreateCommand' to run commands after the container is created. 28 | // "postCreateCommand": "yarn install", 29 | 30 | // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 31 | "remoteUser": "node" 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build and Test 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | - releases/* 9 | 10 | jobs: 11 | build: 12 | name: 'Build and test job' 13 | runs-on: ${{ matrix.os }} 14 | strategy: 15 | matrix: 16 | os: [windows-latest, ubuntu-latest, macos-latest] 17 | steps: 18 | - name: 'Checkout the code' 19 | uses: actions/checkout@v3 20 | with: 21 | ref: ${{ github.ref }} 22 | 23 | - name: Install nodejs 24 | uses: actions/setup-node@v3 25 | with: 26 | node-version: 16 27 | 28 | - name: 'Validate Build' 29 | run: | 30 | npm install 31 | npm run build 32 | 33 | - name: 'Test Build' 34 | run: | 35 | npm test --if-exists 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.*~ 3 | project.lock.json 4 | .DS_Store 5 | *.pyc 6 | nupkg/ 7 | 8 | # Visual Studio Code 9 | .vscode 10 | 11 | # Rider 12 | .idea 13 | 14 | # User-specific files 15 | *.suo 16 | *.user 17 | *.userosscache 18 | *.sln.docstates 19 | 20 | # Build results 21 | [Dd]ebug/ 22 | [Dd]ebugPublic/ 23 | [Rr]elease/ 24 | [Rr]eleases/ 25 | x64/ 26 | x86/ 27 | build/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Oo]ut/ 32 | msbuild.log 33 | msbuild.err 34 | msbuild.wrn 35 | 36 | *.pubxml 37 | node_modules/ 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Azure Static Website Action 2 | 3 | This action was inspired by [`Azure Storage Action`](https://github.com/lauchacarro/Azure-Storage-Action). I re-wrote the whole thing using node.js 4 | 5 | # Deploy Files to Azure Blob Storage 6 | 7 | With [`Azure Static Website Action`](https://github.com/tibor19/static-website-deploy), you can automate your workflow to deploy files to [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) 8 | 9 | 10 | # End-to-End Sample Workflows 11 | 12 | ## Dependencies on other Github Actions 13 | 14 | * [Checkout](https://github.com/actions/checkout) your Git repository content into Github Actions agent. 15 | 16 | ## Create Azure Storage Account and deploy static website using GitHub Actions 17 | 1. Follow the tutorial to [Create an Azure Storage Account](https://docs.microsoft.com/es-es/learn/modules/create-azure-storage-account/5-exercise-create-a-storage-account) 18 | 2. Create an empty workflow (`.yml` file) in the `.github/workflows/` folder of your repository. 19 | 3. Copy the sample workflow into your workflow file. 20 | 4. Change `MyFolder` to the relative path where your files are. 21 | 5. Commit and push your repository. 22 | 6. You should see a new GitHub Action started under **Actions** tab. 23 | 24 | ### Sample workflow to deploy a Static Web Site to Azure Blob Storage 25 | ```yaml 26 | 27 | # File: .github/workflows/workflow.yml 28 | 29 | on: [push] 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-latest 34 | steps: 35 | - name: Checkout the code 36 | uses: actions/checkout@v3 37 | - name: Deploy the website 38 | uses: tibor19/static-website-deploy@v2 39 | with: 40 | enabled-static-website: 'true' 41 | folder: 'MyFolder' 42 | connection-string: ${{ secrets.CONNECTION_STRING }} 43 | 44 | ``` 45 | 46 | #### Configure connection string: 47 | 48 | For any credentials like Azure Service Principal, Publish Profile, Connection Strings, etc add them as [secrets](https://developer.github.com/actions/managing-workflows/storing-secrets/) in the GitHub repository and then use them in the workflow. 49 | 50 | The above example uses the Connection String of your Azure Storage Account. 51 | 52 | There are several ways to connect to your Azure Storage Account: 53 | * If you are using a connection string, you can use the following steps to configure the secret: 54 | * Follow the tutorial [Configure Azure Storage connection strings](https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string). 55 | * Define a new secret as part of your repository or organization settings. 56 | * Give the secret a name ex `CONNECTION_STRING`. 57 | * Paste the connection string file into the secret's value field. 58 | 59 | * If you want to use an Azure AD identity, you need call `az login`, or run the `azure/login` action prior to this step, and specify the `storage-account-name` parameter. Make sure that the Azure AD identity has the `Storage Account Contributor` and `Storage Blob Data Contributor` roles on the storage account. 60 | 61 | * If you want to use a storage account key, then specify the `storage-account-name` and `storage-account-key` parameters. 62 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Azure Static Website' 2 | description: 'Deploy files to Azure Blob Storage Container using a connection string' 3 | inputs: 4 | 5 | storage-account-name: 6 | description: 'The name of the Azure Storage Account. Make sure to call az login before this step, or provide a value for storage-account-key' 7 | required: false 8 | storage-account-key: 9 | description: 'One of the two shared keys of the storage account' 10 | required: false 11 | 12 | connection-string: 13 | description: 'Connection String of the Azure Storage Container' 14 | required: false 15 | 16 | blob-container-name: 17 | description: 'Name of the Blob Container Storage' 18 | required: false 19 | public-access-policy: 20 | description: 'Access Policy to update in the Container (container | blob | ). For private containers do not specity any value.' 21 | required: false 22 | enabled-static-website: 23 | description: 'Enabled static website' 24 | required: false 25 | index-file: 26 | description: 'Index file for the static website' 27 | required: false 28 | error-file: 29 | description: '404 Error file for the static website' 30 | required: false 31 | remove-existing-files: 32 | description: 'If the existing files should be removed before uploading the new files' 33 | required: false 34 | cache-control: 35 | description: 'Sets each blobs cache control.' 36 | required: false 37 | 38 | folder: 39 | description: 'Folder containing the files to be uploaded to the Storage Container' 40 | required: false 41 | default: '.' 42 | 43 | branding: 44 | icon: 'upload-cloud' 45 | color: blue 46 | runs: 47 | using: 'node16' 48 | main: 'dist/index.js' 49 | -------------------------------------------------------------------------------- /dist/xdg-open: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #--------------------------------------------- 3 | # xdg-open 4 | # 5 | # Utility script to open a URL in the registered default application. 6 | # 7 | # Refer to the usage() function below for usage. 8 | # 9 | # Copyright 2009-2010, Fathi Boudra 10 | # Copyright 2009-2010, Rex Dieter 11 | # Copyright 2006, Kevin Krammer 12 | # Copyright 2006, Jeremy White 13 | # 14 | # LICENSE: 15 | # 16 | # Permission is hereby granted, free of charge, to any person obtaining a 17 | # copy of this software and associated documentation files (the "Software"), 18 | # to deal in the Software without restriction, including without limitation 19 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 20 | # and/or sell copies of the Software, and to permit persons to whom the 21 | # Software is furnished to do so, subject to the following conditions: 22 | # 23 | # The above copyright notice and this permission notice shall be included 24 | # in all copies or substantial portions of the Software. 25 | # 26 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 27 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 29 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 30 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 31 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | # OTHER DEALINGS IN THE SOFTWARE. 33 | # 34 | #--------------------------------------------- 35 | 36 | manualpage() 37 | { 38 | cat << _MANUALPAGE 39 | Name 40 | 41 | xdg-open -- opens a file or URL in the user's preferred 42 | application 43 | 44 | Synopsis 45 | 46 | xdg-open { file | URL } 47 | 48 | xdg-open { --help | --manual | --version } 49 | 50 | Description 51 | 52 | xdg-open opens a file or URL in the user's preferred 53 | application. If a URL is provided the URL will be opened in the 54 | user's preferred web browser. If a file is provided the file 55 | will be opened in the preferred application for files of that 56 | type. xdg-open supports file, ftp, http and https URLs. 57 | 58 | xdg-open is for use inside a desktop session only. It is not 59 | recommended to use xdg-open as root. 60 | 61 | Options 62 | 63 | --help 64 | Show command synopsis. 65 | 66 | --manual 67 | Show this manual page. 68 | 69 | --version 70 | Show the xdg-utils version information. 71 | 72 | Exit Codes 73 | 74 | An exit code of 0 indicates success while a non-zero exit code 75 | indicates failure. The following failure codes can be returned: 76 | 77 | 1 78 | Error in command line syntax. 79 | 80 | 2 81 | One of the files passed on the command line did not 82 | exist. 83 | 84 | 3 85 | A required tool could not be found. 86 | 87 | 4 88 | The action failed. 89 | 90 | See Also 91 | 92 | xdg-mime(1), xdg-settings(1), MIME applications associations 93 | specification 94 | 95 | Examples 96 | 97 | xdg-open 'http://www.freedesktop.org/' 98 | 99 | Opens the freedesktop.org website in the user's default 100 | browser. 101 | 102 | xdg-open /tmp/foobar.png 103 | 104 | Opens the PNG image file /tmp/foobar.png in the user's default 105 | image viewing application. 106 | _MANUALPAGE 107 | } 108 | 109 | usage() 110 | { 111 | cat << _USAGE 112 | xdg-open -- opens a file or URL in the user's preferred 113 | application 114 | 115 | Synopsis 116 | 117 | xdg-open { file | URL } 118 | 119 | xdg-open { --help | --manual | --version } 120 | 121 | _USAGE 122 | } 123 | 124 | #@xdg-utils-common@ 125 | 126 | #---------------------------------------------------------------------------- 127 | # Common utility functions included in all XDG wrapper scripts 128 | #---------------------------------------------------------------------------- 129 | 130 | DEBUG() 131 | { 132 | [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; 133 | [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; 134 | shift 135 | echo "$@" >&2 136 | } 137 | 138 | # This handles backslashes but not quote marks. 139 | first_word() 140 | { 141 | read first rest 142 | echo "$first" 143 | } 144 | 145 | #------------------------------------------------------------- 146 | # map a binary to a .desktop file 147 | binary_to_desktop_file() 148 | { 149 | search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" 150 | binary="`which "$1"`" 151 | binary="`readlink -f "$binary"`" 152 | base="`basename "$binary"`" 153 | IFS=: 154 | for dir in $search; do 155 | unset IFS 156 | [ "$dir" ] || continue 157 | [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue 158 | for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do 159 | [ -r "$file" ] || continue 160 | # Check to make sure it's worth the processing. 161 | grep -q "^Exec.*$base" "$file" || continue 162 | # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). 163 | grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue 164 | command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" 165 | command="`which "$command"`" 166 | if [ x"`readlink -f "$command"`" = x"$binary" ]; then 167 | # Fix any double slashes that got added path composition 168 | echo "$file" | sed -e 's,//*,/,g' 169 | return 170 | fi 171 | done 172 | done 173 | } 174 | 175 | #------------------------------------------------------------- 176 | # map a .desktop file to a binary 177 | desktop_file_to_binary() 178 | { 179 | search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" 180 | desktop="`basename "$1"`" 181 | IFS=: 182 | for dir in $search; do 183 | unset IFS 184 | [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue 185 | # Check if desktop file contains - 186 | if [ "${desktop#*-}" != "$desktop" ]; then 187 | vendor=${desktop%-*} 188 | app=${desktop#*-} 189 | if [ -r $dir/applications/$vendor/$app ]; then 190 | file_path=$dir/applications/$vendor/$app 191 | elif [ -r $dir/applnk/$vendor/$app ]; then 192 | file_path=$dir/applnk/$vendor/$app 193 | fi 194 | fi 195 | if test -z "$file_path" ; then 196 | for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do 197 | file="$indir/$desktop" 198 | if [ -r "$file" ]; then 199 | file_path=$file 200 | break 201 | fi 202 | done 203 | fi 204 | if [ -r "$file_path" ]; then 205 | # Remove any arguments (%F, %f, %U, %u, etc.). 206 | command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" 207 | command="`which "$command"`" 208 | readlink -f "$command" 209 | return 210 | fi 211 | done 212 | } 213 | 214 | #------------------------------------------------------------- 215 | # Exit script on successfully completing the desired operation 216 | 217 | exit_success() 218 | { 219 | if [ $# -gt 0 ]; then 220 | echo "$@" 221 | echo 222 | fi 223 | 224 | exit 0 225 | } 226 | 227 | 228 | #----------------------------------------- 229 | # Exit script on malformed arguments, not enough arguments 230 | # or missing required option. 231 | # prints usage information 232 | 233 | exit_failure_syntax() 234 | { 235 | if [ $# -gt 0 ]; then 236 | echo "xdg-open: $@" >&2 237 | echo "Try 'xdg-open --help' for more information." >&2 238 | else 239 | usage 240 | echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." 241 | fi 242 | 243 | exit 1 244 | } 245 | 246 | #------------------------------------------------------------- 247 | # Exit script on missing file specified on command line 248 | 249 | exit_failure_file_missing() 250 | { 251 | if [ $# -gt 0 ]; then 252 | echo "xdg-open: $@" >&2 253 | fi 254 | 255 | exit 2 256 | } 257 | 258 | #------------------------------------------------------------- 259 | # Exit script on failure to locate necessary tool applications 260 | 261 | exit_failure_operation_impossible() 262 | { 263 | if [ $# -gt 0 ]; then 264 | echo "xdg-open: $@" >&2 265 | fi 266 | 267 | exit 3 268 | } 269 | 270 | #------------------------------------------------------------- 271 | # Exit script on failure returned by a tool application 272 | 273 | exit_failure_operation_failed() 274 | { 275 | if [ $# -gt 0 ]; then 276 | echo "xdg-open: $@" >&2 277 | fi 278 | 279 | exit 4 280 | } 281 | 282 | #------------------------------------------------------------ 283 | # Exit script on insufficient permission to read a specified file 284 | 285 | exit_failure_file_permission_read() 286 | { 287 | if [ $# -gt 0 ]; then 288 | echo "xdg-open: $@" >&2 289 | fi 290 | 291 | exit 5 292 | } 293 | 294 | #------------------------------------------------------------ 295 | # Exit script on insufficient permission to write a specified file 296 | 297 | exit_failure_file_permission_write() 298 | { 299 | if [ $# -gt 0 ]; then 300 | echo "xdg-open: $@" >&2 301 | fi 302 | 303 | exit 6 304 | } 305 | 306 | check_input_file() 307 | { 308 | if [ ! -e "$1" ]; then 309 | exit_failure_file_missing "file '$1' does not exist" 310 | fi 311 | if [ ! -r "$1" ]; then 312 | exit_failure_file_permission_read "no permission to read file '$1'" 313 | fi 314 | } 315 | 316 | check_vendor_prefix() 317 | { 318 | file_label="$2" 319 | [ -n "$file_label" ] || file_label="filename" 320 | file=`basename "$1"` 321 | case "$file" in 322 | [[:alpha:]]*-*) 323 | return 324 | ;; 325 | esac 326 | 327 | echo "xdg-open: $file_label '$file' does not have a proper vendor prefix" >&2 328 | echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 329 | echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 330 | echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2 331 | exit 1 332 | } 333 | 334 | check_output_file() 335 | { 336 | # if the file exists, check if it is writeable 337 | # if it does not exists, check if we are allowed to write on the directory 338 | if [ -e "$1" ]; then 339 | if [ ! -w "$1" ]; then 340 | exit_failure_file_permission_write "no permission to write to file '$1'" 341 | fi 342 | else 343 | DIR=`dirname "$1"` 344 | if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then 345 | exit_failure_file_permission_write "no permission to create file '$1'" 346 | fi 347 | fi 348 | } 349 | 350 | #---------------------------------------- 351 | # Checks for shared commands, e.g. --help 352 | 353 | check_common_commands() 354 | { 355 | while [ $# -gt 0 ] ; do 356 | parm="$1" 357 | shift 358 | 359 | case "$parm" in 360 | --help) 361 | usage 362 | echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." 363 | exit_success 364 | ;; 365 | 366 | --manual) 367 | manualpage 368 | exit_success 369 | ;; 370 | 371 | --version) 372 | echo "xdg-open 1.1.3" 373 | exit_success 374 | ;; 375 | esac 376 | done 377 | } 378 | 379 | check_common_commands "$@" 380 | 381 | [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; 382 | if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then 383 | # Be silent 384 | xdg_redirect_output=" > /dev/null 2> /dev/null" 385 | else 386 | # All output to stderr 387 | xdg_redirect_output=" >&2" 388 | fi 389 | 390 | #-------------------------------------- 391 | # Checks for known desktop environments 392 | # set variable DE to the desktop environments name, lowercase 393 | 394 | detectDE() 395 | { 396 | # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 397 | unset GREP_OPTIONS 398 | 399 | if [ -n "${XDG_CURRENT_DESKTOP}" ]; then 400 | case "${XDG_CURRENT_DESKTOP}" in 401 | # only recently added to menu-spec, pre-spec X- still in use 402 | Cinnamon|X-Cinnamon) 403 | DE=cinnamon; 404 | ;; 405 | ENLIGHTENMENT) 406 | DE=enlightenment; 407 | ;; 408 | # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME 409 | GNOME*) 410 | DE=gnome; 411 | ;; 412 | KDE) 413 | DE=kde; 414 | ;; 415 | # Deepin Desktop Environments 416 | DEEPIN|Deepin|deepin) 417 | DE=dde; 418 | ;; 419 | LXDE) 420 | DE=lxde; 421 | ;; 422 | LXQt) 423 | DE=lxqt; 424 | ;; 425 | MATE) 426 | DE=mate; 427 | ;; 428 | XFCE) 429 | DE=xfce 430 | ;; 431 | X-Generic) 432 | DE=generic 433 | ;; 434 | esac 435 | fi 436 | 437 | if [ x"$DE" = x"" ]; then 438 | # classic fallbacks 439 | if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; 440 | elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; 441 | elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; 442 | elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; 443 | elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; 444 | elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce 445 | elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; 446 | elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; 447 | fi 448 | fi 449 | 450 | if [ x"$DE" = x"" ]; then 451 | # fallback to checking $DESKTOP_SESSION 452 | case "$DESKTOP_SESSION" in 453 | gnome) 454 | DE=gnome; 455 | ;; 456 | LXDE|Lubuntu) 457 | DE=lxde; 458 | ;; 459 | MATE) 460 | DE=mate; 461 | ;; 462 | xfce|xfce4|'Xfce Session') 463 | DE=xfce; 464 | ;; 465 | esac 466 | fi 467 | 468 | if [ x"$DE" = x"" ]; then 469 | # fallback to uname output for other platforms 470 | case "$(uname 2>/dev/null)" in 471 | CYGWIN*) 472 | DE=cygwin; 473 | ;; 474 | Darwin) 475 | DE=darwin; 476 | ;; 477 | esac 478 | fi 479 | 480 | if [ x"$DE" = x"gnome" ]; then 481 | # gnome-default-applications-properties is only available in GNOME 2.x 482 | # but not in GNOME 3.x 483 | which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" 484 | fi 485 | 486 | if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then 487 | DE="flatpak" 488 | fi 489 | } 490 | 491 | #---------------------------------------------------------------------------- 492 | # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 493 | # It also always returns 1 in KDE 3.4 and earlier 494 | # Simply return 0 in such case 495 | 496 | kfmclient_fix_exit_code() 497 | { 498 | version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` 499 | major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` 500 | minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` 501 | release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` 502 | test "$major" -gt 3 && return $1 503 | test "$minor" -gt 5 && return $1 504 | test "$release" -gt 4 && return $1 505 | return 0 506 | } 507 | 508 | #---------------------------------------------------------------------------- 509 | # Returns true if there is a graphical display attached. 510 | 511 | has_display() 512 | { 513 | if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then 514 | return 0 515 | else 516 | return 1 517 | fi 518 | } 519 | 520 | # This handles backslashes but not quote marks. 521 | last_word() 522 | { 523 | read first rest 524 | echo "$rest" 525 | } 526 | 527 | # Get the value of a key in a desktop file's Desktop Entry group. 528 | # Example: Use get_key foo.desktop Exec 529 | # to get the values of the Exec= key for the Desktop Entry group. 530 | get_key() 531 | { 532 | local file="${1}" 533 | local key="${2}" 534 | local desktop_entry="" 535 | 536 | IFS_="${IFS}" 537 | IFS="" 538 | while read line 539 | do 540 | case "$line" in 541 | "[Desktop Entry]") 542 | desktop_entry="y" 543 | ;; 544 | # Reset match flag for other groups 545 | "["*) 546 | desktop_entry="" 547 | ;; 548 | "${key}="*) 549 | # Only match Desktop Entry group 550 | if [ -n "${desktop_entry}" ] 551 | then 552 | echo "${line}" | cut -d= -f 2- 553 | fi 554 | esac 555 | done < "${file}" 556 | IFS="${IFS_}" 557 | } 558 | 559 | # Returns true if argument is a file:// URL or path 560 | is_file_url_or_path() 561 | { 562 | if echo "$1" | grep -q '^file://' \ 563 | || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then 564 | return 0 565 | else 566 | return 1 567 | fi 568 | } 569 | 570 | # If argument is a file URL, convert it to a (percent-decoded) path. 571 | # If not, leave it as it is. 572 | file_url_to_path() 573 | { 574 | local file="$1" 575 | if echo "$file" | grep -q '^file:///'; then 576 | file=${file#file://} 577 | file=${file%%#*} 578 | file=$(echo "$file" | sed -r 's/\?.*$//') 579 | local printf=printf 580 | if [ -x /usr/bin/printf ]; then 581 | printf=/usr/bin/printf 582 | fi 583 | file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") 584 | fi 585 | echo "$file" 586 | } 587 | 588 | open_cygwin() 589 | { 590 | cygstart "$1" 591 | 592 | if [ $? -eq 0 ]; then 593 | exit_success 594 | else 595 | exit_failure_operation_failed 596 | fi 597 | } 598 | 599 | open_darwin() 600 | { 601 | open "$1" 602 | 603 | if [ $? -eq 0 ]; then 604 | exit_success 605 | else 606 | exit_failure_operation_failed 607 | fi 608 | } 609 | 610 | open_kde() 611 | { 612 | if [ -n "${KDE_SESSION_VERSION}" ]; then 613 | case "${KDE_SESSION_VERSION}" in 614 | 4) 615 | kde-open "$1" 616 | ;; 617 | 5) 618 | kde-open${KDE_SESSION_VERSION} "$1" 619 | ;; 620 | esac 621 | else 622 | kfmclient exec "$1" 623 | kfmclient_fix_exit_code $? 624 | fi 625 | 626 | if [ $? -eq 0 ]; then 627 | exit_success 628 | else 629 | exit_failure_operation_failed 630 | fi 631 | } 632 | 633 | open_dde() 634 | { 635 | if dde-open -version >/dev/null 2>&1; then 636 | dde-open "$1" 637 | else 638 | open_generic "$1" 639 | fi 640 | 641 | if [ $? -eq 0 ]; then 642 | exit_success 643 | else 644 | exit_failure_operation_failed 645 | fi 646 | } 647 | 648 | open_gnome3() 649 | { 650 | if gio help open 2>/dev/null 1>&2; then 651 | gio open "$1" 652 | elif gvfs-open --help 2>/dev/null 1>&2; then 653 | gvfs-open "$1" 654 | else 655 | open_generic "$1" 656 | fi 657 | 658 | if [ $? -eq 0 ]; then 659 | exit_success 660 | else 661 | exit_failure_operation_failed 662 | fi 663 | } 664 | 665 | open_gnome() 666 | { 667 | if gio help open 2>/dev/null 1>&2; then 668 | gio open "$1" 669 | elif gvfs-open --help 2>/dev/null 1>&2; then 670 | gvfs-open "$1" 671 | elif gnome-open --help 2>/dev/null 1>&2; then 672 | gnome-open "$1" 673 | else 674 | open_generic "$1" 675 | fi 676 | 677 | if [ $? -eq 0 ]; then 678 | exit_success 679 | else 680 | exit_failure_operation_failed 681 | fi 682 | } 683 | 684 | open_mate() 685 | { 686 | if gio help open 2>/dev/null 1>&2; then 687 | gio open "$1" 688 | elif gvfs-open --help 2>/dev/null 1>&2; then 689 | gvfs-open "$1" 690 | elif mate-open --help 2>/dev/null 1>&2; then 691 | mate-open "$1" 692 | else 693 | open_generic "$1" 694 | fi 695 | 696 | if [ $? -eq 0 ]; then 697 | exit_success 698 | else 699 | exit_failure_operation_failed 700 | fi 701 | } 702 | 703 | open_xfce() 704 | { 705 | if exo-open --help 2>/dev/null 1>&2; then 706 | exo-open "$1" 707 | elif gio help open 2>/dev/null 1>&2; then 708 | gio open "$1" 709 | elif gvfs-open --help 2>/dev/null 1>&2; then 710 | gvfs-open "$1" 711 | else 712 | open_generic "$1" 713 | fi 714 | 715 | if [ $? -eq 0 ]; then 716 | exit_success 717 | else 718 | exit_failure_operation_failed 719 | fi 720 | } 721 | 722 | open_enlightenment() 723 | { 724 | if enlightenment_open --help 2>/dev/null 1>&2; then 725 | enlightenment_open "$1" 726 | else 727 | open_generic "$1" 728 | fi 729 | 730 | if [ $? -eq 0 ]; then 731 | exit_success 732 | else 733 | exit_failure_operation_failed 734 | fi 735 | } 736 | 737 | open_flatpak() 738 | { 739 | gdbus call --session \ 740 | --dest org.freedesktop.portal.Desktop \ 741 | --object-path /org/freedesktop/portal/desktop \ 742 | --method org.freedesktop.portal.OpenURI.OpenURI \ 743 | "" "$1" {} 744 | 745 | if [ $? -eq 0 ]; then 746 | exit_success 747 | else 748 | exit_failure_operation_failed 749 | fi 750 | } 751 | 752 | #----------------------------------------- 753 | # Recursively search .desktop file 754 | 755 | search_desktop_file() 756 | { 757 | local default="$1" 758 | local dir="$2" 759 | local target="$3" 760 | 761 | local file="" 762 | # look for both vendor-app.desktop, vendor/app.desktop 763 | if [ -r "$dir/$default" ]; then 764 | file="$dir/$default" 765 | elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then 766 | file="$dir/`echo $default | sed -e 's|-|/|'`" 767 | fi 768 | 769 | if [ -r "$file" ] ; then 770 | command="$(get_key "${file}" "Exec" | first_word)" 771 | command_exec=`which $command 2>/dev/null` 772 | icon="$(get_key "${file}" "Icon")" 773 | # FIXME: Actually LC_MESSAGES should be used as described in 774 | # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html 775 | localised_name="$(get_key "${file}" "Name")" 776 | set -- $(get_key "${file}" "Exec" | last_word) 777 | # We need to replace any occurrence of "%f", "%F" and 778 | # the like by the target file. We examine each 779 | # argument and append the modified argument to the 780 | # end then shift. 781 | local args=$# 782 | local replaced=0 783 | while [ $args -gt 0 ]; do 784 | case $1 in 785 | %[c]) 786 | replaced=1 787 | arg="${localised_name}" 788 | shift 789 | set -- "$@" "$arg" 790 | ;; 791 | %[fFuU]) 792 | replaced=1 793 | arg="$target" 794 | shift 795 | set -- "$@" "$arg" 796 | ;; 797 | %[i]) 798 | replaced=1 799 | shift 800 | set -- "$@" "--icon" "$icon" 801 | ;; 802 | *) 803 | arg="$1" 804 | shift 805 | set -- "$@" "$arg" 806 | ;; 807 | esac 808 | args=$(( $args - 1 )) 809 | done 810 | [ $replaced -eq 1 ] || set -- "$@" "$target" 811 | "$command_exec" "$@" 812 | 813 | if [ $? -eq 0 ]; then 814 | exit_success 815 | fi 816 | fi 817 | 818 | for d in $dir/*/; do 819 | [ -d "$d" ] && search_desktop_file "$default" "$d" "$target" 820 | done 821 | } 822 | 823 | 824 | open_generic_xdg_mime() 825 | { 826 | filetype="$2" 827 | default=`xdg-mime query default "$filetype"` 828 | if [ -n "$default" ] ; then 829 | xdg_user_dir="$XDG_DATA_HOME" 830 | [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" 831 | 832 | xdg_system_dirs="$XDG_DATA_DIRS" 833 | [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/ 834 | 835 | DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" 836 | for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do 837 | search_desktop_file "$default" "$x/applications/" "$1" 838 | done 839 | fi 840 | } 841 | 842 | open_generic_xdg_file_mime() 843 | { 844 | filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"` 845 | open_generic_xdg_mime "$1" "$filetype" 846 | } 847 | 848 | open_generic_xdg_x_scheme_handler() 849 | { 850 | scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`" 851 | if [ -n $scheme ]; then 852 | filetype="x-scheme-handler/$scheme" 853 | open_generic_xdg_mime "$1" "$filetype" 854 | fi 855 | } 856 | 857 | has_single_argument() 858 | { 859 | test $# = 1 860 | } 861 | 862 | open_envvar() 863 | { 864 | local oldifs="$IFS" 865 | local browser browser_with_arg 866 | 867 | IFS=":" 868 | for browser in $BROWSER; do 869 | IFS="$oldifs" 870 | 871 | if [ -z "$browser" ]; then 872 | continue 873 | fi 874 | 875 | if echo "$browser" | grep -q %s; then 876 | # Avoid argument injection. 877 | # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 878 | # URIs don't have IFS characters spaces anyway. 879 | has_single_argument $1 && $(printf "$browser" "$1") 880 | else 881 | $browser "$1" 882 | fi 883 | 884 | if [ $? -eq 0 ]; then 885 | exit_success 886 | fi 887 | done 888 | } 889 | 890 | open_generic() 891 | { 892 | if is_file_url_or_path "$1"; then 893 | local file="$(file_url_to_path "$1")" 894 | 895 | check_input_file "$file" 896 | 897 | if has_display; then 898 | filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"` 899 | open_generic_xdg_mime "$file" "$filetype" 900 | fi 901 | 902 | if which run-mailcap 2>/dev/null 1>&2; then 903 | run-mailcap --action=view "$file" 904 | if [ $? -eq 0 ]; then 905 | exit_success 906 | fi 907 | fi 908 | 909 | if has_display && mimeopen -v 2>/dev/null 1>&2; then 910 | mimeopen -L -n "$file" 911 | if [ $? -eq 0 ]; then 912 | exit_success 913 | fi 914 | fi 915 | fi 916 | 917 | if has_display; then 918 | open_generic_xdg_x_scheme_handler "$1" 919 | fi 920 | 921 | if [ -n "$BROWSER" ]; then 922 | open_envvar "$1" 923 | fi 924 | 925 | # if BROWSER variable is not set, check some well known browsers instead 926 | if [ x"$BROWSER" = x"" ]; then 927 | BROWSER=www-browser:links2:elinks:links:lynx:w3m 928 | if has_display; then 929 | BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:microsoft-edge:$BROWSER 930 | fi 931 | fi 932 | 933 | open_envvar "$1" 934 | 935 | exit_failure_operation_impossible "no method available for opening '$1'" 936 | } 937 | 938 | open_lxde() 939 | { 940 | 941 | # pcmanfm only knows how to handle file:// urls and filepaths, it seems. 942 | if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then 943 | local file="$(file_url_to_path "$1")" 944 | 945 | # handle relative paths 946 | if ! echo "$file" | grep -q ^/; then 947 | file="$(pwd)/$file" 948 | fi 949 | 950 | pcmanfm "$file" 951 | else 952 | open_generic "$1" 953 | fi 954 | 955 | if [ $? -eq 0 ]; then 956 | exit_success 957 | else 958 | exit_failure_operation_failed 959 | fi 960 | } 961 | 962 | open_lxqt() 963 | { 964 | open_generic "$1" 965 | } 966 | 967 | [ x"$1" != x"" ] || exit_failure_syntax 968 | 969 | url= 970 | while [ $# -gt 0 ] ; do 971 | parm="$1" 972 | shift 973 | 974 | case "$parm" in 975 | -*) 976 | exit_failure_syntax "unexpected option '$parm'" 977 | ;; 978 | 979 | *) 980 | if [ -n "$url" ] ; then 981 | exit_failure_syntax "unexpected argument '$parm'" 982 | fi 983 | url="$parm" 984 | ;; 985 | esac 986 | done 987 | 988 | if [ -z "${url}" ] ; then 989 | exit_failure_syntax "file or URL argument missing" 990 | fi 991 | 992 | detectDE 993 | 994 | if [ x"$DE" = x"" ]; then 995 | DE=generic 996 | fi 997 | 998 | DEBUG 2 "Selected DE $DE" 999 | 1000 | # sanitize BROWSER (avoid caling ourselves in particular) 1001 | case "${BROWSER}" in 1002 | *:"xdg-open"|"xdg-open":*) 1003 | BROWSER=$(echo $BROWSER | sed -e 's|:xdg-open||g' -e 's|xdg-open:||g') 1004 | ;; 1005 | "xdg-open") 1006 | BROWSER= 1007 | ;; 1008 | esac 1009 | 1010 | case "$DE" in 1011 | kde) 1012 | open_kde "$url" 1013 | ;; 1014 | 1015 | dde) 1016 | open_dde "$url" 1017 | ;; 1018 | 1019 | gnome3|cinnamon) 1020 | open_gnome3 "$url" 1021 | ;; 1022 | 1023 | gnome) 1024 | open_gnome "$url" 1025 | ;; 1026 | 1027 | mate) 1028 | open_mate "$url" 1029 | ;; 1030 | 1031 | xfce) 1032 | open_xfce "$url" 1033 | ;; 1034 | 1035 | lxde) 1036 | open_lxde "$url" 1037 | ;; 1038 | 1039 | lxqt) 1040 | open_lxqt "$url" 1041 | ;; 1042 | 1043 | enlightenment) 1044 | open_enlightenment "$url" 1045 | ;; 1046 | 1047 | cygwin) 1048 | open_cygwin "$url" 1049 | ;; 1050 | 1051 | darwin) 1052 | open_darwin "$url" 1053 | ;; 1054 | 1055 | flatpak) 1056 | open_flatpak "$url" 1057 | ;; 1058 | 1059 | generic) 1060 | open_generic "$url" 1061 | ;; 1062 | 1063 | *) 1064 | exit_failure_operation_impossible "no method available for opening '$url'" 1065 | ;; 1066 | esac 1067 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import { promisify } from 'util'; 4 | import { lookup } from 'mime-types'; 5 | 6 | import { getInput, setFailed, debug, error } from '@actions/core'; 7 | import { BlobServiceClient } from '@azure/storage-blob'; 8 | import { DefaultAzureCredential } from '@azure/identity'; 9 | 10 | async function* listFiles(rootFolder){ 11 | 12 | const readdir = promisify(fs.readdir); 13 | 14 | const listFilesAsync = async function* (parentFolder){ 15 | const statSync = fs.statSync(parentFolder); 16 | if(statSync.isFile()){ 17 | yield parentFolder; 18 | } 19 | else if (statSync.isDirectory()){ 20 | const files = await readdir(parentFolder); 21 | for (const file of files){ 22 | const fileName = path.join(parentFolder, file); 23 | yield *listFilesAsync(fileName); 24 | } 25 | } 26 | } 27 | 28 | yield *listFilesAsync(rootFolder); 29 | } 30 | 31 | async function uploadFileToBlob(containerService, fileName, blobName, blobCacheControl){ 32 | 33 | var blobClient = containerService.getBlockBlobClient(blobName); 34 | var blobContentType = lookup(fileName) || 'application/octet-stream'; 35 | await blobClient.uploadFile(fileName, { blobHTTPHeaders: { blobContentType, blobCacheControl} }); 36 | 37 | debug(`The file ${fileName} was uploaded as ${blobName}, with the content-type of ${blobContentType}`); 38 | } 39 | 40 | const main = async () => { 41 | 42 | let blobServiceClient = null; 43 | const storageAccountName = getInput('storage-account-name'); 44 | const connectionString = getInput('connection-string'); 45 | 46 | if (!storageAccountName && !connectionString) { 47 | throw "storage-account-name or connection-string must be specified!"; 48 | } 49 | 50 | if (!!connectionString) { 51 | blobServiceClient = BlobServiceClient.fromConnectionString(connectionString); 52 | } 53 | else { 54 | const storageAccountKey = getInput('storage-account-key'); 55 | // no storage account key, use managed identity 56 | blobServiceClient = new BlobServiceClient(`https://${storageAccountName}.blob.core.windows.net`, 57 | storageAccountKey || new DefaultAzureCredential() 58 | ); 59 | } 60 | 61 | const enableStaticWebSite = getInput('enabled-static-website'); 62 | const containerName = (enableStaticWebSite) ? "$web" : getInput('blob-container-name') ; 63 | if (!containerName) { 64 | throw "Either specify a container name, or set enableStaticWebSite to true!"; 65 | } 66 | 67 | const folder = getInput('folder'); 68 | const accessPolicy = getInput('public-access-policy'); 69 | const indexFile = getInput('index-file') || 'index.html'; 70 | const errorFile = getInput('error-file'); 71 | const removeExistingFiles = getInput('remove-existing-files'); 72 | const blobCacheControl = getInput('cache-control'); 73 | 74 | // Change the accessPolicy to map the new interface 75 | 76 | if(accessPolicy && accessPolicy.localeCompare("none", undefined, { sensitivity: 'accent' }) === 0){ 77 | accessPolicy = null; 78 | } 79 | 80 | if(accessPolicy){ 81 | if(accessPolicy.localeCompare("blobcontainer", undefined, { sensitivity: 'accent' }) === 0){ 82 | accessPolicy = 'container'; 83 | } 84 | else if(accessPolicy.localeCompare("blob", undefined, { sensitivity: 'accent' }) === 0){ 85 | accessPolicy = 'blob'; 86 | } 87 | } 88 | 89 | if (enableStaticWebSite) { 90 | var props = await blobServiceClient.getProperties(); 91 | 92 | props.cors = props.cors || []; 93 | props.staticWebsite.enabled = true; 94 | if(!!indexFile){ 95 | props.staticWebsite.indexDocument = indexFile; 96 | } 97 | if(!!errorFile){ 98 | props.staticWebsite.errorDocument404Path = errorFile; 99 | } 100 | await blobServiceClient.setProperties(props); 101 | } 102 | 103 | const containerService = blobServiceClient.getContainerClient(containerName); 104 | if (!await containerService.exists()) { 105 | await containerService.create({ access: accessPolicy }); 106 | } 107 | else if(accessPolicy){ 108 | await containerService.setAccessPolicy(accessPolicy); 109 | } 110 | 111 | if(removeExistingFiles){ 112 | for await (const blob of containerService.listBlobsFlat()){ 113 | await containerService.deleteBlob(blob.name); 114 | } 115 | } 116 | 117 | const rootFolder = path.resolve(folder); 118 | if(fs.statSync(rootFolder).isFile()){ 119 | return await uploadFileToBlob(containerService, rootFolder, path.basename(rootFolder)); 120 | } 121 | else{ 122 | for await (const fileName of listFiles(rootFolder)) { 123 | var blobName = path.relative(rootFolder, fileName); 124 | await uploadFileToBlob(containerService, fileName, blobName, blobCacheControl); 125 | } 126 | } 127 | }; 128 | 129 | main().catch(err => { 130 | error(err); 131 | error(err.stack); 132 | setFailed(err); 133 | process.exit(-1); 134 | }) -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "static-website-deploy", 3 | "version": "2.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "static-website-deploy", 9 | "version": "2.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "@actions/core": "^1.10.0", 13 | "@azure/identity": "^3.1.3", 14 | "@azure/storage-blob": "^12.12.0", 15 | "mime-types": "^2.1.35" 16 | }, 17 | "devDependencies": { 18 | "@vercel/ncc": "^0.34.0" 19 | } 20 | }, 21 | "node_modules/@actions/core": { 22 | "version": "1.10.0", 23 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", 24 | "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", 25 | "dependencies": { 26 | "@actions/http-client": "^2.0.1", 27 | "uuid": "^8.3.2" 28 | } 29 | }, 30 | "node_modules/@actions/http-client": { 31 | "version": "2.0.1", 32 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", 33 | "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", 34 | "dependencies": { 35 | "tunnel": "^0.0.6" 36 | } 37 | }, 38 | "node_modules/@azure/abort-controller": { 39 | "version": "1.1.0", 40 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", 41 | "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", 42 | "dependencies": { 43 | "tslib": "^2.2.0" 44 | }, 45 | "engines": { 46 | "node": ">=12.0.0" 47 | } 48 | }, 49 | "node_modules/@azure/core-auth": { 50 | "version": "1.4.0", 51 | "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz", 52 | "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==", 53 | "dependencies": { 54 | "@azure/abort-controller": "^1.0.0", 55 | "tslib": "^2.2.0" 56 | }, 57 | "engines": { 58 | "node": ">=12.0.0" 59 | } 60 | }, 61 | "node_modules/@azure/core-client": { 62 | "version": "1.7.0", 63 | "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.0.tgz", 64 | "integrity": "sha512-fgaLVlF3xGg8JAt7Hl7vkKIJcCAA9NpsvIvb44qaEOW6CaJ+IaHKL7oWe5+oGOVR+y/z2Gd2joyvslqwDvRfTw==", 65 | "dependencies": { 66 | "@azure/abort-controller": "^1.0.0", 67 | "@azure/core-auth": "^1.4.0", 68 | "@azure/core-rest-pipeline": "^1.9.1", 69 | "@azure/core-tracing": "^1.0.0", 70 | "@azure/core-util": "^1.0.0", 71 | "@azure/logger": "^1.0.0", 72 | "tslib": "^2.2.0" 73 | }, 74 | "engines": { 75 | "node": ">=14.0.0" 76 | } 77 | }, 78 | "node_modules/@azure/core-client/node_modules/@azure/core-tracing": { 79 | "version": "1.0.1", 80 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 81 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 82 | "dependencies": { 83 | "tslib": "^2.2.0" 84 | }, 85 | "engines": { 86 | "node": ">=12.0.0" 87 | } 88 | }, 89 | "node_modules/@azure/core-http": { 90 | "version": "2.2.7", 91 | "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.7.tgz", 92 | "integrity": "sha512-TyGMeDm90mkRS8XzSQbSMD+TqnWL1XKGCh0x0QVGMD8COH2yU0q5SaHm/IBEBkzcq0u73NhS/p57T3KVSgUFqQ==", 93 | "dependencies": { 94 | "@azure/abort-controller": "^1.0.0", 95 | "@azure/core-auth": "^1.3.0", 96 | "@azure/core-tracing": "1.0.0-preview.13", 97 | "@azure/core-util": "^1.1.0", 98 | "@azure/logger": "^1.0.0", 99 | "@types/node-fetch": "^2.5.0", 100 | "@types/tunnel": "^0.0.3", 101 | "form-data": "^4.0.0", 102 | "node-fetch": "^2.6.7", 103 | "process": "^0.11.10", 104 | "tough-cookie": "^4.0.0", 105 | "tslib": "^2.2.0", 106 | "tunnel": "^0.0.6", 107 | "uuid": "^8.3.0", 108 | "xml2js": "^0.4.19" 109 | }, 110 | "engines": { 111 | "node": ">=12.0.0" 112 | } 113 | }, 114 | "node_modules/@azure/core-lro": { 115 | "version": "2.4.0", 116 | "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.4.0.tgz", 117 | "integrity": "sha512-F65+rYkll1dpw3RGm8/SSiSj+/QkMeYDanzS/QKlM1dmuneVyXbO46C88V1MRHluLGdMP6qfD3vDRYALn0z0tQ==", 118 | "dependencies": { 119 | "@azure/abort-controller": "^1.0.0", 120 | "@azure/logger": "^1.0.0", 121 | "tslib": "^2.2.0" 122 | }, 123 | "engines": { 124 | "node": ">=12.0.0" 125 | } 126 | }, 127 | "node_modules/@azure/core-paging": { 128 | "version": "1.3.0", 129 | "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.3.0.tgz", 130 | "integrity": "sha512-H6Tg9eBm0brHqLy0OSAGzxIh1t4UL8eZVrSUMJ60Ra9cwq2pOskFqVpz2pYoHDsBY1jZ4V/P8LRGb5D5pmC6rg==", 131 | "dependencies": { 132 | "tslib": "^2.2.0" 133 | }, 134 | "engines": { 135 | "node": ">=12.0.0" 136 | } 137 | }, 138 | "node_modules/@azure/core-rest-pipeline": { 139 | "version": "1.10.1", 140 | "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.1.tgz", 141 | "integrity": "sha512-Kji9k6TOFRDB5ZMTw8qUf2IJ+CeJtsuMdAHox9eqpTf1cefiNMpzrfnF6sINEBZJsaVaWgQ0o48B6kcUH68niA==", 142 | "dependencies": { 143 | "@azure/abort-controller": "^1.0.0", 144 | "@azure/core-auth": "^1.4.0", 145 | "@azure/core-tracing": "^1.0.1", 146 | "@azure/core-util": "^1.0.0", 147 | "@azure/logger": "^1.0.0", 148 | "form-data": "^4.0.0", 149 | "http-proxy-agent": "^5.0.0", 150 | "https-proxy-agent": "^5.0.0", 151 | "tslib": "^2.2.0", 152 | "uuid": "^8.3.0" 153 | }, 154 | "engines": { 155 | "node": ">=14.0.0" 156 | } 157 | }, 158 | "node_modules/@azure/core-rest-pipeline/node_modules/@azure/core-tracing": { 159 | "version": "1.0.1", 160 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 161 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 162 | "dependencies": { 163 | "tslib": "^2.2.0" 164 | }, 165 | "engines": { 166 | "node": ">=12.0.0" 167 | } 168 | }, 169 | "node_modules/@azure/core-tracing": { 170 | "version": "1.0.0-preview.13", 171 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", 172 | "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", 173 | "dependencies": { 174 | "@opentelemetry/api": "^1.0.1", 175 | "tslib": "^2.2.0" 176 | }, 177 | "engines": { 178 | "node": ">=12.0.0" 179 | } 180 | }, 181 | "node_modules/@azure/core-util": { 182 | "version": "1.1.1", 183 | "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.1.1.tgz", 184 | "integrity": "sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==", 185 | "dependencies": { 186 | "@azure/abort-controller": "^1.0.0", 187 | "tslib": "^2.2.0" 188 | }, 189 | "engines": { 190 | "node": ">=12.0.0" 191 | } 192 | }, 193 | "node_modules/@azure/identity": { 194 | "version": "3.1.3", 195 | "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-3.1.3.tgz", 196 | "integrity": "sha512-y0jFjSfHsVPwXSwi3KaSPtOZtJZqhiqAhWUXfFYBUd/+twUBovZRXspBwLrF5rJe0r5NyvmScpQjL+TYDTQVvw==", 197 | "dependencies": { 198 | "@azure/abort-controller": "^1.0.0", 199 | "@azure/core-auth": "^1.3.0", 200 | "@azure/core-client": "^1.4.0", 201 | "@azure/core-rest-pipeline": "^1.1.0", 202 | "@azure/core-tracing": "^1.0.0", 203 | "@azure/core-util": "^1.0.0", 204 | "@azure/logger": "^1.0.0", 205 | "@azure/msal-browser": "^2.32.2", 206 | "@azure/msal-common": "^9.0.2", 207 | "@azure/msal-node": "^1.14.6", 208 | "events": "^3.0.0", 209 | "jws": "^4.0.0", 210 | "open": "^8.0.0", 211 | "stoppable": "^1.1.0", 212 | "tslib": "^2.2.0", 213 | "uuid": "^8.3.0" 214 | }, 215 | "engines": { 216 | "node": ">=14.0.0" 217 | } 218 | }, 219 | "node_modules/@azure/identity/node_modules/@azure/core-tracing": { 220 | "version": "1.0.1", 221 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 222 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 223 | "dependencies": { 224 | "tslib": "^2.2.0" 225 | }, 226 | "engines": { 227 | "node": ">=12.0.0" 228 | } 229 | }, 230 | "node_modules/@azure/logger": { 231 | "version": "1.0.3", 232 | "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", 233 | "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", 234 | "dependencies": { 235 | "tslib": "^2.2.0" 236 | }, 237 | "engines": { 238 | "node": ">=12.0.0" 239 | } 240 | }, 241 | "node_modules/@azure/msal-browser": { 242 | "version": "2.32.2", 243 | "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.32.2.tgz", 244 | "integrity": "sha512-1YqGzXtPG3QrZPFBKaMWr2WQdukDj+PelqUCv351+p+hlw/AhdRrb8haY73/iqkhT6Cdrbnh7sL4gikVsF4O1g==", 245 | "dependencies": { 246 | "@azure/msal-common": "^9.0.2" 247 | }, 248 | "engines": { 249 | "node": ">=0.8.0" 250 | } 251 | }, 252 | "node_modules/@azure/msal-common": { 253 | "version": "9.1.1", 254 | "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", 255 | "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==", 256 | "engines": { 257 | "node": ">=0.8.0" 258 | } 259 | }, 260 | "node_modules/@azure/msal-node": { 261 | "version": "1.14.6", 262 | "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.6.tgz", 263 | "integrity": "sha512-em/qqFL5tLMxMPl9vormAs13OgZpmQoJbiQ/GlWr+BA77eCLoL+Ehr5xRHowYo+LFe5b+p+PJVkRvT+mLvOkwA==", 264 | "dependencies": { 265 | "@azure/msal-common": "^9.0.2", 266 | "jsonwebtoken": "^9.0.0", 267 | "uuid": "^8.3.0" 268 | }, 269 | "engines": { 270 | "node": "10 || 12 || 14 || 16 || 18" 271 | } 272 | }, 273 | "node_modules/@azure/storage-blob": { 274 | "version": "12.12.0", 275 | "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.12.0.tgz", 276 | "integrity": "sha512-o/Mf6lkyYG/eBW4/hXB9864RxVNmAkcKHjsGR6Inlp5hupa3exjSyH2KjO3tLO//YGA+tS+17hM2bxRl9Sn16g==", 277 | "dependencies": { 278 | "@azure/abort-controller": "^1.0.0", 279 | "@azure/core-http": "^2.0.0", 280 | "@azure/core-lro": "^2.2.0", 281 | "@azure/core-paging": "^1.1.1", 282 | "@azure/core-tracing": "1.0.0-preview.13", 283 | "@azure/logger": "^1.0.0", 284 | "events": "^3.0.0", 285 | "tslib": "^2.2.0" 286 | }, 287 | "engines": { 288 | "node": ">=12.0.0" 289 | } 290 | }, 291 | "node_modules/@opentelemetry/api": { 292 | "version": "1.2.0", 293 | "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.2.0.tgz", 294 | "integrity": "sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g==", 295 | "engines": { 296 | "node": ">=8.0.0" 297 | } 298 | }, 299 | "node_modules/@tootallnate/once": { 300 | "version": "2.0.0", 301 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", 302 | "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", 303 | "engines": { 304 | "node": ">= 10" 305 | } 306 | }, 307 | "node_modules/@types/node": { 308 | "version": "18.11.6", 309 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.6.tgz", 310 | "integrity": "sha512-j3CEDa2vd96K0AXF8Wur7UucACvnjkk8hYyQAHhUNciabZLDl9nfAEVUSwmh245OOZV15bRA3Y590Gi5jUcDJg==" 311 | }, 312 | "node_modules/@types/node-fetch": { 313 | "version": "2.6.2", 314 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", 315 | "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", 316 | "dependencies": { 317 | "@types/node": "*", 318 | "form-data": "^3.0.0" 319 | } 320 | }, 321 | "node_modules/@types/node-fetch/node_modules/form-data": { 322 | "version": "3.0.1", 323 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", 324 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", 325 | "dependencies": { 326 | "asynckit": "^0.4.0", 327 | "combined-stream": "^1.0.8", 328 | "mime-types": "^2.1.12" 329 | }, 330 | "engines": { 331 | "node": ">= 6" 332 | } 333 | }, 334 | "node_modules/@types/tunnel": { 335 | "version": "0.0.3", 336 | "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", 337 | "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", 338 | "dependencies": { 339 | "@types/node": "*" 340 | } 341 | }, 342 | "node_modules/@vercel/ncc": { 343 | "version": "0.34.0", 344 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", 345 | "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==", 346 | "dev": true, 347 | "bin": { 348 | "ncc": "dist/ncc/cli.js" 349 | } 350 | }, 351 | "node_modules/agent-base": { 352 | "version": "6.0.2", 353 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 354 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 355 | "dependencies": { 356 | "debug": "4" 357 | }, 358 | "engines": { 359 | "node": ">= 6.0.0" 360 | } 361 | }, 362 | "node_modules/asynckit": { 363 | "version": "0.4.0", 364 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 365 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 366 | }, 367 | "node_modules/buffer-equal-constant-time": { 368 | "version": "1.0.1", 369 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 370 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 371 | }, 372 | "node_modules/combined-stream": { 373 | "version": "1.0.8", 374 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 375 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 376 | "dependencies": { 377 | "delayed-stream": "~1.0.0" 378 | }, 379 | "engines": { 380 | "node": ">= 0.8" 381 | } 382 | }, 383 | "node_modules/debug": { 384 | "version": "4.3.4", 385 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 386 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 387 | "dependencies": { 388 | "ms": "2.1.2" 389 | }, 390 | "engines": { 391 | "node": ">=6.0" 392 | }, 393 | "peerDependenciesMeta": { 394 | "supports-color": { 395 | "optional": true 396 | } 397 | } 398 | }, 399 | "node_modules/define-lazy-prop": { 400 | "version": "2.0.0", 401 | "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", 402 | "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", 403 | "engines": { 404 | "node": ">=8" 405 | } 406 | }, 407 | "node_modules/delayed-stream": { 408 | "version": "1.0.0", 409 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 410 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 411 | "engines": { 412 | "node": ">=0.4.0" 413 | } 414 | }, 415 | "node_modules/ecdsa-sig-formatter": { 416 | "version": "1.0.11", 417 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 418 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 419 | "dependencies": { 420 | "safe-buffer": "^5.0.1" 421 | } 422 | }, 423 | "node_modules/events": { 424 | "version": "3.3.0", 425 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 426 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", 427 | "engines": { 428 | "node": ">=0.8.x" 429 | } 430 | }, 431 | "node_modules/form-data": { 432 | "version": "4.0.0", 433 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 434 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 435 | "dependencies": { 436 | "asynckit": "^0.4.0", 437 | "combined-stream": "^1.0.8", 438 | "mime-types": "^2.1.12" 439 | }, 440 | "engines": { 441 | "node": ">= 6" 442 | } 443 | }, 444 | "node_modules/http-proxy-agent": { 445 | "version": "5.0.0", 446 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", 447 | "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", 448 | "dependencies": { 449 | "@tootallnate/once": "2", 450 | "agent-base": "6", 451 | "debug": "4" 452 | }, 453 | "engines": { 454 | "node": ">= 6" 455 | } 456 | }, 457 | "node_modules/https-proxy-agent": { 458 | "version": "5.0.1", 459 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 460 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 461 | "dependencies": { 462 | "agent-base": "6", 463 | "debug": "4" 464 | }, 465 | "engines": { 466 | "node": ">= 6" 467 | } 468 | }, 469 | "node_modules/is-docker": { 470 | "version": "2.2.1", 471 | "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", 472 | "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", 473 | "bin": { 474 | "is-docker": "cli.js" 475 | }, 476 | "engines": { 477 | "node": ">=8" 478 | }, 479 | "funding": { 480 | "url": "https://github.com/sponsors/sindresorhus" 481 | } 482 | }, 483 | "node_modules/is-wsl": { 484 | "version": "2.2.0", 485 | "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", 486 | "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", 487 | "dependencies": { 488 | "is-docker": "^2.0.0" 489 | }, 490 | "engines": { 491 | "node": ">=8" 492 | } 493 | }, 494 | "node_modules/jsonwebtoken": { 495 | "version": "9.0.0", 496 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", 497 | "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", 498 | "dependencies": { 499 | "jws": "^3.2.2", 500 | "lodash": "^4.17.21", 501 | "ms": "^2.1.1", 502 | "semver": "^7.3.8" 503 | }, 504 | "engines": { 505 | "node": ">=12", 506 | "npm": ">=6" 507 | } 508 | }, 509 | "node_modules/jsonwebtoken/node_modules/jwa": { 510 | "version": "1.4.1", 511 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 512 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 513 | "dependencies": { 514 | "buffer-equal-constant-time": "1.0.1", 515 | "ecdsa-sig-formatter": "1.0.11", 516 | "safe-buffer": "^5.0.1" 517 | } 518 | }, 519 | "node_modules/jsonwebtoken/node_modules/jws": { 520 | "version": "3.2.2", 521 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 522 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 523 | "dependencies": { 524 | "jwa": "^1.4.1", 525 | "safe-buffer": "^5.0.1" 526 | } 527 | }, 528 | "node_modules/jwa": { 529 | "version": "2.0.0", 530 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", 531 | "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", 532 | "dependencies": { 533 | "buffer-equal-constant-time": "1.0.1", 534 | "ecdsa-sig-formatter": "1.0.11", 535 | "safe-buffer": "^5.0.1" 536 | } 537 | }, 538 | "node_modules/jws": { 539 | "version": "4.0.0", 540 | "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", 541 | "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", 542 | "dependencies": { 543 | "jwa": "^2.0.0", 544 | "safe-buffer": "^5.0.1" 545 | } 546 | }, 547 | "node_modules/lodash": { 548 | "version": "4.17.21", 549 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 550 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 551 | }, 552 | "node_modules/lru-cache": { 553 | "version": "6.0.0", 554 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 555 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 556 | "dependencies": { 557 | "yallist": "^4.0.0" 558 | }, 559 | "engines": { 560 | "node": ">=10" 561 | } 562 | }, 563 | "node_modules/mime-db": { 564 | "version": "1.52.0", 565 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 566 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 567 | "engines": { 568 | "node": ">= 0.6" 569 | } 570 | }, 571 | "node_modules/mime-types": { 572 | "version": "2.1.35", 573 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 574 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 575 | "dependencies": { 576 | "mime-db": "1.52.0" 577 | }, 578 | "engines": { 579 | "node": ">= 0.6" 580 | } 581 | }, 582 | "node_modules/ms": { 583 | "version": "2.1.2", 584 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 585 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 586 | }, 587 | "node_modules/node-fetch": { 588 | "version": "2.6.7", 589 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", 590 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", 591 | "dependencies": { 592 | "whatwg-url": "^5.0.0" 593 | }, 594 | "engines": { 595 | "node": "4.x || >=6.0.0" 596 | }, 597 | "peerDependencies": { 598 | "encoding": "^0.1.0" 599 | }, 600 | "peerDependenciesMeta": { 601 | "encoding": { 602 | "optional": true 603 | } 604 | } 605 | }, 606 | "node_modules/open": { 607 | "version": "8.4.0", 608 | "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", 609 | "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", 610 | "dependencies": { 611 | "define-lazy-prop": "^2.0.0", 612 | "is-docker": "^2.1.1", 613 | "is-wsl": "^2.2.0" 614 | }, 615 | "engines": { 616 | "node": ">=12" 617 | }, 618 | "funding": { 619 | "url": "https://github.com/sponsors/sindresorhus" 620 | } 621 | }, 622 | "node_modules/process": { 623 | "version": "0.11.10", 624 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", 625 | "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", 626 | "engines": { 627 | "node": ">= 0.6.0" 628 | } 629 | }, 630 | "node_modules/psl": { 631 | "version": "1.9.0", 632 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", 633 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" 634 | }, 635 | "node_modules/punycode": { 636 | "version": "2.1.1", 637 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 638 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 639 | "engines": { 640 | "node": ">=6" 641 | } 642 | }, 643 | "node_modules/querystringify": { 644 | "version": "2.2.0", 645 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 646 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" 647 | }, 648 | "node_modules/requires-port": { 649 | "version": "1.0.0", 650 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 651 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" 652 | }, 653 | "node_modules/safe-buffer": { 654 | "version": "5.2.1", 655 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 656 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 657 | "funding": [ 658 | { 659 | "type": "github", 660 | "url": "https://github.com/sponsors/feross" 661 | }, 662 | { 663 | "type": "patreon", 664 | "url": "https://www.patreon.com/feross" 665 | }, 666 | { 667 | "type": "consulting", 668 | "url": "https://feross.org/support" 669 | } 670 | ] 671 | }, 672 | "node_modules/sax": { 673 | "version": "1.2.4", 674 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 675 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 676 | }, 677 | "node_modules/semver": { 678 | "version": "7.3.8", 679 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", 680 | "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", 681 | "dependencies": { 682 | "lru-cache": "^6.0.0" 683 | }, 684 | "bin": { 685 | "semver": "bin/semver.js" 686 | }, 687 | "engines": { 688 | "node": ">=10" 689 | } 690 | }, 691 | "node_modules/stoppable": { 692 | "version": "1.1.0", 693 | "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", 694 | "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", 695 | "engines": { 696 | "node": ">=4", 697 | "npm": ">=6" 698 | } 699 | }, 700 | "node_modules/tough-cookie": { 701 | "version": "4.1.2", 702 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", 703 | "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", 704 | "dependencies": { 705 | "psl": "^1.1.33", 706 | "punycode": "^2.1.1", 707 | "universalify": "^0.2.0", 708 | "url-parse": "^1.5.3" 709 | }, 710 | "engines": { 711 | "node": ">=6" 712 | } 713 | }, 714 | "node_modules/tr46": { 715 | "version": "0.0.3", 716 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 717 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 718 | }, 719 | "node_modules/tslib": { 720 | "version": "2.4.0", 721 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", 722 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" 723 | }, 724 | "node_modules/tunnel": { 725 | "version": "0.0.6", 726 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 727 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 728 | "engines": { 729 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 730 | } 731 | }, 732 | "node_modules/universalify": { 733 | "version": "0.2.0", 734 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", 735 | "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", 736 | "engines": { 737 | "node": ">= 4.0.0" 738 | } 739 | }, 740 | "node_modules/url-parse": { 741 | "version": "1.5.10", 742 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", 743 | "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", 744 | "dependencies": { 745 | "querystringify": "^2.1.1", 746 | "requires-port": "^1.0.0" 747 | } 748 | }, 749 | "node_modules/uuid": { 750 | "version": "8.3.2", 751 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 752 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 753 | "bin": { 754 | "uuid": "dist/bin/uuid" 755 | } 756 | }, 757 | "node_modules/webidl-conversions": { 758 | "version": "3.0.1", 759 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 760 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 761 | }, 762 | "node_modules/whatwg-url": { 763 | "version": "5.0.0", 764 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 765 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 766 | "dependencies": { 767 | "tr46": "~0.0.3", 768 | "webidl-conversions": "^3.0.0" 769 | } 770 | }, 771 | "node_modules/xml2js": { 772 | "version": "0.4.23", 773 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 774 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 775 | "dependencies": { 776 | "sax": ">=0.6.0", 777 | "xmlbuilder": "~11.0.0" 778 | }, 779 | "engines": { 780 | "node": ">=4.0.0" 781 | } 782 | }, 783 | "node_modules/xmlbuilder": { 784 | "version": "11.0.1", 785 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 786 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", 787 | "engines": { 788 | "node": ">=4.0" 789 | } 790 | }, 791 | "node_modules/yallist": { 792 | "version": "4.0.0", 793 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 794 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 795 | } 796 | }, 797 | "dependencies": { 798 | "@actions/core": { 799 | "version": "1.10.0", 800 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", 801 | "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", 802 | "requires": { 803 | "@actions/http-client": "^2.0.1", 804 | "uuid": "^8.3.2" 805 | } 806 | }, 807 | "@actions/http-client": { 808 | "version": "2.0.1", 809 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", 810 | "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", 811 | "requires": { 812 | "tunnel": "^0.0.6" 813 | } 814 | }, 815 | "@azure/abort-controller": { 816 | "version": "1.1.0", 817 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", 818 | "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", 819 | "requires": { 820 | "tslib": "^2.2.0" 821 | } 822 | }, 823 | "@azure/core-auth": { 824 | "version": "1.4.0", 825 | "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz", 826 | "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==", 827 | "requires": { 828 | "@azure/abort-controller": "^1.0.0", 829 | "tslib": "^2.2.0" 830 | } 831 | }, 832 | "@azure/core-client": { 833 | "version": "1.7.0", 834 | "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.0.tgz", 835 | "integrity": "sha512-fgaLVlF3xGg8JAt7Hl7vkKIJcCAA9NpsvIvb44qaEOW6CaJ+IaHKL7oWe5+oGOVR+y/z2Gd2joyvslqwDvRfTw==", 836 | "requires": { 837 | "@azure/abort-controller": "^1.0.0", 838 | "@azure/core-auth": "^1.4.0", 839 | "@azure/core-rest-pipeline": "^1.9.1", 840 | "@azure/core-tracing": "^1.0.0", 841 | "@azure/core-util": "^1.0.0", 842 | "@azure/logger": "^1.0.0", 843 | "tslib": "^2.2.0" 844 | }, 845 | "dependencies": { 846 | "@azure/core-tracing": { 847 | "version": "1.0.1", 848 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 849 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 850 | "requires": { 851 | "tslib": "^2.2.0" 852 | } 853 | } 854 | } 855 | }, 856 | "@azure/core-http": { 857 | "version": "2.2.7", 858 | "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.7.tgz", 859 | "integrity": "sha512-TyGMeDm90mkRS8XzSQbSMD+TqnWL1XKGCh0x0QVGMD8COH2yU0q5SaHm/IBEBkzcq0u73NhS/p57T3KVSgUFqQ==", 860 | "requires": { 861 | "@azure/abort-controller": "^1.0.0", 862 | "@azure/core-auth": "^1.3.0", 863 | "@azure/core-tracing": "1.0.0-preview.13", 864 | "@azure/core-util": "^1.1.0", 865 | "@azure/logger": "^1.0.0", 866 | "@types/node-fetch": "^2.5.0", 867 | "@types/tunnel": "^0.0.3", 868 | "form-data": "^4.0.0", 869 | "node-fetch": "^2.6.7", 870 | "process": "^0.11.10", 871 | "tough-cookie": "^4.0.0", 872 | "tslib": "^2.2.0", 873 | "tunnel": "^0.0.6", 874 | "uuid": "^8.3.0", 875 | "xml2js": "^0.4.19" 876 | } 877 | }, 878 | "@azure/core-lro": { 879 | "version": "2.4.0", 880 | "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.4.0.tgz", 881 | "integrity": "sha512-F65+rYkll1dpw3RGm8/SSiSj+/QkMeYDanzS/QKlM1dmuneVyXbO46C88V1MRHluLGdMP6qfD3vDRYALn0z0tQ==", 882 | "requires": { 883 | "@azure/abort-controller": "^1.0.0", 884 | "@azure/logger": "^1.0.0", 885 | "tslib": "^2.2.0" 886 | } 887 | }, 888 | "@azure/core-paging": { 889 | "version": "1.3.0", 890 | "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.3.0.tgz", 891 | "integrity": "sha512-H6Tg9eBm0brHqLy0OSAGzxIh1t4UL8eZVrSUMJ60Ra9cwq2pOskFqVpz2pYoHDsBY1jZ4V/P8LRGb5D5pmC6rg==", 892 | "requires": { 893 | "tslib": "^2.2.0" 894 | } 895 | }, 896 | "@azure/core-rest-pipeline": { 897 | "version": "1.10.1", 898 | "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.1.tgz", 899 | "integrity": "sha512-Kji9k6TOFRDB5ZMTw8qUf2IJ+CeJtsuMdAHox9eqpTf1cefiNMpzrfnF6sINEBZJsaVaWgQ0o48B6kcUH68niA==", 900 | "requires": { 901 | "@azure/abort-controller": "^1.0.0", 902 | "@azure/core-auth": "^1.4.0", 903 | "@azure/core-tracing": "^1.0.1", 904 | "@azure/core-util": "^1.0.0", 905 | "@azure/logger": "^1.0.0", 906 | "form-data": "^4.0.0", 907 | "http-proxy-agent": "^5.0.0", 908 | "https-proxy-agent": "^5.0.0", 909 | "tslib": "^2.2.0", 910 | "uuid": "^8.3.0" 911 | }, 912 | "dependencies": { 913 | "@azure/core-tracing": { 914 | "version": "1.0.1", 915 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 916 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 917 | "requires": { 918 | "tslib": "^2.2.0" 919 | } 920 | } 921 | } 922 | }, 923 | "@azure/core-tracing": { 924 | "version": "1.0.0-preview.13", 925 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", 926 | "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", 927 | "requires": { 928 | "@opentelemetry/api": "^1.0.1", 929 | "tslib": "^2.2.0" 930 | } 931 | }, 932 | "@azure/core-util": { 933 | "version": "1.1.1", 934 | "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.1.1.tgz", 935 | "integrity": "sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==", 936 | "requires": { 937 | "@azure/abort-controller": "^1.0.0", 938 | "tslib": "^2.2.0" 939 | } 940 | }, 941 | "@azure/identity": { 942 | "version": "3.1.3", 943 | "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-3.1.3.tgz", 944 | "integrity": "sha512-y0jFjSfHsVPwXSwi3KaSPtOZtJZqhiqAhWUXfFYBUd/+twUBovZRXspBwLrF5rJe0r5NyvmScpQjL+TYDTQVvw==", 945 | "requires": { 946 | "@azure/abort-controller": "^1.0.0", 947 | "@azure/core-auth": "^1.3.0", 948 | "@azure/core-client": "^1.4.0", 949 | "@azure/core-rest-pipeline": "^1.1.0", 950 | "@azure/core-tracing": "^1.0.0", 951 | "@azure/core-util": "^1.0.0", 952 | "@azure/logger": "^1.0.0", 953 | "@azure/msal-browser": "^2.32.2", 954 | "@azure/msal-common": "^9.0.2", 955 | "@azure/msal-node": "^1.14.6", 956 | "events": "^3.0.0", 957 | "jws": "^4.0.0", 958 | "open": "^8.0.0", 959 | "stoppable": "^1.1.0", 960 | "tslib": "^2.2.0", 961 | "uuid": "^8.3.0" 962 | }, 963 | "dependencies": { 964 | "@azure/core-tracing": { 965 | "version": "1.0.1", 966 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", 967 | "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", 968 | "requires": { 969 | "tslib": "^2.2.0" 970 | } 971 | } 972 | } 973 | }, 974 | "@azure/logger": { 975 | "version": "1.0.3", 976 | "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", 977 | "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", 978 | "requires": { 979 | "tslib": "^2.2.0" 980 | } 981 | }, 982 | "@azure/msal-browser": { 983 | "version": "2.32.2", 984 | "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.32.2.tgz", 985 | "integrity": "sha512-1YqGzXtPG3QrZPFBKaMWr2WQdukDj+PelqUCv351+p+hlw/AhdRrb8haY73/iqkhT6Cdrbnh7sL4gikVsF4O1g==", 986 | "requires": { 987 | "@azure/msal-common": "^9.0.2" 988 | } 989 | }, 990 | "@azure/msal-common": { 991 | "version": "9.1.1", 992 | "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", 993 | "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==" 994 | }, 995 | "@azure/msal-node": { 996 | "version": "1.14.6", 997 | "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.6.tgz", 998 | "integrity": "sha512-em/qqFL5tLMxMPl9vormAs13OgZpmQoJbiQ/GlWr+BA77eCLoL+Ehr5xRHowYo+LFe5b+p+PJVkRvT+mLvOkwA==", 999 | "requires": { 1000 | "@azure/msal-common": "^9.0.2", 1001 | "jsonwebtoken": "^9.0.0", 1002 | "uuid": "^8.3.0" 1003 | } 1004 | }, 1005 | "@azure/storage-blob": { 1006 | "version": "12.12.0", 1007 | "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.12.0.tgz", 1008 | "integrity": "sha512-o/Mf6lkyYG/eBW4/hXB9864RxVNmAkcKHjsGR6Inlp5hupa3exjSyH2KjO3tLO//YGA+tS+17hM2bxRl9Sn16g==", 1009 | "requires": { 1010 | "@azure/abort-controller": "^1.0.0", 1011 | "@azure/core-http": "^2.0.0", 1012 | "@azure/core-lro": "^2.2.0", 1013 | "@azure/core-paging": "^1.1.1", 1014 | "@azure/core-tracing": "1.0.0-preview.13", 1015 | "@azure/logger": "^1.0.0", 1016 | "events": "^3.0.0", 1017 | "tslib": "^2.2.0" 1018 | } 1019 | }, 1020 | "@opentelemetry/api": { 1021 | "version": "1.2.0", 1022 | "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.2.0.tgz", 1023 | "integrity": "sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g==" 1024 | }, 1025 | "@tootallnate/once": { 1026 | "version": "2.0.0", 1027 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", 1028 | "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" 1029 | }, 1030 | "@types/node": { 1031 | "version": "18.11.6", 1032 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.6.tgz", 1033 | "integrity": "sha512-j3CEDa2vd96K0AXF8Wur7UucACvnjkk8hYyQAHhUNciabZLDl9nfAEVUSwmh245OOZV15bRA3Y590Gi5jUcDJg==" 1034 | }, 1035 | "@types/node-fetch": { 1036 | "version": "2.6.2", 1037 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", 1038 | "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", 1039 | "requires": { 1040 | "@types/node": "*", 1041 | "form-data": "^3.0.0" 1042 | }, 1043 | "dependencies": { 1044 | "form-data": { 1045 | "version": "3.0.1", 1046 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", 1047 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", 1048 | "requires": { 1049 | "asynckit": "^0.4.0", 1050 | "combined-stream": "^1.0.8", 1051 | "mime-types": "^2.1.12" 1052 | } 1053 | } 1054 | } 1055 | }, 1056 | "@types/tunnel": { 1057 | "version": "0.0.3", 1058 | "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", 1059 | "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", 1060 | "requires": { 1061 | "@types/node": "*" 1062 | } 1063 | }, 1064 | "@vercel/ncc": { 1065 | "version": "0.34.0", 1066 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", 1067 | "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==", 1068 | "dev": true 1069 | }, 1070 | "agent-base": { 1071 | "version": "6.0.2", 1072 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 1073 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 1074 | "requires": { 1075 | "debug": "4" 1076 | } 1077 | }, 1078 | "asynckit": { 1079 | "version": "0.4.0", 1080 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 1081 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 1082 | }, 1083 | "buffer-equal-constant-time": { 1084 | "version": "1.0.1", 1085 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 1086 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 1087 | }, 1088 | "combined-stream": { 1089 | "version": "1.0.8", 1090 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 1091 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 1092 | "requires": { 1093 | "delayed-stream": "~1.0.0" 1094 | } 1095 | }, 1096 | "debug": { 1097 | "version": "4.3.4", 1098 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1099 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1100 | "requires": { 1101 | "ms": "2.1.2" 1102 | } 1103 | }, 1104 | "define-lazy-prop": { 1105 | "version": "2.0.0", 1106 | "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", 1107 | "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" 1108 | }, 1109 | "delayed-stream": { 1110 | "version": "1.0.0", 1111 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 1112 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 1113 | }, 1114 | "ecdsa-sig-formatter": { 1115 | "version": "1.0.11", 1116 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 1117 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 1118 | "requires": { 1119 | "safe-buffer": "^5.0.1" 1120 | } 1121 | }, 1122 | "events": { 1123 | "version": "3.3.0", 1124 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 1125 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" 1126 | }, 1127 | "form-data": { 1128 | "version": "4.0.0", 1129 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 1130 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 1131 | "requires": { 1132 | "asynckit": "^0.4.0", 1133 | "combined-stream": "^1.0.8", 1134 | "mime-types": "^2.1.12" 1135 | } 1136 | }, 1137 | "http-proxy-agent": { 1138 | "version": "5.0.0", 1139 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", 1140 | "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", 1141 | "requires": { 1142 | "@tootallnate/once": "2", 1143 | "agent-base": "6", 1144 | "debug": "4" 1145 | } 1146 | }, 1147 | "https-proxy-agent": { 1148 | "version": "5.0.1", 1149 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 1150 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 1151 | "requires": { 1152 | "agent-base": "6", 1153 | "debug": "4" 1154 | } 1155 | }, 1156 | "is-docker": { 1157 | "version": "2.2.1", 1158 | "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", 1159 | "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" 1160 | }, 1161 | "is-wsl": { 1162 | "version": "2.2.0", 1163 | "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", 1164 | "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", 1165 | "requires": { 1166 | "is-docker": "^2.0.0" 1167 | } 1168 | }, 1169 | "jsonwebtoken": { 1170 | "version": "9.0.0", 1171 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", 1172 | "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", 1173 | "requires": { 1174 | "jws": "^3.2.2", 1175 | "lodash": "^4.17.21", 1176 | "ms": "^2.1.1", 1177 | "semver": "^7.3.8" 1178 | }, 1179 | "dependencies": { 1180 | "jwa": { 1181 | "version": "1.4.1", 1182 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 1183 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 1184 | "requires": { 1185 | "buffer-equal-constant-time": "1.0.1", 1186 | "ecdsa-sig-formatter": "1.0.11", 1187 | "safe-buffer": "^5.0.1" 1188 | } 1189 | }, 1190 | "jws": { 1191 | "version": "3.2.2", 1192 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 1193 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 1194 | "requires": { 1195 | "jwa": "^1.4.1", 1196 | "safe-buffer": "^5.0.1" 1197 | } 1198 | } 1199 | } 1200 | }, 1201 | "jwa": { 1202 | "version": "2.0.0", 1203 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", 1204 | "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", 1205 | "requires": { 1206 | "buffer-equal-constant-time": "1.0.1", 1207 | "ecdsa-sig-formatter": "1.0.11", 1208 | "safe-buffer": "^5.0.1" 1209 | } 1210 | }, 1211 | "jws": { 1212 | "version": "4.0.0", 1213 | "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", 1214 | "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", 1215 | "requires": { 1216 | "jwa": "^2.0.0", 1217 | "safe-buffer": "^5.0.1" 1218 | } 1219 | }, 1220 | "lodash": { 1221 | "version": "4.17.21", 1222 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1223 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 1224 | }, 1225 | "lru-cache": { 1226 | "version": "6.0.0", 1227 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1228 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1229 | "requires": { 1230 | "yallist": "^4.0.0" 1231 | } 1232 | }, 1233 | "mime-db": { 1234 | "version": "1.52.0", 1235 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1236 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 1237 | }, 1238 | "mime-types": { 1239 | "version": "2.1.35", 1240 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1241 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1242 | "requires": { 1243 | "mime-db": "1.52.0" 1244 | } 1245 | }, 1246 | "ms": { 1247 | "version": "2.1.2", 1248 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1249 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1250 | }, 1251 | "node-fetch": { 1252 | "version": "2.6.7", 1253 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", 1254 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", 1255 | "requires": { 1256 | "whatwg-url": "^5.0.0" 1257 | } 1258 | }, 1259 | "open": { 1260 | "version": "8.4.0", 1261 | "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", 1262 | "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", 1263 | "requires": { 1264 | "define-lazy-prop": "^2.0.0", 1265 | "is-docker": "^2.1.1", 1266 | "is-wsl": "^2.2.0" 1267 | } 1268 | }, 1269 | "process": { 1270 | "version": "0.11.10", 1271 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", 1272 | "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" 1273 | }, 1274 | "psl": { 1275 | "version": "1.9.0", 1276 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", 1277 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" 1278 | }, 1279 | "punycode": { 1280 | "version": "2.1.1", 1281 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1282 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 1283 | }, 1284 | "querystringify": { 1285 | "version": "2.2.0", 1286 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 1287 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" 1288 | }, 1289 | "requires-port": { 1290 | "version": "1.0.0", 1291 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 1292 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" 1293 | }, 1294 | "safe-buffer": { 1295 | "version": "5.2.1", 1296 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1297 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 1298 | }, 1299 | "sax": { 1300 | "version": "1.2.4", 1301 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 1302 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 1303 | }, 1304 | "semver": { 1305 | "version": "7.3.8", 1306 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", 1307 | "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", 1308 | "requires": { 1309 | "lru-cache": "^6.0.0" 1310 | } 1311 | }, 1312 | "stoppable": { 1313 | "version": "1.1.0", 1314 | "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", 1315 | "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==" 1316 | }, 1317 | "tough-cookie": { 1318 | "version": "4.1.2", 1319 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", 1320 | "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", 1321 | "requires": { 1322 | "psl": "^1.1.33", 1323 | "punycode": "^2.1.1", 1324 | "universalify": "^0.2.0", 1325 | "url-parse": "^1.5.3" 1326 | } 1327 | }, 1328 | "tr46": { 1329 | "version": "0.0.3", 1330 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1331 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 1332 | }, 1333 | "tslib": { 1334 | "version": "2.4.0", 1335 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", 1336 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" 1337 | }, 1338 | "tunnel": { 1339 | "version": "0.0.6", 1340 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 1341 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" 1342 | }, 1343 | "universalify": { 1344 | "version": "0.2.0", 1345 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", 1346 | "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" 1347 | }, 1348 | "url-parse": { 1349 | "version": "1.5.10", 1350 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", 1351 | "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", 1352 | "requires": { 1353 | "querystringify": "^2.1.1", 1354 | "requires-port": "^1.0.0" 1355 | } 1356 | }, 1357 | "uuid": { 1358 | "version": "8.3.2", 1359 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1360 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" 1361 | }, 1362 | "webidl-conversions": { 1363 | "version": "3.0.1", 1364 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1365 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 1366 | }, 1367 | "whatwg-url": { 1368 | "version": "5.0.0", 1369 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1370 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 1371 | "requires": { 1372 | "tr46": "~0.0.3", 1373 | "webidl-conversions": "^3.0.0" 1374 | } 1375 | }, 1376 | "xml2js": { 1377 | "version": "0.4.23", 1378 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 1379 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 1380 | "requires": { 1381 | "sax": ">=0.6.0", 1382 | "xmlbuilder": "~11.0.0" 1383 | } 1384 | }, 1385 | "xmlbuilder": { 1386 | "version": "11.0.1", 1387 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 1388 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" 1389 | }, 1390 | "yallist": { 1391 | "version": "4.0.0", 1392 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1393 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1394 | } 1395 | } 1396 | } 1397 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "static-website-deploy", 3 | "version": "3.0.0", 4 | "description": "With this action, you can automate your workflow to deploy files to Azure Storage Account", 5 | "main": "dist/index.js", 6 | "scripts": { 7 | "build": "ncc build index.js -C --out dist", 8 | "test": "echo \"Error: no test specified\" && exit 0" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/tibor19/static-website-deploy.git" 13 | }, 14 | "author": { 15 | "name": "Tiberiu Covaci", 16 | "url": "https://github.com/tibor19" 17 | }, 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/tibor19/static-website-deploy/issues" 21 | }, 22 | "homepage": "https://github.com/tibor19/static-website-deploy#readme", 23 | "dependencies": { 24 | "@actions/core": "^1.10.0", 25 | "@azure/identity": "^3.1.3", 26 | "@azure/storage-blob": "^12.12.0", 27 | "mime-types": "^2.1.35" 28 | }, 29 | "devDependencies": { 30 | "@vercel/ncc": "^0.36.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /storage-accounts.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /workflows-samples/blazor-web-assembly.yml: -------------------------------------------------------------------------------- 1 | name: .NET Core Build and Deploy 2 | 3 | on: [push] 4 | 5 | jobs: 6 | deploy: 7 | name: Deploy 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: 'Checkout the code' 12 | uses: actions/checkout@v2 13 | 14 | - name: 'Build with dotnet' 15 | run: dotnet build --configuration Release 16 | 17 | - name: 'Publish with dotnet' 18 | run: dotnet publish --configuration Release -o app 19 | 20 | - name: Deploy to Static Website on Azure Blob Storage 21 | uses: tibor19/static-website-deploy@v3 22 | with: 23 | enabled-static-website: 'true' 24 | folder: 'app/[Blazor Project Name]/dist' # example: 'app/MyBlazorSite/dist' 25 | connection-string: ${{ secrets.CONNECTION_STRING }} -------------------------------------------------------------------------------- /workflows-samples/blob-container-as-cdn.yml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | jobs: 3 | build: 4 | runs-on: ubuntu-latest 5 | steps: 6 | - name: 'Checkout the code' 7 | uses: actions/checkout@v2 8 | 9 | - name: 'Deploy to an Azure Storage container called cdn' 10 | uses: tibor19/static-website-deploy@v3 11 | with: 12 | folder: 'files' # All files and subfolders found in the specified folder will be uploaded. 13 | connection-string: ${{ secrets.CONNECTION_STRING }} 14 | public-access-policy: container # container | blob | 15 | blob-container-name: 'cdn' -------------------------------------------------------------------------------- /workflows-samples/spa-react.yml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | jobs: 3 | build: 4 | runs-on: ubuntu-latest 5 | steps: 6 | - name: 'Checkout the code' 7 | uses: actions/checkout@v2 8 | 9 | - name: 'Build with node' 10 | run: | 11 | npm install 12 | npm run build --if-exists 13 | 14 | - name: 'Deploy to Static Website on Azure Blob Storage' 15 | uses: tibor19/static-website-deploy@v3 16 | with: 17 | enabled-static-website: 'true' 18 | folder: 'build' 19 | connection-string: ${{ secrets.CONNECTION_STRING }} -------------------------------------------------------------------------------- /workflows-samples/static-web-site.yml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | jobs: 3 | build: 4 | runs-on: ubuntu-latest 5 | steps: 6 | - name: 'Checkout the code' 7 | uses: actions/checkout@v2 8 | 9 | - name: 'Deploy to Static Website on Azure Blob Storage' 10 | uses: tibor19/static-website-deploy@v3 11 | with: 12 | enabled-static-website: 'true' 13 | folder: 'src' #This folder contains all files of the website for example index.html and folders css, js, assets, etc 14 | connection-string: ${{ secrets.CONNECTION_STRING }} --------------------------------------------------------------------------------