├── .gdn └── .gdnsuppress ├── .github └── workflows │ ├── on-push-verification.yml │ ├── sample-workflow-ubuntu-latest.yml │ └── sample-workflow-windows-latest.yml.disabled ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── action.yml ├── build.proj ├── lib ├── action.js └── msca-toolkit │ ├── msca-installer.js │ ├── msca-toolkit.js │ └── msca-toolkit.proj ├── node_modules ├── .bin │ ├── esparse │ ├── esparse.cmd │ ├── esparse.ps1 │ ├── esvalidate │ ├── esvalidate.cmd │ ├── esvalidate.ps1 │ ├── js-yaml │ ├── js-yaml.cmd │ ├── js-yaml.ps1 │ ├── tsc │ ├── tsc.cmd │ ├── tsc.ps1 │ ├── tsserver │ ├── tsserver.cmd │ └── tsserver.ps1 ├── @actions │ ├── core │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── command.d.ts │ │ │ ├── command.js │ │ │ ├── command.js.map │ │ │ ├── core.d.ts │ │ │ ├── core.js │ │ │ ├── core.js.map │ │ │ ├── file-command.d.ts │ │ │ ├── file-command.js │ │ │ ├── file-command.js.map │ │ │ ├── utils.d.ts │ │ │ ├── utils.js │ │ │ └── utils.js.map │ │ └── package.json │ ├── exec │ │ ├── README.md │ │ ├── lib │ │ │ ├── exec.d.ts │ │ │ ├── exec.js │ │ │ ├── exec.js.map │ │ │ ├── interfaces.d.ts │ │ │ ├── interfaces.js │ │ │ ├── interfaces.js.map │ │ │ ├── toolrunner.d.ts │ │ │ ├── toolrunner.js │ │ │ └── toolrunner.js.map │ │ └── package.json │ └── io │ │ ├── README.md │ │ ├── lib │ │ ├── io-util.d.ts │ │ ├── io-util.js │ │ ├── io-util.js.map │ │ ├── io.d.ts │ │ ├── io.js │ │ └── io.js.map │ │ └── package.json ├── @sinonjs │ ├── commons │ │ ├── .editorconfig │ │ ├── .eslintignore │ │ ├── .eslintrc.yaml │ │ ├── .prettierrc │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── eslint-local-rules.js │ │ ├── lib │ │ │ ├── called-in-order.js │ │ │ ├── called-in-order.test.js │ │ │ ├── class-name.js │ │ │ ├── class-name.test.js │ │ │ ├── deprecated.js │ │ │ ├── deprecated.test.js │ │ │ ├── every.js │ │ │ ├── every.test.js │ │ │ ├── function-name.js │ │ │ ├── function-name.test.js │ │ │ ├── index.js │ │ │ ├── index.test.js │ │ │ ├── order-by-first-call.js │ │ │ ├── order-by-first-call.test.js │ │ │ ├── prototypes │ │ │ │ ├── README.md │ │ │ │ ├── array.js │ │ │ │ ├── copy-prototype.js │ │ │ │ ├── function.js │ │ │ │ ├── index.js │ │ │ │ ├── index.test.js │ │ │ │ ├── object.js │ │ │ │ └── string.js │ │ │ ├── type-of.js │ │ │ ├── type-of.test.js │ │ │ ├── value-to-string.js │ │ │ └── value-to-string.test.js │ │ └── package.json │ ├── formatio │ │ ├── LICENSE │ │ ├── README.md │ │ ├── lib │ │ │ └── formatio.js │ │ └── package.json │ ├── samsam │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist │ │ │ └── samsam.js │ │ ├── docs │ │ │ └── index.md │ │ ├── lib │ │ │ ├── create-set.js │ │ │ ├── deep-equal-benchmark.js │ │ │ ├── deep-equal.js │ │ │ ├── get-class-name.js │ │ │ ├── get-class.js │ │ │ ├── identical.js │ │ │ ├── is-arguments.js │ │ │ ├── is-date.js │ │ │ ├── is-element.js │ │ │ ├── is-map.js │ │ │ ├── is-nan.js │ │ │ ├── is-neg-zero.js │ │ │ ├── is-object.js │ │ │ ├── is-set.js │ │ │ ├── is-subset.js │ │ │ ├── iterable-to-string.js │ │ │ ├── match.js │ │ │ ├── matcher.js │ │ │ └── samsam.js │ │ └── package.json │ └── text-encoding │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── index.js │ │ ├── lib │ │ ├── encoding-indexes.js │ │ └── encoding.js │ │ └── package.json ├── @types │ ├── mocha │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ ├── node │ │ ├── LICENSE │ │ ├── README.md │ │ ├── base.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── package.json │ │ └── ts3.2 │ │ │ └── index.d.ts │ ├── q │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ └── sinon │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json ├── argparse │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── action.js │ │ ├── action │ │ │ ├── append.js │ │ │ ├── append │ │ │ │ └── constant.js │ │ │ ├── count.js │ │ │ ├── help.js │ │ │ ├── store.js │ │ │ ├── store │ │ │ │ ├── constant.js │ │ │ │ ├── false.js │ │ │ │ └── true.js │ │ │ ├── subparsers.js │ │ │ └── version.js │ │ ├── action_container.js │ │ ├── argparse.js │ │ ├── argument │ │ │ ├── error.js │ │ │ ├── exclusive.js │ │ │ └── group.js │ │ ├── argument_parser.js │ │ ├── const.js │ │ ├── help │ │ │ ├── added_formatters.js │ │ │ └── formatter.js │ │ ├── namespace.js │ │ └── utils.js │ └── package.json ├── esprima │ ├── ChangeLog │ ├── LICENSE.BSD │ ├── README.md │ ├── dist │ │ └── esprima.js │ └── package.json ├── js-yaml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ ├── js-yaml.js │ │ └── js-yaml.min.js │ ├── index.js │ ├── lib │ │ ├── js-yaml.js │ │ └── js-yaml │ │ │ ├── common.js │ │ │ ├── dumper.js │ │ │ ├── exception.js │ │ │ ├── loader.js │ │ │ ├── mark.js │ │ │ ├── schema.js │ │ │ ├── schema │ │ │ ├── core.js │ │ │ ├── default_full.js │ │ │ ├── default_safe.js │ │ │ ├── failsafe.js │ │ │ └── json.js │ │ │ ├── type.js │ │ │ └── type │ │ │ ├── binary.js │ │ │ ├── bool.js │ │ │ ├── float.js │ │ │ ├── int.js │ │ │ ├── js │ │ │ ├── function.js │ │ │ ├── regexp.js │ │ │ └── undefined.js │ │ │ ├── map.js │ │ │ ├── merge.js │ │ │ ├── null.js │ │ │ ├── omap.js │ │ │ ├── pairs.js │ │ │ ├── seq.js │ │ │ ├── set.js │ │ │ ├── str.js │ │ │ └── timestamp.js │ └── package.json └── sprintf-js │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── demo │ └── angular.html │ ├── dist │ ├── angular-sprintf.min.js │ ├── angular-sprintf.min.js.map │ ├── angular-sprintf.min.map │ ├── sprintf.min.js │ ├── sprintf.min.js.map │ └── sprintf.min.map │ ├── gruntfile.js │ ├── package.json │ ├── src │ ├── angular-sprintf.js │ └── sprintf.js │ └── test │ └── test.js ├── package-lock.json ├── package.json ├── policy ├── github.changelog.md └── github.nuspec ├── sample ├── ClassLibrary1.sln └── ClassLibrary1 │ ├── Class1.cs │ └── ClassLibrary1.csproj ├── src ├── action.ts ├── build.proj └── msca-toolkit │ ├── msca-installer.ts │ ├── msca-toolkit.proj │ └── msca-toolkit.ts └── tsconfig.json /.github/workflows/on-push-verification.yml: -------------------------------------------------------------------------------- 1 | # sample-workflow-windows-latest 2 | # docs are in the repo 3 | 4 | name: Code Analysis on-push-verification windows-latest 5 | on: push 6 | 7 | jobs: 8 | sample: 9 | name: .NET Code Analysis runner 10 | 11 | # .NET Code Analysis runs on windows-latest. 12 | # ubuntu-latest and macos-latest supporting coming soon 13 | runs-on: windows-latest 14 | 15 | steps: 16 | 17 | # Checkout your code repository to scan 18 | - uses: actions/checkout@v2 19 | 20 | # Ensure compatible versions of dotnet are installed. 21 | # The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. 22 | # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. 23 | # Remote agents already have a compatible version of dotnet installed and this step may be skipped. 24 | # For local agents, ensure dotnet version 3.1.201 or later is installed by including this action: 25 | # - uses: actions/setup-dotnet@v1 26 | # with: 27 | # dotnet-version: '3.1.x' 28 | 29 | # Run NuGet restore 30 | - name: Run NuGet restore 31 | run: dotnet restore .\sample\ClassLibrary1.sln 32 | 33 | # Run .NET Code Analysis 34 | - name: Run .NET Code Analysis 35 | uses: ./ 36 | id: code-analysis 37 | with: 38 | project: .\sample\ClassLibrary1.sln 39 | build-breaking: false 40 | all-categories: all 41 | 42 | # Upload the analysis results file 43 | - name: Upload analysis results 44 | uses: actions/upload-artifact@v2 45 | with: 46 | name: analysis_results.sarif 47 | path: ${{ steps.code-analysis.outputs.sarifFile }} 48 | -------------------------------------------------------------------------------- /.github/workflows/sample-workflow-ubuntu-latest.yml: -------------------------------------------------------------------------------- 1 | # sample-workflow-ubuntu-latest 2 | # docs are in the repo 3 | 4 | name: .NET Code Analysis ubuntu-latest 5 | on: 6 | push: 7 | branches: 8 | - main 9 | 10 | jobs: 11 | sample: 12 | name: .NET Code Analysis runner 13 | 14 | # .NET Code Analysis runs on windows-latest. 15 | # ubuntu-latest and macos-latest supporting coming soon 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | 20 | # Checkout your code repository to scan 21 | - uses: actions/checkout@v2 22 | 23 | # Ensure compatible versions of dotnet are installed. 24 | # The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. 25 | # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. 26 | # Remote agents already have a compatible version of dotnet installed and this step may be skipped. 27 | # For local agents, ensure dotnet version 3.1.201 or later is installed by including this action: 28 | # - uses: actions/setup-dotnet@v1 29 | # with: 30 | # dotnet-version: '3.1.x' 31 | 32 | # Run NuGet restore for the solution at repo root 33 | - name: Run NuGet restore 34 | run: dotnet restore 35 | 36 | # Run code analysis for the solution at repo root 37 | - name: Run .NET Code Analysis 38 | uses: dotnet/code-analysis@main 39 | id: code-analysis 40 | with: 41 | build-breaking: false 42 | 43 | # Upload the analysis results file 44 | - name: Upload analysis results 45 | uses: actions/upload-artifact@v2 46 | with: 47 | name: analysis_results.sarif 48 | path: ${{ steps.code-analysis.outputs.sarifFile }} 49 | -------------------------------------------------------------------------------- /.github/workflows/sample-workflow-windows-latest.yml.disabled: -------------------------------------------------------------------------------- 1 | # sample-workflow-windows-latest 2 | # docs are in the repo 3 | 4 | # DISABLED for now - we do not support Ubuntu yet 5 | 6 | name: .NET Code Analysis windows-latest 7 | on: 8 | push: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | sample: 14 | name: .NET Code Analysis runner 15 | 16 | # .NET Code Analysis runs on windows-latest. 17 | # ubuntu-latest and macos-latest supporting coming soon 18 | runs-on: windows-latest 19 | 20 | steps: 21 | 22 | # Checkout your code repository to scan 23 | - uses: actions/checkout@v2 24 | 25 | # Ensure compatible versions of dotnet are installed. 26 | # The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. 27 | # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. 28 | # Remote agents already have a compatible version of dotnet installed and this step may be skipped. 29 | # For local agents, ensure dotnet version 3.1.201 or later is installed by including this action: 30 | # - uses: actions/setup-dotnet@v1 31 | # with: 32 | # dotnet-version: '3.1.x' 33 | 34 | # Run NuGet restore for the solution at repo root 35 | - name: Run NuGet restore 36 | run: dotnet restore 37 | 38 | # Run code analysis for the solution at repo root 39 | - name: Run .NET Code Analysis 40 | uses: dotnet/code-analysis@main 41 | id: code-analysis 42 | with: 43 | build-breaking: false 44 | 45 | # Upload the analysis results file 46 | - name: Upload analysis results 47 | uses: actions/upload-artifact@v2 48 | with: 49 | name: analysis_results.sarif 50 | path: ${{ steps.code-analysis.outputs.sarifFile }} 51 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | [fork]: https://github.com/dotnet/code-analysis/fork 4 | [pr]: https://github.com/dotnet/code-analysis/compare 5 | [code-of-conduct]: CODE_OF_CONDUCT.md 6 | 7 | Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 8 | 9 | Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). 10 | 11 | Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. 12 | 13 | ## Submitting a pull request 14 | 15 | 0. [Fork][fork] and clone the repository 16 | 0. Configure and install the dependencies: `npm install` 17 | 0. Create a new branch: `git checkout -b my-branch-name` 18 | 0. Make your change 19 | 0. Build the project: `msbuild build.proj` 20 | 0. Commit the compiled changes (`lib/*`) 21 | 0. Push to your fork and [submit a pull request][pr] 22 | 0. Pat your self on the back and wait for your pull request to be reviewed and merged. 23 | 24 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 25 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 26 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 27 | 28 | ## Resources 29 | 30 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 31 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 32 | - [GitHub Help](https://help.github.com) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /build.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory) 6 | $(MSBuildThisFileDirectory)/src/msca-toolkit 7 | $(MscaToolkitDirectory)/msca-toolkit.proj 8 | 9 | 10 | 11 | false 12 | 4.0 13 | tsconfig.json 14 | $(MSBuildProjectDirectory)/$(TypeScriptConfigFileName) 15 | false 16 | true 17 | false 18 | 19 | 20 | 21 | false 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/msca-toolkit/msca-toolkit.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | Microsoft.Security.CodeAnalysis.Cli 6 | 0.* 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /node_modules/.bin/esparse: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../esprima/bin/esparse.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/esparse.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | SETLOCAL 3 | CALL :find_dp0 4 | 5 | IF EXIST "%dp0%\node.exe" ( 6 | SET "_prog=%dp0%\node.exe" 7 | ) ELSE ( 8 | SET "_prog=node" 9 | SET PATHEXT=%PATHEXT:;.JS;=;% 10 | ) 11 | 12 | "%_prog%" "%dp0%\..\esprima\bin\esparse.js" %* 13 | ENDLOCAL 14 | EXIT /b %errorlevel% 15 | :find_dp0 16 | SET dp0=%~dp0 17 | EXIT /b 18 | -------------------------------------------------------------------------------- /node_modules/.bin/esparse.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args 13 | $ret=$LASTEXITCODE 14 | } else { 15 | & "node$exe" "$basedir/../esprima/bin/esparse.js" $args 16 | $ret=$LASTEXITCODE 17 | } 18 | exit $ret 19 | -------------------------------------------------------------------------------- /node_modules/.bin/esvalidate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../esprima/bin/esvalidate.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/esvalidate.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | SETLOCAL 3 | CALL :find_dp0 4 | 5 | IF EXIST "%dp0%\node.exe" ( 6 | SET "_prog=%dp0%\node.exe" 7 | ) ELSE ( 8 | SET "_prog=node" 9 | SET PATHEXT=%PATHEXT:;.JS;=;% 10 | ) 11 | 12 | "%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %* 13 | ENDLOCAL 14 | EXIT /b %errorlevel% 15 | :find_dp0 16 | SET dp0=%~dp0 17 | EXIT /b 18 | -------------------------------------------------------------------------------- /node_modules/.bin/esvalidate.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args 13 | $ret=$LASTEXITCODE 14 | } else { 15 | & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args 16 | $ret=$LASTEXITCODE 17 | } 18 | exit $ret 19 | -------------------------------------------------------------------------------- /node_modules/.bin/js-yaml: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../js-yaml/bin/js-yaml.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/js-yaml.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | SETLOCAL 3 | CALL :find_dp0 4 | 5 | IF EXIST "%dp0%\node.exe" ( 6 | SET "_prog=%dp0%\node.exe" 7 | ) ELSE ( 8 | SET "_prog=node" 9 | SET PATHEXT=%PATHEXT:;.JS;=;% 10 | ) 11 | 12 | "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* 13 | ENDLOCAL 14 | EXIT /b %errorlevel% 15 | :find_dp0 16 | SET dp0=%~dp0 17 | EXIT /b 18 | -------------------------------------------------------------------------------- /node_modules/.bin/js-yaml.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args 13 | $ret=$LASTEXITCODE 14 | } else { 15 | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args 16 | $ret=$LASTEXITCODE 17 | } 18 | exit $ret 19 | -------------------------------------------------------------------------------- /node_modules/.bin/tsc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../typescript/bin/tsc" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/tsc.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | SETLOCAL 3 | CALL :find_dp0 4 | 5 | IF EXIST "%dp0%\node.exe" ( 6 | SET "_prog=%dp0%\node.exe" 7 | ) ELSE ( 8 | SET "_prog=node" 9 | SET PATHEXT=%PATHEXT:;.JS;=;% 10 | ) 11 | 12 | "%_prog%" "%dp0%\..\typescript\bin\tsc" %* 13 | ENDLOCAL 14 | EXIT /b %errorlevel% 15 | :find_dp0 16 | SET dp0=%~dp0 17 | EXIT /b 18 | -------------------------------------------------------------------------------- /node_modules/.bin/tsc.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args 13 | $ret=$LASTEXITCODE 14 | } else { 15 | & "node$exe" "$basedir/../typescript/bin/tsc" $args 16 | $ret=$LASTEXITCODE 17 | } 18 | exit $ret 19 | -------------------------------------------------------------------------------- /node_modules/.bin/tsserver: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../typescript/bin/tsserver" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/tsserver.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | SETLOCAL 3 | CALL :find_dp0 4 | 5 | IF EXIST "%dp0%\node.exe" ( 6 | SET "_prog=%dp0%\node.exe" 7 | ) ELSE ( 8 | SET "_prog=node" 9 | SET PATHEXT=%PATHEXT:;.JS;=;% 10 | ) 11 | 12 | "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* 13 | ENDLOCAL 14 | EXIT /b %errorlevel% 15 | :find_dp0 16 | SET dp0=%~dp0 17 | EXIT /b 18 | -------------------------------------------------------------------------------- /node_modules/.bin/tsserver.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args 13 | $ret=$LASTEXITCODE 14 | } else { 15 | & "node$exe" "$basedir/../typescript/bin/tsserver" $args 16 | $ret=$LASTEXITCODE 17 | } 18 | exit $ret 19 | -------------------------------------------------------------------------------- /node_modules/@actions/core/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.d.ts: -------------------------------------------------------------------------------- 1 | interface CommandProperties { 2 | [key: string]: any; 3 | } 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ::name key=value,key=value::message 9 | * 10 | * Examples: 11 | * ::warning::This is the message 12 | * ::set-env name=MY_VAR::some value 13 | */ 14 | export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; 15 | export declare function issue(name: string, message?: string): void; 16 | export {}; 17 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importStar = (this && this.__importStar) || function (mod) { 3 | if (mod && mod.__esModule) return mod; 4 | var result = {}; 5 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 6 | result["default"] = mod; 7 | return result; 8 | }; 9 | Object.defineProperty(exports, "__esModule", { value: true }); 10 | const os = __importStar(require("os")); 11 | const utils_1 = require("./utils"); 12 | /** 13 | * Commands 14 | * 15 | * Command Format: 16 | * ::name key=value,key=value::message 17 | * 18 | * Examples: 19 | * ::warning::This is the message 20 | * ::set-env name=MY_VAR::some value 21 | */ 22 | function issueCommand(command, properties, message) { 23 | const cmd = new Command(command, properties, message); 24 | process.stdout.write(cmd.toString() + os.EOL); 25 | } 26 | exports.issueCommand = issueCommand; 27 | function issue(name, message = '') { 28 | issueCommand(name, {}, message); 29 | } 30 | exports.issue = issue; 31 | const CMD_STRING = '::'; 32 | class Command { 33 | constructor(command, properties, message) { 34 | if (!command) { 35 | command = 'missing.command'; 36 | } 37 | this.command = command; 38 | this.properties = properties; 39 | this.message = message; 40 | } 41 | toString() { 42 | let cmdStr = CMD_STRING + this.command; 43 | if (this.properties && Object.keys(this.properties).length > 0) { 44 | cmdStr += ' '; 45 | let first = true; 46 | for (const key in this.properties) { 47 | if (this.properties.hasOwnProperty(key)) { 48 | const val = this.properties[key]; 49 | if (val) { 50 | if (first) { 51 | first = false; 52 | } 53 | else { 54 | cmdStr += ','; 55 | } 56 | cmdStr += `${key}=${escapeProperty(val)}`; 57 | } 58 | } 59 | } 60 | } 61 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 62 | return cmdStr; 63 | } 64 | } 65 | function escapeData(s) { 66 | return utils_1.toCommandValue(s) 67 | .replace(/%/g, '%25') 68 | .replace(/\r/g, '%0D') 69 | .replace(/\n/g, '%0A'); 70 | } 71 | function escapeProperty(s) { 72 | return utils_1.toCommandValue(s) 73 | .replace(/%/g, '%25') 74 | .replace(/\r/g, '%0D') 75 | .replace(/\n/g, '%0A') 76 | .replace(/:/g, '%3A') 77 | .replace(/,/g, '%2C'); 78 | } 79 | //# sourceMappingURL=command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,IAAI,KAAK,GAAG,IAAI,CAAA;YAChB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,IAAI,KAAK,EAAE;4BACT,KAAK,GAAG,KAAK,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.d.ts: -------------------------------------------------------------------------------- 1 | export declare function issueCommand(command: string, message: any): void; 2 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // For internal use, subject to change. 3 | var __importStar = (this && this.__importStar) || function (mod) { 4 | if (mod && mod.__esModule) return mod; 5 | var result = {}; 6 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 7 | result["default"] = mod; 8 | return result; 9 | }; 10 | Object.defineProperty(exports, "__esModule", { value: true }); 11 | // We use any as a valid input type 12 | /* eslint-disable @typescript-eslint/no-explicit-any */ 13 | const fs = __importStar(require("fs")); 14 | const os = __importStar(require("os")); 15 | const utils_1 = require("./utils"); 16 | function issueCommand(command, message) { 17 | const filePath = process.env[`GITHUB_${command}`]; 18 | if (!filePath) { 19 | throw new Error(`Unable to find environment variable for file command ${command}`); 20 | } 21 | if (!fs.existsSync(filePath)) { 22 | throw new Error(`Missing file at path: ${filePath}`); 23 | } 24 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 25 | encoding: 'utf8' 26 | }); 27 | } 28 | exports.issueCommand = issueCommand; 29 | //# sourceMappingURL=file-command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,mCAAsC;AAEtC,SAAgB,YAAY,CAAC,OAAe,EAAE,OAAY;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Sanitizes an input into a string so it can be passed into issueCommand safely 3 | * @param input input to sanitize into a string 4 | */ 5 | export declare function toCommandValue(input: any): string; 6 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // We use any as a valid input type 3 | /* eslint-disable @typescript-eslint/no-explicit-any */ 4 | Object.defineProperty(exports, "__esModule", { value: true }); 5 | /** 6 | * Sanitizes an input into a string so it can be passed into issueCommand safely 7 | * @param input input to sanitize into a string 8 | */ 9 | function toCommandValue(input) { 10 | if (input === null || input === undefined) { 11 | return ''; 12 | } 13 | else if (typeof input === 'string' || input instanceof String) { 14 | return input; 15 | } 16 | return JSON.stringify(input); 17 | } 18 | exports.toCommandValue = toCommandValue; 19 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;AAEvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/core@1.2.6", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "@actions/core@1.2.6", 9 | "_id": "@actions/core@1.2.6", 10 | "_inBundle": false, 11 | "_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==", 12 | "_location": "/@actions/core", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/core@1.2.6", 18 | "name": "@actions/core", 19 | "escapedName": "@actions%2fcore", 20 | "scope": "@actions", 21 | "rawSpec": "1.2.6", 22 | "saveSpec": null, 23 | "fetchSpec": "1.2.6" 24 | }, 25 | "_requiredBy": [ 26 | "/" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", 29 | "_spec": "1.2.6", 30 | "_where": "c:\\code-analysis-2", 31 | "bugs": { 32 | "url": "https://github.com/actions/toolkit/issues" 33 | }, 34 | "description": "Actions core lib", 35 | "devDependencies": { 36 | "@types/node": "^12.0.2" 37 | }, 38 | "directories": { 39 | "lib": "lib", 40 | "test": "__tests__" 41 | }, 42 | "files": [ 43 | "lib", 44 | "!.DS_Store" 45 | ], 46 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", 47 | "keywords": [ 48 | "github", 49 | "actions", 50 | "core" 51 | ], 52 | "license": "MIT", 53 | "main": "lib/core.js", 54 | "name": "@actions/core", 55 | "publishConfig": { 56 | "access": "public" 57 | }, 58 | "repository": { 59 | "type": "git", 60 | "url": "git+https://github.com/actions/toolkit.git", 61 | "directory": "packages/core" 62 | }, 63 | "scripts": { 64 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 65 | "test": "echo \"Error: run tests from root\" && exit 1", 66 | "tsc": "tsc" 67 | }, 68 | "types": "lib/core.d.ts", 69 | "version": "1.2.6" 70 | } 71 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/exec` 2 | 3 | ## Usage 4 | 5 | #### Basic 6 | 7 | You can use this package to execute tools in a cross platform way: 8 | 9 | ```js 10 | const exec = require('@actions/exec'); 11 | 12 | await exec.exec('node index.js'); 13 | ``` 14 | 15 | #### Args 16 | 17 | You can also pass in arg arrays: 18 | 19 | ```js 20 | const exec = require('@actions/exec'); 21 | 22 | await exec.exec('node', ['index.js', 'foo=bar']); 23 | ``` 24 | 25 | #### Output/options 26 | 27 | Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5): 28 | 29 | ```js 30 | const exec = require('@actions/exec'); 31 | 32 | let myOutput = ''; 33 | let myError = ''; 34 | 35 | const options = {}; 36 | options.listeners = { 37 | stdout: (data: Buffer) => { 38 | myOutput += data.toString(); 39 | }, 40 | stderr: (data: Buffer) => { 41 | myError += data.toString(); 42 | } 43 | }; 44 | options.cwd = './lib'; 45 | 46 | await exec.exec('node', ['index.js', 'foo=bar'], options); 47 | ``` 48 | 49 | #### Exec tools not in the PATH 50 | 51 | You can specify the full path for tools not in the PATH: 52 | 53 | ```js 54 | const exec = require('@actions/exec'); 55 | 56 | await exec.exec('"/path/to/my-tool"', ['arg1']); 57 | ``` 58 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.d.ts: -------------------------------------------------------------------------------- 1 | import { ExecOptions } from './interfaces'; 2 | export { ExecOptions }; 3 | /** 4 | * Exec a command. 5 | * Output will be streamed to the live console. 6 | * Returns promise with return code 7 | * 8 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 9 | * @param args optional arguments for tool. Escaping is handled by the lib. 10 | * @param options optional exec options. See ExecOptions 11 | * @returns Promise exit code 12 | */ 13 | export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise; 14 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | var __importStar = (this && this.__importStar) || function (mod) { 12 | if (mod && mod.__esModule) return mod; 13 | var result = {}; 14 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 15 | result["default"] = mod; 16 | return result; 17 | }; 18 | Object.defineProperty(exports, "__esModule", { value: true }); 19 | const tr = __importStar(require("./toolrunner")); 20 | /** 21 | * Exec a command. 22 | * Output will be streamed to the live console. 23 | * Returns promise with return code 24 | * 25 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 26 | * @param args optional arguments for tool. Escaping is handled by the lib. 27 | * @param options optional exec options. See ExecOptions 28 | * @returns Promise exit code 29 | */ 30 | function exec(commandLine, args, options) { 31 | return __awaiter(this, void 0, void 0, function* () { 32 | const commandArgs = tr.argStringToArray(commandLine); 33 | if (commandArgs.length === 0) { 34 | throw new Error(`Parameter 'commandLine' cannot be null or empty.`); 35 | } 36 | // Path to tool to execute should be first arg 37 | const toolPath = commandArgs[0]; 38 | args = commandArgs.slice(1).concat(args || []); 39 | const runner = new tr.ToolRunner(toolPath, args, options); 40 | return runner.exec(); 41 | }); 42 | } 43 | exports.exec = exec; 44 | //# sourceMappingURL=exec.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAIlC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAqB;;QAErB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as stream from 'stream'; 3 | /** 4 | * Interface for exec options 5 | */ 6 | export interface ExecOptions { 7 | /** optional working directory. defaults to current */ 8 | cwd?: string; 9 | /** optional envvar dictionary. defaults to current process's env */ 10 | env?: { 11 | [key: string]: string; 12 | }; 13 | /** optional. defaults to false */ 14 | silent?: boolean; 15 | /** optional out stream to use. Defaults to process.stdout */ 16 | outStream?: stream.Writable; 17 | /** optional err stream to use. Defaults to process.stderr */ 18 | errStream?: stream.Writable; 19 | /** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */ 20 | windowsVerbatimArguments?: boolean; 21 | /** optional. whether to fail if output to stderr. defaults to false */ 22 | failOnStdErr?: boolean; 23 | /** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */ 24 | ignoreReturnCode?: boolean; 25 | /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ 26 | delay?: number; 27 | /** optional. input to write to the process on STDIN. */ 28 | input?: Buffer; 29 | /** optional. Listeners for output. Callback functions that will be called on these events */ 30 | listeners?: { 31 | stdout?: (data: Buffer) => void; 32 | stderr?: (data: Buffer) => void; 33 | stdline?: (data: string) => void; 34 | errline?: (data: string) => void; 35 | debug?: (data: string) => void; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as events from 'events'; 3 | import * as im from './interfaces'; 4 | export declare class ToolRunner extends events.EventEmitter { 5 | constructor(toolPath: string, args?: string[], options?: im.ExecOptions); 6 | private toolPath; 7 | private args; 8 | private options; 9 | private _debug; 10 | private _getCommandString; 11 | private _processLineBuffer; 12 | private _getSpawnFileName; 13 | private _getSpawnArgs; 14 | private _endsWith; 15 | private _isCmdFile; 16 | private _windowsQuoteCmdArg; 17 | private _uvQuoteCmdArg; 18 | private _cloneExecOptions; 19 | private _getSpawnOptions; 20 | /** 21 | * Exec a tool. 22 | * Output will be streamed to the live console. 23 | * Returns promise with return code 24 | * 25 | * @param tool path to tool to exec 26 | * @param options optional exec options. See ExecOptions 27 | * @returns number 28 | */ 29 | exec(): Promise; 30 | } 31 | /** 32 | * Convert an arg string to an array of args. Handles escaping 33 | * 34 | * @param argString string of arguments 35 | * @returns string[] array of arguments 36 | */ 37 | export declare function argStringToArray(argString: string): string[]; 38 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/exec@1.0.4", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "@actions/exec@1.0.4", 9 | "_id": "@actions/exec@1.0.4", 10 | "_inBundle": false, 11 | "_integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", 12 | "_location": "/@actions/exec", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/exec@1.0.4", 18 | "name": "@actions/exec", 19 | "escapedName": "@actions%2fexec", 20 | "scope": "@actions", 21 | "rawSpec": "1.0.4", 22 | "saveSpec": null, 23 | "fetchSpec": "1.0.4" 24 | }, 25 | "_requiredBy": [ 26 | "/" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", 29 | "_spec": "1.0.4", 30 | "_where": "c:\\code-analysis-2", 31 | "bugs": { 32 | "url": "https://github.com/actions/toolkit/issues" 33 | }, 34 | "dependencies": { 35 | "@actions/io": "^1.0.1" 36 | }, 37 | "description": "Actions exec lib", 38 | "directories": { 39 | "lib": "lib", 40 | "test": "__tests__" 41 | }, 42 | "files": [ 43 | "lib" 44 | ], 45 | "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", 46 | "keywords": [ 47 | "github", 48 | "actions", 49 | "exec" 50 | ], 51 | "license": "MIT", 52 | "main": "lib/exec.js", 53 | "name": "@actions/exec", 54 | "publishConfig": { 55 | "access": "public" 56 | }, 57 | "repository": { 58 | "type": "git", 59 | "url": "git+https://github.com/actions/toolkit.git", 60 | "directory": "packages/exec" 61 | }, 62 | "scripts": { 63 | "audit-moderate": "npm install && npm audit --audit-level=moderate", 64 | "test": "echo \"Error: run tests from root\" && exit 1", 65 | "tsc": "tsc" 66 | }, 67 | "types": "lib/exec.d.ts", 68 | "version": "1.0.4" 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/@actions/io/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/io` 2 | 3 | > Core functions for cli filesystem scenarios 4 | 5 | ## Usage 6 | 7 | #### mkdir -p 8 | 9 | Recursively make a directory. Follows rules specified in [man mkdir](https://linux.die.net/man/1/mkdir) with the `-p` option specified: 10 | 11 | ```js 12 | const io = require('@actions/io'); 13 | 14 | await io.mkdirP('path/to/make'); 15 | ``` 16 | 17 | #### cp/mv 18 | 19 | Copy or move files or folders. Follows rules specified in [man cp](https://linux.die.net/man/1/cp) and [man mv](https://linux.die.net/man/1/mv): 20 | 21 | ```js 22 | const io = require('@actions/io'); 23 | 24 | // Recursive must be true for directories 25 | const options = { recursive: true, force: false } 26 | 27 | await io.cp('path/to/directory', 'path/to/dest', options); 28 | await io.mv('path/to/file', 'path/to/dest'); 29 | ``` 30 | 31 | #### rm -rf 32 | 33 | Remove a file or folder recursively. Follows rules specified in [man rm](https://linux.die.net/man/1/rm) with the `-r` and `-f` rules specified. 34 | 35 | ```js 36 | const io = require('@actions/io'); 37 | 38 | await io.rmRF('path/to/directory'); 39 | await io.rmRF('path/to/file'); 40 | ``` 41 | 42 | #### which 43 | 44 | Get the path to a tool and resolves via paths. Follows the rules specified in [man which](https://linux.die.net/man/1/which). 45 | 46 | ```js 47 | const exec = require('@actions/exec'); 48 | const io = require('@actions/io'); 49 | 50 | const pythonPath: string = await io.which('python', true) 51 | 52 | await exec.exec(`"${pythonPath}"`, ['main.py']); 53 | ``` 54 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io-util.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | export declare const chmod: typeof fs.promises.chmod, copyFile: typeof fs.promises.copyFile, lstat: typeof fs.promises.lstat, mkdir: typeof fs.promises.mkdir, readdir: typeof fs.promises.readdir, readlink: typeof fs.promises.readlink, rename: typeof fs.promises.rename, rmdir: typeof fs.promises.rmdir, stat: typeof fs.promises.stat, symlink: typeof fs.promises.symlink, unlink: typeof fs.promises.unlink; 4 | export declare const IS_WINDOWS: boolean; 5 | export declare function exists(fsPath: string): Promise; 6 | export declare function isDirectory(fsPath: string, useStat?: boolean): Promise; 7 | /** 8 | * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: 9 | * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). 10 | */ 11 | export declare function isRooted(p: string): boolean; 12 | /** 13 | * Recursively create a directory at `fsPath`. 14 | * 15 | * This implementation is optimistic, meaning it attempts to create the full 16 | * path first, and backs up the path stack from there. 17 | * 18 | * @param fsPath The path to create 19 | * @param maxDepth The maximum recursion depth 20 | * @param depth The current recursion depth 21 | */ 22 | export declare function mkdirP(fsPath: string, maxDepth?: number, depth?: number): Promise; 23 | /** 24 | * Best effort attempt to determine whether a file exists and is executable. 25 | * @param filePath file path to check 26 | * @param extensions additional file extensions to try 27 | * @return if file exists and is executable, returns the file path. otherwise empty string. 28 | */ 29 | export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise; 30 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface for cp/mv options 3 | */ 4 | export interface CopyOptions { 5 | /** Optional. Whether to recursively copy all subdirectories. Defaults to false */ 6 | recursive?: boolean; 7 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 8 | force?: boolean; 9 | } 10 | /** 11 | * Interface for cp/mv options 12 | */ 13 | export interface MoveOptions { 14 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 15 | force?: boolean; 16 | } 17 | /** 18 | * Copies a file or folder. 19 | * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js 20 | * 21 | * @param source source path 22 | * @param dest destination path 23 | * @param options optional. See CopyOptions. 24 | */ 25 | export declare function cp(source: string, dest: string, options?: CopyOptions): Promise; 26 | /** 27 | * Moves a path. 28 | * 29 | * @param source source path 30 | * @param dest destination path 31 | * @param options optional. See MoveOptions. 32 | */ 33 | export declare function mv(source: string, dest: string, options?: MoveOptions): Promise; 34 | /** 35 | * Remove a path recursively with force 36 | * 37 | * @param inputPath path to remove 38 | */ 39 | export declare function rmRF(inputPath: string): Promise; 40 | /** 41 | * Make a directory. Creates the full path with folders in between 42 | * Will throw if it fails 43 | * 44 | * @param fsPath path to create 45 | * @returns Promise 46 | */ 47 | export declare function mkdirP(fsPath: string): Promise; 48 | /** 49 | * Returns path of a tool had the tool actually been invoked. Resolves via paths. 50 | * If you check and the tool does not exist, it will throw. 51 | * 52 | * @param tool name of the tool 53 | * @param check whether to check if tool exists 54 | * @returns Promise path to tool 55 | */ 56 | export declare function which(tool: string, check?: boolean): Promise; 57 | -------------------------------------------------------------------------------- /node_modules/@actions/io/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/io@1.0.2", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "@actions/io@1.0.2", 9 | "_id": "@actions/io@1.0.2", 10 | "_inBundle": false, 11 | "_integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==", 12 | "_location": "/@actions/io", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/io@1.0.2", 18 | "name": "@actions/io", 19 | "escapedName": "@actions%2fio", 20 | "scope": "@actions", 21 | "rawSpec": "1.0.2", 22 | "saveSpec": null, 23 | "fetchSpec": "1.0.2" 24 | }, 25 | "_requiredBy": [ 26 | "/@actions/exec" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", 29 | "_spec": "1.0.2", 30 | "_where": "c:\\code-analysis-2", 31 | "bugs": { 32 | "url": "https://github.com/actions/toolkit/issues" 33 | }, 34 | "description": "Actions io lib", 35 | "directories": { 36 | "lib": "lib", 37 | "test": "__tests__" 38 | }, 39 | "files": [ 40 | "lib" 41 | ], 42 | "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", 43 | "keywords": [ 44 | "github", 45 | "actions", 46 | "io" 47 | ], 48 | "license": "MIT", 49 | "main": "lib/io.js", 50 | "name": "@actions/io", 51 | "publishConfig": { 52 | "access": "public" 53 | }, 54 | "repository": { 55 | "type": "git", 56 | "url": "git+https://github.com/actions/toolkit.git", 57 | "directory": "packages/io" 58 | }, 59 | "scripts": { 60 | "audit-moderate": "npm install && npm audit --audit-level=moderate", 61 | "test": "echo \"Error: run tests from root\" && exit 1", 62 | "tsc": "tsc" 63 | }, 64 | "types": "lib/io.d.ts", 65 | "version": "1.0.2" 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/.editorconfig: -------------------------------------------------------------------------------- 1 | ; EditorConfig file: http://EditorConfig.org 2 | ; Install the "EditorConfig" plugin into your editor to use 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 4 12 | trim_trailing_whitespace = true 13 | 14 | # Matches the exact files either package.json or .travis.yml 15 | [{package.json, .travis.yml}] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | ; Needed if doing `git add --patch` to edit patches 20 | [*.diff] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/* 2 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/.eslintrc.yaml: -------------------------------------------------------------------------------- 1 | extends: 2 | - sinon 3 | - 'plugin:prettier/recommended' 4 | 5 | env: 6 | browser: true 7 | node: true 8 | 9 | globals: 10 | ArrayBuffer: false 11 | Map: false 12 | Promise: false 13 | Set: false 14 | Symbol: false 15 | 16 | plugins: 17 | - ie11 18 | - local-rules 19 | 20 | rules: 21 | strict: [error, 'global'] 22 | # authors are expected to understand function hoisting 23 | no-use-before-define: off 24 | 25 | ie11/no-collection-args: error 26 | ie11/no-for-in-const: error 27 | ie11/no-loop-func: warn 28 | ie11/no-weak-collections: error 29 | local-rules/no-prototype-methods: error 30 | 31 | overrides: 32 | files: '*.test.*' 33 | plugins: 34 | - mocha 35 | env: 36 | mocha: true 37 | rules: 38 | max-nested-callbacks: 39 | - warn 40 | - 6 41 | mocha/handle-done-callback: error 42 | mocha/no-exclusive-tests: error 43 | mocha/no-global-tests: error 44 | mocha/no-hooks-for-single-case: off 45 | mocha/no-identical-title: error 46 | mocha/no-mocha-arrows: error 47 | mocha/no-nested-tests: error 48 | mocha/no-return-and-callback: error 49 | mocha/no-sibling-hooks: error 50 | mocha/no-skipped-tests: error 51 | mocha/no-top-level-hooks: error 52 | local-rules/no-prototype-methods: off 53 | 54 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | sudo: false 4 | 5 | node_js: 6 | # https://github.com/nodejs/LTS 7 | - "6" # ends April 2019 8 | - "8" # ends December 2019 9 | - "10" # ends April 2021 10 | 11 | cache: 12 | directories: 13 | - node_modules 14 | 15 | env: 16 | - HUSKY_SKIP_INSTALL=true 17 | 18 | before_script: 19 | - npm install coveralls 20 | 21 | # Make npm run work for the script phase: 22 | - if [ "x$TRAVIS_NODE_VERSION" = "x6" ]; then npm config set ignore-scripts false; fi 23 | # these build targets only need to run once per build, so let's conserve a few resources 24 | - if [ "x$TRAVIS_NODE_VERSION" = "x10" ]; then npm run lint; fi 25 | 26 | script: 27 | - npm run test-check-coverage 28 | 29 | after_success: 30 | - if [ "x$TRAVIS_NODE_VERSION" = "x10" ]; then cat ./coverage/lcov.info | coveralls lib; fi 31 | 32 | git: 33 | depth: 3 34 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, Sinon.JS 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/README.md: -------------------------------------------------------------------------------- 1 | # commons 2 | 3 | [![Build status](https://secure.travis-ci.org/sinonjs/commons.svg?branch=master)](http://travis-ci.org/sinonjs/commons) [![Coverage Status](https://coveralls.io/repos/github/sinonjs/commons/badge.svg?branch=master)](https://coveralls.io/github/sinonjs/commons?branch=master) 4 | 5 | Simple functions shared among the sinon end user libraries 6 | 7 | ## Rules 8 | 9 | * Follows the [Sinon.JS compatibility](https://github.com/sinonjs/sinon/blob/master/CONTRIBUTING.md#compatibility) 10 | * 100% test coverage 11 | * Code formatted using [Prettier](https://prettier.io) 12 | * No side effects welcome! (only pure functions) 13 | * No platform specific functions 14 | * One export per file (any bundler can do tree shaking) 15 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/eslint-local-rules.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function getPrototypeMethods(prototype) { 4 | /* eslint-disable local-rules/no-prototype-methods */ 5 | return Object.getOwnPropertyNames(prototype).filter(function(name) { 6 | return ( 7 | typeof prototype[name] === "function" && 8 | prototype.hasOwnProperty(name) 9 | ); 10 | }); 11 | } 12 | 13 | var DISALLOWED_ARRAY_PROPS = getPrototypeMethods(Array.prototype); 14 | 15 | var DISALLOWED_OBJECT_PROPS = getPrototypeMethods(Object.prototype); 16 | 17 | module.exports = { 18 | // rule to disallow direct use of prototype methods of builtins 19 | "no-prototype-methods": { 20 | meta: { 21 | docs: { 22 | description: "disallow calling prototype methods directly", 23 | category: "Possible Errors", 24 | recommended: false, 25 | url: "https://eslint.org/docs/rules/no-prototype-builtins" 26 | }, 27 | 28 | schema: [] 29 | }, 30 | 31 | create: function(context) { 32 | /** 33 | * Reports if a disallowed property is used in a CallExpression 34 | * @param {ASTNode} node The CallExpression node. 35 | * @returns {void} 36 | */ 37 | function disallowBuiltIns(node) { 38 | if ( 39 | node.callee.type !== "MemberExpression" || 40 | node.callee.computed || 41 | // allow static method calls 42 | node.callee.object.name === "Array" || 43 | node.callee.object.name === "Object" 44 | ) { 45 | return; 46 | } 47 | var propName = node.callee.property.name; 48 | 49 | if (DISALLOWED_OBJECT_PROPS.indexOf(propName) > -1) { 50 | context.report({ 51 | message: 52 | "Do not access {{obj}} prototype method '{{prop}}' from target object.", 53 | loc: node.callee.property.loc.start, 54 | data: { 55 | obj: "Object", 56 | prop: propName 57 | }, 58 | node: node 59 | }); 60 | } else if (DISALLOWED_ARRAY_PROPS.indexOf(propName) > -1) { 61 | context.report({ 62 | message: 63 | "Do not access {{obj}} prototype method '{{prop}}' from target object.", 64 | loc: node.callee.property.loc.start, 65 | data: { 66 | obj: "Array", 67 | prop: propName 68 | }, 69 | node: node 70 | }); 71 | } 72 | } 73 | 74 | return { 75 | CallExpression: disallowBuiltIns 76 | }; 77 | } 78 | } 79 | }; 80 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/called-in-order.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var every = require("./prototypes/array").every; 4 | 5 | function hasCallsLeft(callMap, spy) { 6 | if (callMap[spy.id] === undefined) { 7 | callMap[spy.id] = 0; 8 | } 9 | 10 | return callMap[spy.id] < spy.callCount; 11 | } 12 | 13 | function checkAdjacentCalls(callMap, spy, index, spies) { 14 | var calledBeforeNext = true; 15 | 16 | if (index !== spies.length - 1) { 17 | calledBeforeNext = spy.calledBefore(spies[index + 1]); 18 | } 19 | 20 | if (hasCallsLeft(callMap, spy) && calledBeforeNext) { 21 | callMap[spy.id] += 1; 22 | return true; 23 | } 24 | 25 | return false; 26 | } 27 | 28 | module.exports = function calledInOrder(spies) { 29 | var callMap = {}; 30 | // eslint-disable-next-line no-underscore-dangle 31 | var _spies = arguments.length > 1 ? arguments : spies; 32 | 33 | return every(_spies, checkAdjacentCalls.bind(null, callMap)); 34 | }; 35 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/class-name.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var functionName = require("./function-name"); 4 | 5 | module.exports = function className(value) { 6 | return ( 7 | (value.constructor && value.constructor.name) || 8 | // The next branch is for IE11 support only: 9 | // Because the name property is not set on the prototype 10 | // of the Function object, we finally try to grab the 11 | // name from its definition. This will never be reached 12 | // in node, so we are not able to test this properly. 13 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name 14 | (typeof value.constructor === "function" && 15 | /* istanbul ignore next */ 16 | functionName(value.constructor)) || 17 | null 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/class-name.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* eslint-disable no-empty-function */ 3 | 4 | var assert = require("@sinonjs/referee").assert; 5 | var className = require("./class-name"); 6 | 7 | describe("className", function() { 8 | it("returns the class name of an instance", function() { 9 | // Because eslint-config-sinon disables es6, we can't 10 | // use a class definition here 11 | // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js 12 | // var instance = new (class TestClass {})(); 13 | var instance = new function TestClass() {}(); 14 | var name = className(instance); 15 | assert.equals(name, "TestClass"); 16 | }); 17 | 18 | it("returns 'Object' for {}", function() { 19 | var name = className({}); 20 | assert.equals(name, "Object"); 21 | }); 22 | 23 | it("returns null for an object that has no prototype", function() { 24 | var obj = Object.create(null); 25 | var name = className(obj); 26 | assert.equals(name, null); 27 | }); 28 | 29 | it("returns null for an object whose prototype was mangled", function() { 30 | // This is what Node v6 and v7 do for objects returned by querystring.parse() 31 | function MangledObject() {} 32 | MangledObject.prototype = Object.create(null); 33 | var obj = new MangledObject(); 34 | var name = className(obj); 35 | assert.equals(name, null); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/deprecated.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | "use strict"; 3 | 4 | // wrap returns a function that will invoke the supplied function and print a deprecation warning to the console each 5 | // time it is called. 6 | exports.wrap = function(func, msg) { 7 | var wrapped = function() { 8 | exports.printWarning(msg); 9 | return func.apply(this, arguments); 10 | }; 11 | if (func.prototype) { 12 | wrapped.prototype = func.prototype; 13 | } 14 | return wrapped; 15 | }; 16 | 17 | // defaultMsg returns a string which can be supplied to `wrap()` to notify the user that a particular part of the 18 | // sinon API has been deprecated. 19 | exports.defaultMsg = function(packageName, funcName) { 20 | return ( 21 | packageName + 22 | "." + 23 | funcName + 24 | " is deprecated and will be removed from the public API in a future version of " + 25 | packageName + 26 | "." 27 | ); 28 | }; 29 | 30 | exports.printWarning = function(msg) { 31 | // Watch out for IE7 and below! :( 32 | /* istanbul ignore next */ 33 | if (typeof console !== "undefined") { 34 | if (console.info) { 35 | console.info(msg); 36 | } else { 37 | console.log(msg); 38 | } 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/deprecated.test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | "use strict"; 3 | 4 | var assert = require("@sinonjs/referee-sinon").assert; 5 | var sinon = require("@sinonjs/referee-sinon").sinon; 6 | 7 | var deprecated = require("./deprecated"); 8 | 9 | var msg = "test"; 10 | 11 | describe("deprecated", function() { 12 | describe("defaultMsg", function() { 13 | it("should return a string", function() { 14 | assert.equals( 15 | deprecated.defaultMsg("sinon", "someFunc"), 16 | "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon." 17 | ); 18 | }); 19 | }); 20 | 21 | describe("printWarning", function() { 22 | describe("when `console` is defined", function() { 23 | beforeEach(function() { 24 | sinon.replace(console, "info", sinon.fake()); 25 | sinon.replace(console, "log", sinon.fake()); 26 | }); 27 | 28 | afterEach(sinon.restore); 29 | 30 | describe("when `console.info` is defined", function() { 31 | it("shoudl call `console.info` with a message", function() { 32 | deprecated.printWarning(msg); 33 | assert.calledOnceWith(console.info, msg); 34 | }); 35 | }); 36 | 37 | describe("when `console.info` is undefined", function() { 38 | it("should call `console.log` with a message", function() { 39 | console.info = undefined; 40 | deprecated.printWarning(msg); 41 | assert.calledOnceWith(console.log, msg); 42 | }); 43 | }); 44 | }); 45 | }); 46 | 47 | describe("wrap", function() { 48 | var method = sinon.fake(); 49 | var wrapped; 50 | 51 | beforeEach(function() { 52 | wrapped = deprecated.wrap(method, msg); 53 | }); 54 | 55 | it("should return a wrapper function", function() { 56 | assert.match(wrapped, sinon.match.func); 57 | }); 58 | 59 | it("should assign the prototype of the passed method", function() { 60 | assert.equals(method.prototype, wrapped.prototype); 61 | }); 62 | 63 | context("when the passed method has falsy prototype", function() { 64 | it("should not be assigned to the wrapped method", function() { 65 | method.prototype = null; 66 | wrapped = deprecated.wrap(method, msg); 67 | assert.match(wrapped.prototype, sinon.match.object); 68 | }); 69 | }); 70 | 71 | context("when invoking the wrapped function", function() { 72 | before(function() { 73 | sinon.replace(deprecated, "printWarning", sinon.fake()); 74 | wrapped({}); 75 | }); 76 | 77 | it("should call `printWarning` before invoking", function() { 78 | assert.calledOnceWith(deprecated.printWarning, msg); 79 | }); 80 | 81 | it("should invoke the passed method with the given arguments", function() { 82 | assert.calledOnceWith(method, {}); 83 | }); 84 | }); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/every.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // This is an `every` implementation that works for all iterables 4 | module.exports = function every(obj, fn) { 5 | var pass = true; 6 | 7 | try { 8 | /* eslint-disable-next-line local-rules/no-prototype-methods */ 9 | obj.forEach(function() { 10 | if (!fn.apply(this, arguments)) { 11 | // Throwing an error is the only way to break `forEach` 12 | throw new Error(); 13 | } 14 | }); 15 | } catch (e) { 16 | pass = false; 17 | } 18 | 19 | return pass; 20 | }; 21 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/every.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | var sinon = require("@sinonjs/referee-sinon").sinon; 5 | var every = require("./every"); 6 | 7 | describe("util/core/every", function() { 8 | it("returns true when the callback function returns true for every element in an iterable", function() { 9 | var obj = [true, true, true, true]; 10 | var allTrue = every(obj, function(val) { 11 | return val; 12 | }); 13 | 14 | assert(allTrue); 15 | }); 16 | 17 | it("returns false when the callback function returns false for any element in an iterable", function() { 18 | var obj = [true, true, true, false]; 19 | var result = every(obj, function(val) { 20 | return val; 21 | }); 22 | 23 | assert.isFalse(result); 24 | }); 25 | 26 | it("calls the given callback once for each item in an iterable until it returns false", function() { 27 | var iterableOne = [true, true, true, true]; 28 | var iterableTwo = [true, true, false, true]; 29 | var callback = sinon.spy(function(val) { 30 | return val; 31 | }); 32 | 33 | every(iterableOne, callback); 34 | assert.equals(callback.callCount, 4); 35 | 36 | callback.resetHistory(); 37 | 38 | every(iterableTwo, callback); 39 | assert.equals(callback.callCount, 3); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/function-name.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function functionName(func) { 4 | if (!func) { 5 | return ""; 6 | } 7 | 8 | return ( 9 | func.displayName || 10 | func.name || 11 | // Use function decomposition as a last resort to get function 12 | // name. Does not rely on function decomposition to work - if it 13 | // doesn't debugging will be slightly less informative 14 | // (i.e. toString will say 'spy' rather than 'myFunc'). 15 | (String(func).match(/function ([^\s(]+)/) || [])[1] 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/function-name.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var jsc = require("jsverify"); 4 | var refute = require("@sinonjs/referee-sinon").refute; 5 | 6 | var functionName = require("./function-name"); 7 | 8 | describe("function-name", function() { 9 | it("should return empty string if func is falsy", function() { 10 | jsc.assertForall("falsy", function(fn) { 11 | return functionName(fn) === ""; 12 | }); 13 | }); 14 | 15 | it("should use displayName by default", function() { 16 | jsc.assertForall("nestring", function(displayName) { 17 | var fn = { displayName: displayName }; 18 | 19 | return functionName(fn) === fn.displayName; 20 | }); 21 | }); 22 | 23 | it("should use name if displayName is not available", function() { 24 | jsc.assertForall("nestring", function(name) { 25 | var fn = { name: name }; 26 | 27 | return functionName(fn) === fn.name; 28 | }); 29 | }); 30 | 31 | it("should fallback to string parsing", function() { 32 | jsc.assertForall("nat", function(naturalNumber) { 33 | var name = "fn" + naturalNumber; 34 | var fn = { 35 | toString: function() { 36 | return "\nfunction " + name; 37 | } 38 | }; 39 | 40 | return functionName(fn) === name; 41 | }); 42 | }); 43 | 44 | it("should not fail when a name cannot be found", function() { 45 | refute.exception(function() { 46 | var fn = { 47 | toString: function() { 48 | return "\nfunction ("; 49 | } 50 | }; 51 | 52 | functionName(fn); 53 | }); 54 | }); 55 | }); 56 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | calledInOrder: require("./called-in-order"), 5 | className: require("./class-name"), 6 | deprecated: require("./deprecated"), 7 | every: require("./every"), 8 | functionName: require("./function-name"), 9 | orderByFirstCall: require("./order-by-first-call"), 10 | prototypes: require("./prototypes"), 11 | typeOf: require("./type-of"), 12 | valueToString: require("./value-to-string") 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/index.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | var index = require("./index"); 5 | 6 | var expectedMethods = [ 7 | "calledInOrder", 8 | "className", 9 | "every", 10 | "functionName", 11 | "orderByFirstCall", 12 | "typeOf", 13 | "valueToString" 14 | ]; 15 | var expectedObjectProperties = ["deprecated", "prototypes"]; 16 | 17 | describe("package", function() { 18 | expectedMethods.forEach(function(name) { 19 | it("should export a method named " + name, function() { 20 | assert.isFunction(index[name]); 21 | }); 22 | }); 23 | 24 | expectedObjectProperties.forEach(function(name) { 25 | it("should export an object property named " + name, function() { 26 | assert.isObject(index[name]); 27 | }); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/order-by-first-call.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var sort = require("./prototypes/array").sort; 4 | var slice = require("./prototypes/array").slice; 5 | 6 | function comparator(a, b) { 7 | // uuid, won't ever be equal 8 | var aCall = a.getCall(0); 9 | var bCall = b.getCall(0); 10 | var aId = (aCall && aCall.callId) || -1; 11 | var bId = (bCall && bCall.callId) || -1; 12 | 13 | return aId < bId ? -1 : 1; 14 | } 15 | 16 | module.exports = function orderByFirstCall(spies) { 17 | return sort(slice(spies), comparator); 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/order-by-first-call.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | var knuthShuffle = require("knuth-shuffle").knuthShuffle; 5 | var sinon = require("@sinonjs/referee-sinon").sinon; 6 | var orderByFirstCall = require("./order-by-first-call"); 7 | 8 | describe("orderByFirstCall", function() { 9 | it("should order an Array of spies by the callId of the first call, ascending", function() { 10 | // create an array of spies 11 | var spies = [ 12 | sinon.spy(), 13 | sinon.spy(), 14 | sinon.spy(), 15 | sinon.spy(), 16 | sinon.spy(), 17 | sinon.spy() 18 | ]; 19 | 20 | // call all the spies 21 | spies.forEach(function(spy) { 22 | spy(); 23 | }); 24 | 25 | // add a few uncalled spies 26 | spies.push(sinon.spy()); 27 | spies.push(sinon.spy()); 28 | 29 | // randomise the order of the spies 30 | knuthShuffle(spies); 31 | 32 | var sortedSpies = orderByFirstCall(spies); 33 | 34 | assert.equals(sortedSpies.length, spies.length); 35 | 36 | var orderedByFirstCall = sortedSpies.every(function(spy, index) { 37 | if (index + 1 === sortedSpies.length) { 38 | return true; 39 | } 40 | var nextSpy = sortedSpies[index + 1]; 41 | 42 | // uncalled spies should be ordered first 43 | if (!spy.called) { 44 | return true; 45 | } 46 | 47 | return spy.calledImmediatelyBefore(nextSpy); 48 | }); 49 | 50 | assert.isTrue(orderedByFirstCall); 51 | }); 52 | }); 53 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/README.md: -------------------------------------------------------------------------------- 1 | # Prototypes 2 | 3 | The functions in this folder are to be use for keeping cached references to the built-in prototypes, so that people can't inadvertently break the library by making mistakes in userland. 4 | 5 | See https://github.com/sinonjs/sinon/pull/1523 6 | 7 | ## Without cached references 8 | 9 | ```js 10 | // in userland, the library user needs to replace the filter method on 11 | // Array.prototype 12 | var array = [1, 2, 3]; 13 | sinon.replace(array, "filter", sinon.fake.returns(2)); 14 | 15 | // in a sinon module, the library author needs to use the filter method 16 | var someArray = ["a", "b", 42, "c"]; 17 | var answer = filter(someArray, function(v) { 18 | return v === 42; 19 | }); 20 | 21 | console.log(answer); 22 | // => 2 23 | ``` 24 | 25 | 26 | ## With cached references 27 | 28 | ```js 29 | // in userland, the library user needs to replace the filter method on 30 | // Array.prototype 31 | var array = [1, 2, 3]; 32 | sinon.replace(array, "filter", sinon.fake.returns(2)); 33 | 34 | // in a sinon module, the library author needs to use the filter method 35 | // get a reference to the original Array.prototype.filter 36 | var filter = require("@sinonjs/commons").prototypes.array.filter; 37 | var someArray = ["a", "b", 42, "c"]; 38 | var answer = filter(someArray, function(v) { 39 | return v === 42; 40 | }); 41 | 42 | console.log(answer); 43 | // => 42 44 | ``` 45 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/array.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var copyPrototype = require("./copy-prototype"); 4 | 5 | module.exports = copyPrototype(Array.prototype); 6 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var call = Function.call; 4 | 5 | module.exports = function copyPrototypeMethods(prototype) { 6 | /* eslint-disable local-rules/no-prototype-methods */ 7 | return Object.getOwnPropertyNames(prototype).reduce(function(result, name) { 8 | // ignore size because it throws from Map 9 | if ( 10 | name !== "size" && 11 | name !== "caller" && 12 | name !== "callee" && 13 | name !== "arguments" && 14 | typeof prototype[name] === "function" 15 | ) { 16 | result[name] = call.bind(prototype[name]); 17 | } 18 | 19 | return result; 20 | }, Object.create(null)); 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/function.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var copyPrototype = require("./copy-prototype"); 4 | 5 | module.exports = copyPrototype(Function.prototype); 6 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | array: require("./array"), 5 | function: require("./function"), 6 | object: require("./object"), 7 | string: require("./string") 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/index.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | 5 | var arrayProto = require("./index").array; 6 | var functionProto = require("./index").function; 7 | var objectProto = require("./index").object; 8 | var stringProto = require("./index").string; 9 | 10 | describe("prototypes", function() { 11 | describe(".array", function() { 12 | verifyProperties(arrayProto, Array); 13 | }); 14 | describe(".function", function() { 15 | verifyProperties(functionProto, Function); 16 | }); 17 | describe(".object", function() { 18 | verifyProperties(objectProto, Object); 19 | }); 20 | describe(".string", function() { 21 | verifyProperties(stringProto, String); 22 | }); 23 | }); 24 | 25 | function verifyProperties(p, origin) { 26 | it("should have all the methods of the origin prototype", function() { 27 | var methodNames = Object.getOwnPropertyNames(origin.prototype).filter( 28 | function(name) { 29 | return ( 30 | name !== "size" && 31 | name !== "caller" && 32 | name !== "callee" && 33 | name !== "arguments" && 34 | typeof origin.prototype[name] === "function" 35 | ); 36 | } 37 | ); 38 | 39 | methodNames.forEach(function(name) { 40 | assert.isTrue(Object.prototype.hasOwnProperty.call(p, name), name); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/object.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var copyPrototype = require("./copy-prototype"); 4 | 5 | module.exports = copyPrototype(Object.prototype); 6 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/prototypes/string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var copyPrototype = require("./copy-prototype"); 4 | 5 | module.exports = copyPrototype(String.prototype); 6 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/type-of.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var type = require("type-detect"); 4 | 5 | module.exports = function typeOf(value) { 6 | return type(value).toLowerCase(); 7 | }; 8 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/type-of.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | var typeOf = require("./type-of"); 5 | 6 | describe("typeOf", function() { 7 | it("returns boolean", function() { 8 | assert.equals(typeOf(false), "boolean"); 9 | }); 10 | 11 | it("returns string", function() { 12 | assert.equals(typeOf("Sinon.JS"), "string"); 13 | }); 14 | 15 | it("returns number", function() { 16 | assert.equals(typeOf(123), "number"); 17 | }); 18 | 19 | it("returns object", function() { 20 | assert.equals(typeOf({}), "object"); 21 | }); 22 | 23 | it("returns function", function() { 24 | assert.equals( 25 | typeOf(function() { 26 | return undefined; 27 | }), 28 | "function" 29 | ); 30 | }); 31 | 32 | it("returns undefined", function() { 33 | assert.equals(typeOf(undefined), "undefined"); 34 | }); 35 | 36 | it("returns null", function() { 37 | assert.equals(typeOf(null), "null"); 38 | }); 39 | 40 | it("returns array", function() { 41 | assert.equals(typeOf([]), "array"); 42 | }); 43 | 44 | it("returns regexp", function() { 45 | assert.equals(typeOf(/.*/), "regexp"); 46 | }); 47 | 48 | it("returns date", function() { 49 | assert.equals(typeOf(new Date()), "date"); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/value-to-string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function valueToString(value) { 4 | if (value && value.toString) { 5 | /* eslint-disable-next-line local-rules/no-prototype-methods */ 6 | return value.toString(); 7 | } 8 | return String(value); 9 | } 10 | 11 | module.exports = valueToString; 12 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/lib/value-to-string.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require("@sinonjs/referee-sinon").assert; 4 | var valueToString = require("./value-to-string"); 5 | 6 | describe("util/core/valueToString", function() { 7 | it("returns string representation of an object", function() { 8 | var obj = {}; 9 | 10 | assert.equals(valueToString(obj), obj.toString()); 11 | }); 12 | 13 | it("returns 'null' for literal null'", function() { 14 | assert.equals(valueToString(null), "null"); 15 | }); 16 | 17 | it("returns 'undefined' for literal undefined", function() { 18 | assert.equals(valueToString(undefined), "undefined"); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/commons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@sinonjs/commons@1.4.0", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@sinonjs/commons@1.4.0", 10 | "_id": "@sinonjs/commons@1.4.0", 11 | "_inBundle": false, 12 | "_integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", 13 | "_location": "/@sinonjs/commons", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@sinonjs/commons@1.4.0", 19 | "name": "@sinonjs/commons", 20 | "escapedName": "@sinonjs%2fcommons", 21 | "scope": "@sinonjs", 22 | "rawSpec": "1.4.0", 23 | "saveSpec": null, 24 | "fetchSpec": "1.4.0" 25 | }, 26 | "_requiredBy": [ 27 | "/@sinonjs/samsam", 28 | "/nise/@sinonjs/formatio" 29 | ], 30 | "_resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", 31 | "_spec": "1.4.0", 32 | "_where": "c:\\code-analysis-2", 33 | "author": "", 34 | "bugs": { 35 | "url": "https://github.com/sinonjs/commons/issues" 36 | }, 37 | "dependencies": { 38 | "type-detect": "4.0.8" 39 | }, 40 | "description": "Simple functions shared among the sinon end user libraries", 41 | "devDependencies": { 42 | "@sinonjs/referee-sinon": "4.1.0", 43 | "eslint": "^5.8.0", 44 | "eslint-config-prettier": "^3.1.0", 45 | "eslint-config-sinon": "^2.0.0", 46 | "eslint-plugin-ie11": "^1.0.0", 47 | "eslint-plugin-local-rules": "^0.1.0", 48 | "eslint-plugin-mocha": "^5.2.0", 49 | "eslint-plugin-prettier": "^3.0.0", 50 | "husky": "0.14.3", 51 | "jsverify": "0.8.3", 52 | "knuth-shuffle": "^1.0.8", 53 | "lint-staged": "7.2.0", 54 | "mocha": "5.2.0", 55 | "nyc": "12.0.2", 56 | "prettier": "^1.14.3" 57 | }, 58 | "homepage": "https://github.com/sinonjs/commons#readme", 59 | "license": "BSD-3-Clause", 60 | "lint-staged": { 61 | "*.js": "eslint" 62 | }, 63 | "main": "lib/index.js", 64 | "name": "@sinonjs/commons", 65 | "repository": { 66 | "type": "git", 67 | "url": "git+https://github.com/sinonjs/commons.git" 68 | }, 69 | "scripts": { 70 | "lint": "eslint .", 71 | "precommit": "lint-staged", 72 | "test": "mocha --recursive -R dot \"lib/**/*.test.js\"", 73 | "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", 74 | "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test" 75 | }, 76 | "version": "1.4.0" 77 | } 78 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/formatio/LICENSE: -------------------------------------------------------------------------------- 1 | (The BSD License) 2 | 3 | Copyright (c) 2010-2012, Christian Johansen (christian@cjohansen.no) and 4 | August Lilleaas (august.lilleaas@gmail.com). All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, 7 | are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | * Neither the name of Christian Johansen nor the names of his contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/formatio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@sinonjs/formatio@2.0.0", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@sinonjs/formatio@2.0.0", 10 | "_id": "@sinonjs/formatio@2.0.0", 11 | "_inBundle": false, 12 | "_integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", 13 | "_location": "/@sinonjs/formatio", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@sinonjs/formatio@2.0.0", 19 | "name": "@sinonjs/formatio", 20 | "escapedName": "@sinonjs%2fformatio", 21 | "scope": "@sinonjs", 22 | "rawSpec": "2.0.0", 23 | "saveSpec": null, 24 | "fetchSpec": "2.0.0" 25 | }, 26 | "_requiredBy": [ 27 | "/sinon" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", 30 | "_spec": "2.0.0", 31 | "_where": "c:\\code-analysis-2", 32 | "author": { 33 | "name": "Christian Johansen" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/sinonjs/formatio/issues" 37 | }, 38 | "dependencies": { 39 | "samsam": "1.3.0" 40 | }, 41 | "description": "Human-readable object formatting", 42 | "devDependencies": { 43 | "eslint": "4.16.0", 44 | "eslint-config-sinon": "1.0.3", 45 | "eslint-plugin-ie11": "1.0.0", 46 | "eslint-plugin-mocha": "4.11.0", 47 | "mocha": "5.0.0", 48 | "nyc": "11.4.1", 49 | "referee": "1.2.0" 50 | }, 51 | "files": [ 52 | "lib/**/*[^test].js" 53 | ], 54 | "homepage": "http://busterjs.org/docs/formatio/", 55 | "license": "BSD-3-Clause", 56 | "main": "./lib/formatio", 57 | "name": "@sinonjs/formatio", 58 | "repository": { 59 | "type": "git", 60 | "url": "git+https://github.com/sinonjs/formatio.git" 61 | }, 62 | "scripts": { 63 | "lint": "eslint .", 64 | "test": "mocha 'lib/**/*.test.js'", 65 | "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test" 66 | }, 67 | "version": "2.0.0" 68 | } 69 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/LICENSE: -------------------------------------------------------------------------------- 1 | (The BSD License) 2 | 3 | Copyright (c) 2010-2012, Christian Johansen, christian@cjohansen.no and 4 | August Lilleaas, august.lilleaas@gmail.com. All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, 7 | are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | * Neither the name of Christian Johansen nor the names of his contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/create-set.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var typeOf = require("@sinonjs/commons").typeOf; 4 | 5 | // This helper makes it convenient to create Set instances from a 6 | // collection, an overcomes the shortcoming that IE11 doesn't support 7 | // collection arguments 8 | // 9 | // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set 10 | function createSet(array) { 11 | if (arguments.length > 0 && !Array.isArray(array)) { 12 | throw new TypeError( 13 | "createSet can be called with either no arguments or an Array" 14 | ); 15 | } 16 | 17 | var items = typeOf(array) === "array" ? array : []; 18 | var set = new Set(); 19 | 20 | items.forEach(function(item) { 21 | set.add(item); 22 | }); 23 | 24 | return set; 25 | } 26 | 27 | module.exports = createSet; 28 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/deep-equal-benchmark.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Benchmark = require("benchmark"); 4 | var deepEqual = require("./deep-equal"); 5 | 6 | var suite = new Benchmark.Suite(); 7 | var complex1 = { 8 | "1e116061-59bf-433a-8ab0-017b67a51d26": 9 | "a7fd22ab-e809-414f-ad55-9c97598395d8", 10 | "3824e8b7-22f5-489c-9919-43b432e3af6b": 11 | "548baefd-f43c-4dc9-9df5-f7c9c96223b0", 12 | "123e5750-eb66-45e5-a770-310879203b33": 13 | "89ff817d-65a2-4598-b190-21c128096e6a", 14 | "1d66be95-8aaa-4167-9a47-e7ee19bb0735": 15 | "64349492-56e8-4100-9552-a89fb4a9aef4", 16 | "f5538565-dc92-4ee4-a762-1ba5fe0528f6": { 17 | "53631f78-2f2a-448f-89c7-ed3585e8e6f0": 18 | "2cce00ee-f5ee-43ef-878f-958597b23225", 19 | "73e8298b-72fd-4969-afc1-d891b61e744f": 20 | "4e57aa30-af51-4d78-887c-019755e5d117", 21 | "85439907-5b0e-4a08-8cfa-902a68dc3cc0": 22 | "9639add9-6897-4cf0-b3d3-2ebf9c214f01", 23 | "d4ae9d87-bd6c-47e0-95a1-6f4eb4211549": 24 | "41fd3dd2-43ce-47f2-b92e-462474d07a6f", 25 | "f70345a2-0ea3-45a6-bafa-8c7a72379277": { 26 | "1bce714b-cd0a-417d-9a0c-bf4b7d35c0c4": 27 | "3b8b0dde-e2ed-4b34-ac8d-729ba3c9667e", 28 | "13e05c60-97d1-43f0-a6ef-d5247f4dd11f": 29 | "60f685a4-6558-4ade-9d4b-28281c3989db", 30 | "925b2609-e7b7-42f5-82cf-2d995697cec5": 31 | "79115261-8161-4a6c-9487-47847276a717", 32 | "52d644ac-7b33-4b79-b5b3-5afe7fd4ec2c": [ 33 | "3c2ae716-92f1-4a3d-b98f-50ea49f51c45", 34 | "de76b822-71b3-4b5a-a041-4140378b70e2", 35 | "0302a405-1d58-44fa-a0c6-dd07bb0ca26e", 36 | new Date(), 37 | new Error(), 38 | new RegExp(), 39 | // eslint-disable-next-line no-undef 40 | new Map(), 41 | new Set(), 42 | // eslint-disable-next-line no-undef, ie11/no-weak-collections 43 | new WeakMap(), 44 | // eslint-disable-next-line no-undef, ie11/no-weak-collections 45 | new WeakSet() 46 | ] 47 | } 48 | } 49 | }; 50 | var complex2 = Object.create(complex1); 51 | 52 | var cyclic1 = { 53 | "4a092cd1-225e-4739-8331-d6564aafb702": 54 | "d0cebbe0-23fb-4cc4-8fa0-ef11ceedf12e" 55 | }; 56 | cyclic1.cyclicRef = cyclic1; 57 | 58 | var cyclic2 = Object.create(cyclic1); 59 | 60 | // add tests 61 | suite 62 | .add("complex objects", function() { 63 | return deepEqual(complex1, complex2); 64 | }) 65 | .add("cyclic references", function() { 66 | return deepEqual(cyclic1, cyclic2); 67 | }) 68 | // add listeners 69 | .on("cycle", function(event) { 70 | // eslint-disable-next-line no-console 71 | console.log(String(event.target)); 72 | }) 73 | // run async 74 | .run({ async: true }); 75 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/get-class-name.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var valueToString = require("@sinonjs/commons").valueToString; 4 | 5 | var re = /function (\w+)\s*\(/; 6 | 7 | function getClassName(value) { 8 | if (value.constructor && "name" in value.constructor) { 9 | return value.constructor.name; 10 | } 11 | 12 | if (typeof value.constructor === "function") { 13 | var match = valueToString(value.constructor).match(re); 14 | if (match.length > 1) { 15 | return match[1]; 16 | } 17 | } 18 | 19 | return null; 20 | } 21 | 22 | module.exports = getClassName; 23 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/get-class.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var o = Object.prototype; 4 | 5 | function getClass(value) { 6 | // Returns the internal [[Class]] by calling Object.prototype.toString 7 | // with the provided value as this. Return value is a string, naming the 8 | // internal class, e.g. "Array" 9 | return o.toString.call(value).split(/[ \]]/)[1]; 10 | } 11 | 12 | module.exports = getClass; 13 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/identical.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var isNaN = require("./is-nan"); 4 | var isNegZero = require("./is-neg-zero"); 5 | 6 | /** 7 | * @name samsam.equal 8 | * @param Object obj1 9 | * @param Object obj2 10 | * 11 | * Returns ``true`` if two objects are strictly equal. Compared to 12 | * ``===`` there are two exceptions: 13 | * 14 | * - NaN is considered equal to NaN 15 | * - -0 and +0 are not considered equal 16 | */ 17 | function identical(obj1, obj2) { 18 | if (obj1 === obj2 || (isNaN(obj1) && isNaN(obj2))) { 19 | return obj1 !== 0 || isNegZero(obj1) === isNegZero(obj2); 20 | } 21 | 22 | return false; 23 | } 24 | 25 | module.exports = identical; 26 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-arguments.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var getClass = require("./get-class"); 4 | 5 | /** 6 | * @name samsam.isArguments 7 | * @param Object object 8 | * 9 | * Returns ``true`` if ``object`` is an ``arguments`` object, 10 | * ``false`` otherwise. 11 | */ 12 | function isArguments(object) { 13 | if (getClass(object) === "Arguments") { 14 | return true; 15 | } 16 | if ( 17 | typeof object !== "object" || 18 | typeof object.length !== "number" || 19 | getClass(object) === "Array" 20 | ) { 21 | return false; 22 | } 23 | if (typeof object.callee === "function") { 24 | return true; 25 | } 26 | try { 27 | object[object.length] = 6; 28 | delete object[object.length]; 29 | } catch (e) { 30 | return true; 31 | } 32 | return false; 33 | } 34 | 35 | module.exports = isArguments; 36 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-date.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function isDate(value) { 4 | return value instanceof Date; 5 | } 6 | 7 | module.exports = isDate; 8 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-element.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var div = typeof document !== "undefined" && document.createElement("div"); 4 | 5 | /** 6 | * @name samsam.isElement 7 | * @param Object object 8 | * 9 | * Returns ``true`` if ``object`` is a DOM element node. Unlike 10 | * Underscore.js/lodash, this function will return ``false`` if ``object`` 11 | * is an *element-like* object, i.e. a regular object with a ``nodeType`` 12 | * property that holds the value ``1``. 13 | */ 14 | function isElement(object) { 15 | if (!object || object.nodeType !== 1 || !div) { 16 | return false; 17 | } 18 | try { 19 | object.appendChild(div); 20 | object.removeChild(div); 21 | } catch (e) { 22 | return false; 23 | } 24 | return true; 25 | } 26 | 27 | module.exports = isElement; 28 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-map.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function isMap(value) { 4 | return typeof Map !== "undefined" && value instanceof Map; 5 | } 6 | 7 | module.exports = isMap; 8 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-nan.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function isNaN(value) { 4 | // Unlike global isNaN, this avoids type coercion 5 | // typeof check avoids IE host object issues, hat tip to 6 | // lodash 7 | var val = value; // JsLint thinks value !== value is "weird" 8 | return typeof value === "number" && value !== val; 9 | } 10 | 11 | module.exports = isNaN; 12 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-neg-zero.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * @name samsam.isNegZero 5 | * @param Object value 6 | * 7 | * Returns ``true`` if ``value`` is ``-0``. 8 | */ 9 | function isNegZero(value) { 10 | return value === 0 && 1 / value === -Infinity; 11 | } 12 | 13 | module.exports = isNegZero; 14 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-object.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // Returns true when the value is a regular Object and not a specialized Object 4 | // 5 | // This helps speeding up deepEqual cyclic checks 6 | // The premise is that only Objects are stored in the visited array. 7 | // So if this function returns false, we don't have to do the 8 | // expensive operation of searching for the value in the the array of already 9 | // visited objects 10 | function isObject(value) { 11 | return ( 12 | typeof value === "object" && 13 | value !== null && 14 | // none of these are collection objects, so we can return false 15 | !(value instanceof Boolean) && 16 | !(value instanceof Date) && 17 | !(value instanceof Error) && 18 | !(value instanceof Number) && 19 | !(value instanceof RegExp) && 20 | !(value instanceof String) 21 | ); 22 | } 23 | 24 | module.exports = isObject; 25 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-set.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function isSet(val) { 4 | return (typeof Set !== "undefined" && val instanceof Set) || false; 5 | } 6 | 7 | module.exports = isSet; 8 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/is-subset.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function isSubset(s1, s2, compare) { 4 | var allContained = true; 5 | s1.forEach(function(v1) { 6 | var includes = false; 7 | s2.forEach(function(v2) { 8 | if (compare(v2, v1)) { 9 | includes = true; 10 | } 11 | }); 12 | allContained = allContained && includes; 13 | }); 14 | 15 | return allContained; 16 | } 17 | 18 | module.exports = isSubset; 19 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/iterable-to-string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var slice = require("@sinonjs/commons").prototypes.string.slice; 4 | var typeOf = require("@sinonjs/commons").typeOf; 5 | var valueToString = require("@sinonjs/commons").valueToString; 6 | 7 | module.exports = function iterableToString(obj) { 8 | var representation = ""; 9 | 10 | function stringify(item) { 11 | return typeof item === "string" 12 | ? "'" + item + "'" 13 | : valueToString(item); 14 | } 15 | 16 | function mapToString(map) { 17 | /* eslint-disable-next-line local-rules/no-prototype-methods */ 18 | map.forEach(function(value, key) { 19 | representation += 20 | "[" + stringify(key) + "," + stringify(value) + "],"; 21 | }); 22 | 23 | representation = slice(representation, 0, -1); 24 | return representation; 25 | } 26 | 27 | function genericIterableToString(iterable) { 28 | /* eslint-disable-next-line local-rules/no-prototype-methods */ 29 | iterable.forEach(function(value) { 30 | representation += stringify(value) + ","; 31 | }); 32 | 33 | representation = slice(representation, 0, -1); 34 | return representation; 35 | } 36 | 37 | if (typeOf(obj) === "map") { 38 | return mapToString(obj); 39 | } 40 | 41 | return genericIterableToString(obj); 42 | }; 43 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/lib/samsam.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var identical = require("./identical"); 4 | var isArguments = require("./is-arguments"); 5 | var isElement = require("./is-element"); 6 | var isNegZero = require("./is-neg-zero"); 7 | var isSet = require("./is-set"); 8 | var match = require("./match"); 9 | var deepEqualCyclic = require("./deep-equal").use(match); 10 | var createMatcher = require("./matcher"); 11 | 12 | module.exports = { 13 | createMatcher: createMatcher, 14 | deepEqual: deepEqualCyclic, 15 | identical: identical, 16 | isArguments: isArguments, 17 | isElement: isElement, 18 | isNegZero: isNegZero, 19 | isSet: isSet, 20 | match: match 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/samsam/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@sinonjs/samsam@3.3.2", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@sinonjs/samsam@3.3.2", 10 | "_id": "@sinonjs/samsam@3.3.2", 11 | "_inBundle": false, 12 | "_integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", 13 | "_location": "/@sinonjs/samsam", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@sinonjs/samsam@3.3.2", 19 | "name": "@sinonjs/samsam", 20 | "escapedName": "@sinonjs%2fsamsam", 21 | "scope": "@sinonjs", 22 | "rawSpec": "3.3.2", 23 | "saveSpec": null, 24 | "fetchSpec": "3.3.2" 25 | }, 26 | "_requiredBy": [ 27 | "/nise/@sinonjs/formatio" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", 30 | "_spec": "3.3.2", 31 | "_where": "c:\\code-analysis-2", 32 | "author": { 33 | "name": "Christian Johansen" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/sinonjs/samsam/issues" 37 | }, 38 | "dependencies": { 39 | "@sinonjs/commons": "^1.0.2", 40 | "array-from": "^2.1.1", 41 | "lodash": "^4.17.11" 42 | }, 43 | "description": "Value identification and comparison functions", 44 | "devDependencies": { 45 | "@sinonjs/referee": "^2.0.0", 46 | "benchmark": "2.1.4", 47 | "eslint": "^4.19.1", 48 | "eslint-config-prettier": "2.9.0", 49 | "eslint-config-sinon": "^1.0.3", 50 | "eslint-plugin-ie11": "^1.0.0", 51 | "eslint-plugin-mocha": "^4.11.0", 52 | "eslint-plugin-prettier": "2.6.2", 53 | "husky": "^0.14.3", 54 | "jsdom": "^13.0.0", 55 | "jsdom-global": "^3.0.2", 56 | "lint-staged": "^6.1.0", 57 | "microtime": "2.1.8", 58 | "mkdirp": "^0.5.1", 59 | "mocha": "^5.0.0", 60 | "mochify": "^5.8.1", 61 | "npm-run-all": "^4.1.2", 62 | "nyc": "^13.2.0", 63 | "prettier": "1.13.7", 64 | "rollup": "^0.57.1", 65 | "rollup-plugin-commonjs": "^9.1.0" 66 | }, 67 | "files": [ 68 | "dist/", 69 | "docs/", 70 | "lib/", 71 | "!lib/**/*.test.js" 72 | ], 73 | "homepage": "http://sinonjs.github.io/samsam/", 74 | "license": "BSD-3-Clause", 75 | "lint-staged": { 76 | "*.js": "eslint" 77 | }, 78 | "main": "./lib/samsam", 79 | "name": "@sinonjs/samsam", 80 | "repository": { 81 | "type": "git", 82 | "url": "git+https://github.com/sinonjs/samsam.git" 83 | }, 84 | "scripts": { 85 | "benchmark": "node lib/deep-equal-benchmark.js", 86 | "build": "run-s build:dist-folder build:bundle", 87 | "build:bundle": "rollup -c > dist/samsam.js", 88 | "build:dist-folder": "mkdirp dist", 89 | "lint": "eslint .", 90 | "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", 91 | "test": "mocha ./lib/*.test.js", 92 | "test-cloud": "npm run test-headless -- --wd", 93 | "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", 94 | "test-headless": "mochify lib/*.test.js" 95 | }, 96 | "version": "3.3.2" 97 | } 98 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/text-encoding/index.js: -------------------------------------------------------------------------------- 1 | // This is free and unencumbered software released into the public domain. 2 | // See LICENSE.md for more information. 3 | 4 | var encoding = require("./lib/encoding.js"); 5 | 6 | module.exports = { 7 | TextEncoder: encoding.TextEncoder, 8 | TextDecoder: encoding.TextDecoder, 9 | }; 10 | -------------------------------------------------------------------------------- /node_modules/@sinonjs/text-encoding/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@sinonjs/text-encoding@0.7.1", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@sinonjs/text-encoding@0.7.1", 10 | "_id": "@sinonjs/text-encoding@0.7.1", 11 | "_inBundle": false, 12 | "_integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", 13 | "_location": "/@sinonjs/text-encoding", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@sinonjs/text-encoding@0.7.1", 19 | "name": "@sinonjs/text-encoding", 20 | "escapedName": "@sinonjs%2ftext-encoding", 21 | "scope": "@sinonjs", 22 | "rawSpec": "0.7.1", 23 | "saveSpec": null, 24 | "fetchSpec": "0.7.1" 25 | }, 26 | "_requiredBy": [ 27 | "/nise" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", 30 | "_spec": "0.7.1", 31 | "_where": "c:\\code-analysis-2", 32 | "author": { 33 | "name": "Joshua Bell", 34 | "email": "inexorabletash@gmail.com" 35 | }, 36 | "bugs": { 37 | "url": "https://github.com/inexorabletash/text-encoding/issues" 38 | }, 39 | "contributors": [ 40 | { 41 | "name": "Joshua Bell", 42 | "email": "inexorabletash@gmail.com" 43 | }, 44 | { 45 | "name": "Rick Eyre", 46 | "email": "rick.eyre@outlook.com" 47 | }, 48 | { 49 | "name": "Eugen Podaru", 50 | "email": "eugen.podaru@live.com" 51 | }, 52 | { 53 | "name": "Filip Dupanović", 54 | "email": "filip.dupanovic@gmail.com" 55 | }, 56 | { 57 | "name": "Anne van Kesteren", 58 | "email": "annevk@annevk.nl" 59 | }, 60 | { 61 | "name": "Author: Francis Avila", 62 | "email": "francisga@gmail.com" 63 | }, 64 | { 65 | "name": "Michael J. Ryan", 66 | "email": "tracker1@gmail.com" 67 | }, 68 | { 69 | "name": "Pierre Queinnec", 70 | "email": "pierre@queinnec.org" 71 | }, 72 | { 73 | "name": "Zack Weinberg", 74 | "email": "zackw@panix.com" 75 | } 76 | ], 77 | "description": "Polyfill for the Encoding Living Standard's API.", 78 | "files": [ 79 | "index.js", 80 | "lib/encoding.js", 81 | "lib/encoding-indexes.js" 82 | ], 83 | "homepage": "https://github.com/inexorabletash/text-encoding", 84 | "keywords": [ 85 | "encoding", 86 | "decoding", 87 | "living standard" 88 | ], 89 | "license": "(Unlicense OR Apache-2.0)", 90 | "main": "index.js", 91 | "name": "@sinonjs/text-encoding", 92 | "repository": { 93 | "type": "git", 94 | "url": "git+https://github.com/inexorabletash/text-encoding.git" 95 | }, 96 | "version": "0.7.1" 97 | } 98 | -------------------------------------------------------------------------------- /node_modules/@types/mocha/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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 | -------------------------------------------------------------------------------- /node_modules/@types/mocha/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/mocha` 3 | 4 | # Summary 5 | This package contains type definitions for mocha (http://mochajs.org/). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mocha 9 | 10 | Additional Details 11 | * Last updated: Wed, 31 Jan 2018 21:25:50 GMT 12 | * Dependencies: none 13 | * Global values: Mocha, after, afterEach, before, beforeEach, context, describe, it, mocha, run, setup, specify, suite, suiteSetup, suiteTeardown, teardown, test, xdescribe, xit 14 | 15 | # Credits 16 | These definitions were written by Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon . 17 | -------------------------------------------------------------------------------- /node_modules/@types/mocha/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@types/mocha@2.2.48", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@types/mocha@2.2.48", 10 | "_id": "@types/mocha@2.2.48", 11 | "_inBundle": false, 12 | "_integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", 13 | "_location": "/@types/mocha", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@types/mocha@2.2.48", 19 | "name": "@types/mocha", 20 | "escapedName": "@types%2fmocha", 21 | "scope": "@types", 22 | "rawSpec": "2.2.48", 23 | "saveSpec": null, 24 | "fetchSpec": "2.2.48" 25 | }, 26 | "_requiredBy": [ 27 | "/" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", 30 | "_spec": "2.2.48", 31 | "_where": "c:\\code-analysis-2", 32 | "bugs": { 33 | "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" 34 | }, 35 | "contributors": [ 36 | { 37 | "name": "Kazi Manzur Rashid", 38 | "url": "https://github.com/kazimanzurrashid" 39 | }, 40 | { 41 | "name": "otiai10", 42 | "url": "https://github.com/otiai10" 43 | }, 44 | { 45 | "name": "jt000", 46 | "url": "https://github.com/jt000" 47 | }, 48 | { 49 | "name": "Vadim Macagon", 50 | "url": "https://github.com/enlight" 51 | } 52 | ], 53 | "dependencies": {}, 54 | "description": "TypeScript definitions for mocha", 55 | "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", 56 | "license": "MIT", 57 | "main": "", 58 | "name": "@types/mocha", 59 | "repository": { 60 | "type": "git", 61 | "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" 62 | }, 63 | "scripts": {}, 64 | "typeScriptVersion": "2.0", 65 | "typesPublisherContentHash": "27056d243d0717a72aece52a5c80847a49c9f9c5882241963aff6bfed2ee4a93", 66 | "version": "2.2.48" 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/@types/node/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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 | -------------------------------------------------------------------------------- /node_modules/@types/node/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/node` 3 | 4 | # Summary 5 | This package contains type definitions for Node.js (http://nodejs.org/). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v8 9 | 10 | Additional Details 11 | * Last updated: Wed, 17 Jul 2019 18:37:31 GMT 12 | * Dependencies: none 13 | * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout 14 | 15 | # Credits 16 | These definitions were written by Microsoft TypeScript , DefinitelyTyped , Parambir Singh , Christian Vaagland Tellnes , Wilco Bakker , Nicolas Voigt , Chigozirim C. , Flarna , Mariusz Wiktorczyk , wwwy3y3 , Deividas Bakanas , Kelvin Jin , Alvis HT Tang , Sebastian Silbermann , Hannes Magnusson , Alberto Schiabel , Huw , Nicolas Even , Bruno Scheufler , Hoàng Văn Khải , Lishude , Andrew Makarov , Jordi Oliveras Rovira , and Thanik Bhongbhibhat . 17 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.2/index.d.ts: -------------------------------------------------------------------------------- 1 | // NOTE: These definitions support NodeJS and TypeScript 3.2. 2 | 3 | // NOTE: TypeScript version-specific augmentations can be found in the following paths: 4 | // - ~/base.d.ts - Shared definitions common to all TypeScript versions 5 | // - ~/index.d.ts - Definitions specific to TypeScript 2.1 6 | // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 7 | 8 | // Reference required types from the default lib: 9 | /// 10 | 11 | // Base definitions for all NodeJS modules that are not specific to any version of TypeScript: 12 | // tslint:disable-next-line:no-bad-reference 13 | /// 14 | 15 | // TypeScript 3.2-specific augmentations: 16 | declare module "util" { 17 | namespace inspect { 18 | const custom: unique symbol; 19 | } 20 | namespace promisify { 21 | const custom: unique symbol; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/@types/q/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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 | -------------------------------------------------------------------------------- /node_modules/@types/q/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/q` 3 | 4 | # Summary 5 | This package contains type definitions for Q ( https://github.com/kriskowal/q ). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/q 9 | 10 | Additional Details 11 | * Last updated: Wed, 13 Mar 2019 17:15:46 GMT 12 | * Dependencies: none 13 | * Global values: Q 14 | 15 | # Credits 16 | These definitions were written by Barrie Nemetchek , Andrew Gaspar , John Reilly , Michel Boudreau , TeamworkGuy2 . 17 | -------------------------------------------------------------------------------- /node_modules/@types/q/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@types/q@1.5.2", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@types/q@1.5.2", 10 | "_id": "@types/q@1.5.2", 11 | "_inBundle": false, 12 | "_integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", 13 | "_location": "/@types/q", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@types/q@1.5.2", 19 | "name": "@types/q", 20 | "escapedName": "@types%2fq", 21 | "scope": "@types", 22 | "rawSpec": "1.5.2", 23 | "saveSpec": null, 24 | "fetchSpec": "1.5.2" 25 | }, 26 | "_requiredBy": [ 27 | "/" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", 30 | "_spec": "1.5.2", 31 | "_where": "c:\\code-analysis-2", 32 | "bugs": { 33 | "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" 34 | }, 35 | "contributors": [ 36 | { 37 | "name": "Barrie Nemetchek", 38 | "url": "https://github.com/bnemetchek" 39 | }, 40 | { 41 | "name": "Andrew Gaspar", 42 | "url": "https://github.com/AndrewGaspar" 43 | }, 44 | { 45 | "name": "John Reilly", 46 | "url": "https://github.com/johnnyreilly" 47 | }, 48 | { 49 | "name": "Michel Boudreau", 50 | "url": "https://github.com/mboudreau" 51 | }, 52 | { 53 | "name": "TeamworkGuy2", 54 | "url": "https://github.com/TeamworkGuy2" 55 | } 56 | ], 57 | "dependencies": {}, 58 | "description": "TypeScript definitions for Q", 59 | "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", 60 | "license": "MIT", 61 | "main": "", 62 | "name": "@types/q", 63 | "repository": { 64 | "type": "git", 65 | "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", 66 | "directory": "types/q" 67 | }, 68 | "scripts": {}, 69 | "typeScriptVersion": "2.3", 70 | "types": "index", 71 | "typesPublisherContentHash": "831f89b03c9bf944abfea1d45425872fe7bc687a3ea0ee83f6bb2bb63af9dbc2", 72 | "version": "1.5.2" 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/@types/sinon/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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 | -------------------------------------------------------------------------------- /node_modules/@types/sinon/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/sinon` 3 | 4 | # Summary 5 | This package contains type definitions for Sinon (http://sinonjs.org/). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/sinon 9 | 10 | Additional Details 11 | * Last updated: Thu, 10 May 2018 20:58:18 GMT 12 | * Dependencies: none 13 | * Global values: sinon 14 | 15 | # Credits 16 | These definitions were written by William Sears , Jonathan Little , Lukas Spieß , Nico Jansen , James Garbutt . 17 | -------------------------------------------------------------------------------- /node_modules/@types/sinon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@types/sinon@4.3.3", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_development": true, 9 | "_from": "@types/sinon@4.3.3", 10 | "_id": "@types/sinon@4.3.3", 11 | "_inBundle": false, 12 | "_integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", 13 | "_location": "/@types/sinon", 14 | "_phantomChildren": {}, 15 | "_requested": { 16 | "type": "version", 17 | "registry": true, 18 | "raw": "@types/sinon@4.3.3", 19 | "name": "@types/sinon", 20 | "escapedName": "@types%2fsinon", 21 | "scope": "@types", 22 | "rawSpec": "4.3.3", 23 | "saveSpec": null, 24 | "fetchSpec": "4.3.3" 25 | }, 26 | "_requiredBy": [ 27 | "/" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-4.3.3.tgz", 30 | "_spec": "4.3.3", 31 | "_where": "c:\\code-analysis-2", 32 | "bugs": { 33 | "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git/issues" 34 | }, 35 | "contributors": [ 36 | { 37 | "name": "William Sears", 38 | "url": "https://github.com/mrbigdog2u" 39 | }, 40 | { 41 | "name": "Jonathan Little", 42 | "url": "https://github.com/rationull" 43 | }, 44 | { 45 | "name": "Lukas Spieß", 46 | "url": "https://github.com/lumaxis" 47 | }, 48 | { 49 | "name": "Nico Jansen", 50 | "url": "https://github.com/nicojs" 51 | }, 52 | { 53 | "name": "James Garbutt", 54 | "url": "https://github.com/43081j" 55 | } 56 | ], 57 | "dependencies": {}, 58 | "description": "TypeScript definitions for Sinon", 59 | "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped.git#readme", 60 | "license": "MIT", 61 | "main": "", 62 | "name": "@types/sinon", 63 | "repository": { 64 | "type": "git", 65 | "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" 66 | }, 67 | "scripts": {}, 68 | "typeScriptVersion": "2.3", 69 | "typesPublisherContentHash": "b67d8134cedc1738e4956a350bf61589807cfb97d3e393e3ee7c0c0682292942", 70 | "version": "4.3.3" 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/argparse/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (C) 2012 by Vitaly Puzrin 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/argparse/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/argparse'); 4 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/append.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionAppend 3 | * 4 | * This action stores a list, and appends each argument value to the list. 5 | * This is useful to allow an option to be specified multiple times. 6 | * This class inherided from [[Action]] 7 | * 8 | **/ 9 | 10 | 'use strict'; 11 | 12 | var util = require('util'); 13 | 14 | var Action = require('../action'); 15 | 16 | // Constants 17 | var c = require('../const'); 18 | 19 | /*:nodoc:* 20 | * new ActionAppend(options) 21 | * - options (object): options hash see [[Action.new]] 22 | * 23 | * Note: options.nargs should be optional for constants 24 | * and more then zero for other 25 | **/ 26 | var ActionAppend = module.exports = function ActionAppend(options) { 27 | options = options || {}; 28 | if (this.nargs <= 0) { 29 | throw new Error('nargs for append actions must be > 0; if arg ' + 30 | 'strings are not supplying the value to append, ' + 31 | 'the append const action may be more appropriate'); 32 | } 33 | if (!!this.constant && this.nargs !== c.OPTIONAL) { 34 | throw new Error('nargs must be OPTIONAL to supply const'); 35 | } 36 | Action.call(this, options); 37 | }; 38 | util.inherits(ActionAppend, Action); 39 | 40 | /*:nodoc:* 41 | * ActionAppend#call(parser, namespace, values, optionString) -> Void 42 | * - parser (ArgumentParser): current parser 43 | * - namespace (Namespace): namespace for output data 44 | * - values (Array): parsed values 45 | * - optionString (Array): input option string(not parsed) 46 | * 47 | * Call the action. Save result in namespace object 48 | **/ 49 | ActionAppend.prototype.call = function (parser, namespace, values) { 50 | var items = (namespace[this.dest] || []).slice(); 51 | items.push(values); 52 | namespace.set(this.dest, items); 53 | }; 54 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/append/constant.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionAppendConstant 3 | * 4 | * This stores a list, and appends the value specified by 5 | * the const keyword argument to the list. 6 | * (Note that the const keyword argument defaults to null.) 7 | * The 'appendConst' action is typically useful when multiple 8 | * arguments need to store constants to the same list. 9 | * 10 | * This class inherited from [[Action]] 11 | **/ 12 | 13 | 'use strict'; 14 | 15 | var util = require('util'); 16 | 17 | var Action = require('../../action'); 18 | 19 | /*:nodoc:* 20 | * new ActionAppendConstant(options) 21 | * - options (object): options hash see [[Action.new]] 22 | * 23 | **/ 24 | var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { 25 | options = options || {}; 26 | options.nargs = 0; 27 | if (typeof options.constant === 'undefined') { 28 | throw new Error('constant option is required for appendAction'); 29 | } 30 | Action.call(this, options); 31 | }; 32 | util.inherits(ActionAppendConstant, Action); 33 | 34 | /*:nodoc:* 35 | * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void 36 | * - parser (ArgumentParser): current parser 37 | * - namespace (Namespace): namespace for output data 38 | * - values (Array): parsed values 39 | * - optionString (Array): input option string(not parsed) 40 | * 41 | * Call the action. Save result in namespace object 42 | **/ 43 | ActionAppendConstant.prototype.call = function (parser, namespace) { 44 | var items = [].concat(namespace[this.dest] || []); 45 | items.push(this.constant); 46 | namespace.set(this.dest, items); 47 | }; 48 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/count.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionCount 3 | * 4 | * This counts the number of times a keyword argument occurs. 5 | * For example, this is useful for increasing verbosity levels 6 | * 7 | * This class inherided from [[Action]] 8 | * 9 | **/ 10 | 'use strict'; 11 | 12 | var util = require('util'); 13 | 14 | var Action = require('../action'); 15 | 16 | /*:nodoc:* 17 | * new ActionCount(options) 18 | * - options (object): options hash see [[Action.new]] 19 | * 20 | **/ 21 | var ActionCount = module.exports = function ActionCount(options) { 22 | options = options || {}; 23 | options.nargs = 0; 24 | 25 | Action.call(this, options); 26 | }; 27 | util.inherits(ActionCount, Action); 28 | 29 | /*:nodoc:* 30 | * ActionCount#call(parser, namespace, values, optionString) -> Void 31 | * - parser (ArgumentParser): current parser 32 | * - namespace (Namespace): namespace for output data 33 | * - values (Array): parsed values 34 | * - optionString (Array): input option string(not parsed) 35 | * 36 | * Call the action. Save result in namespace object 37 | **/ 38 | ActionCount.prototype.call = function (parser, namespace) { 39 | namespace.set(this.dest, (namespace[this.dest] || 0) + 1); 40 | }; 41 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/help.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionHelp 3 | * 4 | * Support action for printing help 5 | * This class inherided from [[Action]] 6 | **/ 7 | 'use strict'; 8 | 9 | var util = require('util'); 10 | 11 | var Action = require('../action'); 12 | 13 | // Constants 14 | var c = require('../const'); 15 | 16 | /*:nodoc:* 17 | * new ActionHelp(options) 18 | * - options (object): options hash see [[Action.new]] 19 | * 20 | **/ 21 | var ActionHelp = module.exports = function ActionHelp(options) { 22 | options = options || {}; 23 | if (options.defaultValue !== null) { 24 | options.defaultValue = options.defaultValue; 25 | } else { 26 | options.defaultValue = c.SUPPRESS; 27 | } 28 | options.dest = (options.dest !== null ? options.dest : c.SUPPRESS); 29 | options.nargs = 0; 30 | Action.call(this, options); 31 | 32 | }; 33 | util.inherits(ActionHelp, Action); 34 | 35 | /*:nodoc:* 36 | * ActionHelp#call(parser, namespace, values, optionString) 37 | * - parser (ArgumentParser): current parser 38 | * - namespace (Namespace): namespace for output data 39 | * - values (Array): parsed values 40 | * - optionString (Array): input option string(not parsed) 41 | * 42 | * Print help and exit 43 | **/ 44 | ActionHelp.prototype.call = function (parser) { 45 | parser.printHelp(); 46 | parser.exit(); 47 | }; 48 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/store.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionStore 3 | * 4 | * This action just stores the argument’s value. This is the default action. 5 | * 6 | * This class inherited from [[Action]] 7 | * 8 | **/ 9 | 'use strict'; 10 | 11 | var util = require('util'); 12 | 13 | var Action = require('../action'); 14 | 15 | // Constants 16 | var c = require('../const'); 17 | 18 | 19 | /*:nodoc:* 20 | * new ActionStore(options) 21 | * - options (object): options hash see [[Action.new]] 22 | * 23 | **/ 24 | var ActionStore = module.exports = function ActionStore(options) { 25 | options = options || {}; 26 | if (this.nargs <= 0) { 27 | throw new Error('nargs for store actions must be > 0; if you ' + 28 | 'have nothing to store, actions such as store ' + 29 | 'true or store const may be more appropriate'); 30 | 31 | } 32 | if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) { 33 | throw new Error('nargs must be OPTIONAL to supply const'); 34 | } 35 | Action.call(this, options); 36 | }; 37 | util.inherits(ActionStore, Action); 38 | 39 | /*:nodoc:* 40 | * ActionStore#call(parser, namespace, values, optionString) -> Void 41 | * - parser (ArgumentParser): current parser 42 | * - namespace (Namespace): namespace for output data 43 | * - values (Array): parsed values 44 | * - optionString (Array): input option string(not parsed) 45 | * 46 | * Call the action. Save result in namespace object 47 | **/ 48 | ActionStore.prototype.call = function (parser, namespace, values) { 49 | namespace.set(this.dest, values); 50 | }; 51 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/store/constant.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionStoreConstant 3 | * 4 | * This action stores the value specified by the const keyword argument. 5 | * (Note that the const keyword argument defaults to the rather unhelpful null.) 6 | * The 'store_const' action is most commonly used with optional 7 | * arguments that specify some sort of flag. 8 | * 9 | * This class inherited from [[Action]] 10 | **/ 11 | 'use strict'; 12 | 13 | var util = require('util'); 14 | 15 | var Action = require('../../action'); 16 | 17 | /*:nodoc:* 18 | * new ActionStoreConstant(options) 19 | * - options (object): options hash see [[Action.new]] 20 | * 21 | **/ 22 | var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { 23 | options = options || {}; 24 | options.nargs = 0; 25 | if (typeof options.constant === 'undefined') { 26 | throw new Error('constant option is required for storeAction'); 27 | } 28 | Action.call(this, options); 29 | }; 30 | util.inherits(ActionStoreConstant, Action); 31 | 32 | /*:nodoc:* 33 | * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void 34 | * - parser (ArgumentParser): current parser 35 | * - namespace (Namespace): namespace for output data 36 | * - values (Array): parsed values 37 | * - optionString (Array): input option string(not parsed) 38 | * 39 | * Call the action. Save result in namespace object 40 | **/ 41 | ActionStoreConstant.prototype.call = function (parser, namespace) { 42 | namespace.set(this.dest, this.constant); 43 | }; 44 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/store/false.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionStoreFalse 3 | * 4 | * This action store the values False respectively. 5 | * This is special cases of 'storeConst' 6 | * 7 | * This class inherited from [[Action]] 8 | **/ 9 | 10 | 'use strict'; 11 | 12 | var util = require('util'); 13 | 14 | var ActionStoreConstant = require('./constant'); 15 | 16 | /*:nodoc:* 17 | * new ActionStoreFalse(options) 18 | * - options (object): hash of options see [[Action.new]] 19 | * 20 | **/ 21 | var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { 22 | options = options || {}; 23 | options.constant = false; 24 | options.defaultValue = options.defaultValue !== null ? options.defaultValue : true; 25 | ActionStoreConstant.call(this, options); 26 | }; 27 | util.inherits(ActionStoreFalse, ActionStoreConstant); 28 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/store/true.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionStoreTrue 3 | * 4 | * This action store the values True respectively. 5 | * This isspecial cases of 'storeConst' 6 | * 7 | * This class inherited from [[Action]] 8 | **/ 9 | 'use strict'; 10 | 11 | var util = require('util'); 12 | 13 | var ActionStoreConstant = require('./constant'); 14 | 15 | /*:nodoc:* 16 | * new ActionStoreTrue(options) 17 | * - options (object): options hash see [[Action.new]] 18 | * 19 | **/ 20 | var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { 21 | options = options || {}; 22 | options.constant = true; 23 | options.defaultValue = options.defaultValue !== null ? options.defaultValue : false; 24 | ActionStoreConstant.call(this, options); 25 | }; 26 | util.inherits(ActionStoreTrue, ActionStoreConstant); 27 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/action/version.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionVersion 3 | * 4 | * Support action for printing program version 5 | * This class inherited from [[Action]] 6 | **/ 7 | 'use strict'; 8 | 9 | var util = require('util'); 10 | 11 | var Action = require('../action'); 12 | 13 | // 14 | // Constants 15 | // 16 | var c = require('../const'); 17 | 18 | /*:nodoc:* 19 | * new ActionVersion(options) 20 | * - options (object): options hash see [[Action.new]] 21 | * 22 | **/ 23 | var ActionVersion = module.exports = function ActionVersion(options) { 24 | options = options || {}; 25 | options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS); 26 | options.dest = (options.dest || c.SUPPRESS); 27 | options.nargs = 0; 28 | this.version = options.version; 29 | Action.call(this, options); 30 | }; 31 | util.inherits(ActionVersion, Action); 32 | 33 | /*:nodoc:* 34 | * ActionVersion#call(parser, namespace, values, optionString) -> Void 35 | * - parser (ArgumentParser): current parser 36 | * - namespace (Namespace): namespace for output data 37 | * - values (Array): parsed values 38 | * - optionString (Array): input option string(not parsed) 39 | * 40 | * Print version and exit 41 | **/ 42 | ActionVersion.prototype.call = function (parser) { 43 | var version = this.version || parser.version; 44 | var formatter = parser._getFormatter(); 45 | formatter.addText(version); 46 | parser.exit(0, formatter.formatHelp()); 47 | }; 48 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/argparse.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports.ArgumentParser = require('./argument_parser.js'); 4 | module.exports.Namespace = require('./namespace'); 5 | module.exports.Action = require('./action'); 6 | module.exports.HelpFormatter = require('./help/formatter.js'); 7 | module.exports.Const = require('./const.js'); 8 | 9 | module.exports.ArgumentDefaultsHelpFormatter = 10 | require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; 11 | module.exports.RawDescriptionHelpFormatter = 12 | require('./help/added_formatters.js').RawDescriptionHelpFormatter; 13 | module.exports.RawTextHelpFormatter = 14 | require('./help/added_formatters.js').RawTextHelpFormatter; 15 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/argument/error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var format = require('util').format; 5 | 6 | 7 | var ERR_CODE = 'ARGError'; 8 | 9 | /*:nodoc:* 10 | * argumentError(argument, message) -> TypeError 11 | * - argument (Object): action with broken argument 12 | * - message (String): error message 13 | * 14 | * Error format helper. An error from creating or using an argument 15 | * (optional or positional). The string value of this exception 16 | * is the message, augmented with information 17 | * about the argument that caused it. 18 | * 19 | * #####Example 20 | * 21 | * var argumentErrorHelper = require('./argument/error'); 22 | * if (conflictOptionals.length > 0) { 23 | * throw argumentErrorHelper( 24 | * action, 25 | * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) 26 | * ); 27 | * } 28 | * 29 | **/ 30 | module.exports = function (argument, message) { 31 | var argumentName = null; 32 | var errMessage; 33 | var err; 34 | 35 | if (argument.getName) { 36 | argumentName = argument.getName(); 37 | } else { 38 | argumentName = '' + argument; 39 | } 40 | 41 | if (!argumentName) { 42 | errMessage = message; 43 | } else { 44 | errMessage = format('argument "%s": %s', argumentName, message); 45 | } 46 | 47 | err = new TypeError(errMessage); 48 | err.code = ERR_CODE; 49 | return err; 50 | }; 51 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/argument/exclusive.js: -------------------------------------------------------------------------------- 1 | /** internal 2 | * class MutuallyExclusiveGroup 3 | * 4 | * Group arguments. 5 | * By default, ArgumentParser groups command-line arguments 6 | * into “positional arguments” and “optional arguments” 7 | * when displaying help messages. When there is a better 8 | * conceptual grouping of arguments than this default one, 9 | * appropriate groups can be created using the addArgumentGroup() method 10 | * 11 | * This class inherited from [[ArgumentContainer]] 12 | **/ 13 | 'use strict'; 14 | 15 | var util = require('util'); 16 | 17 | var ArgumentGroup = require('./group'); 18 | 19 | /** 20 | * new MutuallyExclusiveGroup(container, options) 21 | * - container (object): main container 22 | * - options (object): options.required -> true/false 23 | * 24 | * `required` could be an argument itself, but making it a property of 25 | * the options argument is more consistent with the JS adaptation of the Python) 26 | **/ 27 | var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { 28 | var required; 29 | options = options || {}; 30 | required = options.required || false; 31 | ArgumentGroup.call(this, container); 32 | this.required = required; 33 | 34 | }; 35 | util.inherits(MutuallyExclusiveGroup, ArgumentGroup); 36 | 37 | 38 | MutuallyExclusiveGroup.prototype._addAction = function (action) { 39 | var msg; 40 | if (action.required) { 41 | msg = 'mutually exclusive arguments must be optional'; 42 | throw new Error(msg); 43 | } 44 | action = this._container._addAction(action); 45 | this._groupActions.push(action); 46 | return action; 47 | }; 48 | 49 | 50 | MutuallyExclusiveGroup.prototype._removeAction = function (action) { 51 | this._container._removeAction(action); 52 | this._groupActions.remove(action); 53 | }; 54 | 55 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/argument/group.js: -------------------------------------------------------------------------------- 1 | /** internal 2 | * class ArgumentGroup 3 | * 4 | * Group arguments. 5 | * By default, ArgumentParser groups command-line arguments 6 | * into “positional arguments” and “optional arguments” 7 | * when displaying help messages. When there is a better 8 | * conceptual grouping of arguments than this default one, 9 | * appropriate groups can be created using the addArgumentGroup() method 10 | * 11 | * This class inherited from [[ArgumentContainer]] 12 | **/ 13 | 'use strict'; 14 | 15 | var util = require('util'); 16 | 17 | var ActionContainer = require('../action_container'); 18 | 19 | 20 | /** 21 | * new ArgumentGroup(container, options) 22 | * - container (object): main container 23 | * - options (object): hash of group options 24 | * 25 | * #### options 26 | * - **prefixChars** group name prefix 27 | * - **argumentDefault** default argument value 28 | * - **title** group title 29 | * - **description** group description 30 | * 31 | **/ 32 | var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { 33 | 34 | options = options || {}; 35 | 36 | // add any missing keyword arguments by checking the container 37 | options.conflictHandler = (options.conflictHandler || container.conflictHandler); 38 | options.prefixChars = (options.prefixChars || container.prefixChars); 39 | options.argumentDefault = (options.argumentDefault || container.argumentDefault); 40 | 41 | ActionContainer.call(this, options); 42 | 43 | // group attributes 44 | this.title = options.title; 45 | this._groupActions = []; 46 | 47 | // share most attributes with the container 48 | this._container = container; 49 | this._registries = container._registries; 50 | this._actions = container._actions; 51 | this._optionStringActions = container._optionStringActions; 52 | this._defaults = container._defaults; 53 | this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; 54 | this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; 55 | }; 56 | util.inherits(ArgumentGroup, ActionContainer); 57 | 58 | 59 | ArgumentGroup.prototype._addAction = function (action) { 60 | // Parent add action 61 | action = ActionContainer.prototype._addAction.call(this, action); 62 | this._groupActions.push(action); 63 | return action; 64 | }; 65 | 66 | 67 | ArgumentGroup.prototype._removeAction = function (action) { 68 | // Parent remove action 69 | ActionContainer.prototype._removeAction.call(this, action); 70 | var actionIndex = this._groupActions.indexOf(action); 71 | if (actionIndex >= 0) { 72 | this._groupActions.splice(actionIndex, 1); 73 | } 74 | }; 75 | 76 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/const.js: -------------------------------------------------------------------------------- 1 | // 2 | // Constants 3 | // 4 | 5 | 'use strict'; 6 | 7 | module.exports.EOL = '\n'; 8 | 9 | module.exports.SUPPRESS = '==SUPPRESS=='; 10 | 11 | module.exports.OPTIONAL = '?'; 12 | 13 | module.exports.ZERO_OR_MORE = '*'; 14 | 15 | module.exports.ONE_OR_MORE = '+'; 16 | 17 | module.exports.PARSER = 'A...'; 18 | 19 | module.exports.REMAINDER = '...'; 20 | 21 | module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; 22 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/help/added_formatters.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var util = require('util'); 4 | 5 | // Constants 6 | var c = require('../const'); 7 | 8 | var $$ = require('../utils'); 9 | var HelpFormatter = require('./formatter.js'); 10 | 11 | /** 12 | * new RawDescriptionHelpFormatter(options) 13 | * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) 14 | * 15 | * Help message formatter which adds default values to argument help. 16 | * 17 | * Only the name of this class is considered a public API. All the methods 18 | * provided by the class are considered an implementation detail. 19 | **/ 20 | 21 | function ArgumentDefaultsHelpFormatter(options) { 22 | HelpFormatter.call(this, options); 23 | } 24 | 25 | util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); 26 | 27 | ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { 28 | var help = action.help; 29 | if (action.help.indexOf('%(defaultValue)s') === -1) { 30 | if (action.defaultValue !== c.SUPPRESS) { 31 | var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ]; 32 | if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { 33 | help += ' (default: %(defaultValue)s)'; 34 | } 35 | } 36 | } 37 | return help; 38 | }; 39 | 40 | module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; 41 | 42 | /** 43 | * new RawDescriptionHelpFormatter(options) 44 | * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) 45 | * 46 | * Help message formatter which retains any formatting in descriptions. 47 | * 48 | * Only the name of this class is considered a public API. All the methods 49 | * provided by the class are considered an implementation detail. 50 | **/ 51 | 52 | function RawDescriptionHelpFormatter(options) { 53 | HelpFormatter.call(this, options); 54 | } 55 | 56 | util.inherits(RawDescriptionHelpFormatter, HelpFormatter); 57 | 58 | RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { 59 | var lines = text.split('\n'); 60 | lines = lines.map(function (line) { 61 | return $$.trimEnd(indent + line); 62 | }); 63 | return lines.join('\n'); 64 | }; 65 | module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; 66 | 67 | /** 68 | * new RawTextHelpFormatter(options) 69 | * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) 70 | * 71 | * Help message formatter which retains formatting of all help text. 72 | * 73 | * Only the name of this class is considered a public API. All the methods 74 | * provided by the class are considered an implementation detail. 75 | **/ 76 | 77 | function RawTextHelpFormatter(options) { 78 | RawDescriptionHelpFormatter.call(this, options); 79 | } 80 | 81 | util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); 82 | 83 | RawTextHelpFormatter.prototype._splitLines = function (text) { 84 | return text.split('\n'); 85 | }; 86 | 87 | module.exports.RawTextHelpFormatter = RawTextHelpFormatter; 88 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/namespace.js: -------------------------------------------------------------------------------- 1 | /** 2 | * class Namespace 3 | * 4 | * Simple object for storing attributes. Implements equality by attribute names 5 | * and values, and provides a simple string representation. 6 | * 7 | * See also [original guide][1] 8 | * 9 | * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object 10 | **/ 11 | 'use strict'; 12 | 13 | var $$ = require('./utils'); 14 | 15 | /** 16 | * new Namespace(options) 17 | * - options(object): predefined propertis for result object 18 | * 19 | **/ 20 | var Namespace = module.exports = function Namespace(options) { 21 | $$.extend(this, options); 22 | }; 23 | 24 | /** 25 | * Namespace#isset(key) -> Boolean 26 | * - key (string|number): property name 27 | * 28 | * Tells whenever `namespace` contains given `key` or not. 29 | **/ 30 | Namespace.prototype.isset = function (key) { 31 | return $$.has(this, key); 32 | }; 33 | 34 | /** 35 | * Namespace#set(key, value) -> self 36 | * -key (string|number|object): propery name 37 | * -value (mixed): new property value 38 | * 39 | * Set the property named key with value. 40 | * If key object then set all key properties to namespace object 41 | **/ 42 | Namespace.prototype.set = function (key, value) { 43 | if (typeof (key) === 'object') { 44 | $$.extend(this, key); 45 | } else { 46 | this[key] = value; 47 | } 48 | return this; 49 | }; 50 | 51 | /** 52 | * Namespace#get(key, defaultValue) -> mixed 53 | * - key (string|number): property name 54 | * - defaultValue (mixed): default value 55 | * 56 | * Return the property key or defaulValue if not set 57 | **/ 58 | Namespace.prototype.get = function (key, defaultValue) { 59 | return !this[key] ? defaultValue : this[key]; 60 | }; 61 | 62 | /** 63 | * Namespace#unset(key, defaultValue) -> mixed 64 | * - key (string|number): property name 65 | * - defaultValue (mixed): default value 66 | * 67 | * Return data[key](and delete it) or defaultValue 68 | **/ 69 | Namespace.prototype.unset = function (key, defaultValue) { 70 | var value = this[key]; 71 | if (value !== null) { 72 | delete this[key]; 73 | return value; 74 | } 75 | return defaultValue; 76 | }; 77 | -------------------------------------------------------------------------------- /node_modules/argparse/lib/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.repeat = function (str, num) { 4 | var result = ''; 5 | for (var i = 0; i < num; i++) { result += str; } 6 | return result; 7 | }; 8 | 9 | exports.arrayEqual = function (a, b) { 10 | if (a.length !== b.length) { return false; } 11 | for (var i = 0; i < a.length; i++) { 12 | if (a[i] !== b[i]) { return false; } 13 | } 14 | return true; 15 | }; 16 | 17 | exports.trimChars = function (str, chars) { 18 | var start = 0; 19 | var end = str.length - 1; 20 | while (chars.indexOf(str.charAt(start)) >= 0) { start++; } 21 | while (chars.indexOf(str.charAt(end)) >= 0) { end--; } 22 | return str.slice(start, end + 1); 23 | }; 24 | 25 | exports.capitalize = function (str) { 26 | return str.charAt(0).toUpperCase() + str.slice(1); 27 | }; 28 | 29 | exports.arrayUnion = function () { 30 | var result = []; 31 | for (var i = 0, values = {}; i < arguments.length; i++) { 32 | var arr = arguments[i]; 33 | for (var j = 0; j < arr.length; j++) { 34 | if (!values[arr[j]]) { 35 | values[arr[j]] = true; 36 | result.push(arr[j]); 37 | } 38 | } 39 | } 40 | return result; 41 | }; 42 | 43 | function has(obj, key) { 44 | return Object.prototype.hasOwnProperty.call(obj, key); 45 | } 46 | 47 | exports.has = has; 48 | 49 | exports.extend = function (dest, src) { 50 | for (var i in src) { 51 | if (has(src, i)) { dest[i] = src[i]; } 52 | } 53 | }; 54 | 55 | exports.trimEnd = function (str) { 56 | return str.replace(/\s+$/g, ''); 57 | }; 58 | -------------------------------------------------------------------------------- /node_modules/argparse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "argparse@1.0.10", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "argparse@1.0.10", 9 | "_id": "argparse@1.0.10", 10 | "_inBundle": false, 11 | "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 12 | "_location": "/argparse", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "argparse@1.0.10", 18 | "name": "argparse", 19 | "escapedName": "argparse", 20 | "rawSpec": "1.0.10", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.10" 23 | }, 24 | "_requiredBy": [ 25 | "/js-yaml" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 28 | "_spec": "1.0.10", 29 | "_where": "c:\\code-analysis-2", 30 | "bugs": { 31 | "url": "https://github.com/nodeca/argparse/issues" 32 | }, 33 | "contributors": [ 34 | { 35 | "name": "Eugene Shkuropat" 36 | }, 37 | { 38 | "name": "Paul Jacobson" 39 | } 40 | ], 41 | "dependencies": { 42 | "sprintf-js": "~1.0.2" 43 | }, 44 | "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", 45 | "devDependencies": { 46 | "eslint": "^2.13.1", 47 | "istanbul": "^0.4.5", 48 | "mocha": "^3.1.0", 49 | "ndoc": "^5.0.1" 50 | }, 51 | "files": [ 52 | "index.js", 53 | "lib/" 54 | ], 55 | "homepage": "https://github.com/nodeca/argparse#readme", 56 | "keywords": [ 57 | "cli", 58 | "parser", 59 | "argparse", 60 | "option", 61 | "args" 62 | ], 63 | "license": "MIT", 64 | "name": "argparse", 65 | "repository": { 66 | "type": "git", 67 | "url": "git+https://github.com/nodeca/argparse.git" 68 | }, 69 | "scripts": { 70 | "test": "make test" 71 | }, 72 | "version": "1.0.10" 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/esprima/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 13 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 16 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 17 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 18 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 19 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | -------------------------------------------------------------------------------- /node_modules/esprima/README.md: -------------------------------------------------------------------------------- 1 | [![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima) 2 | [![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima) 3 | [![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima) 4 | [![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima) 5 | 6 | **Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, 7 | standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) 8 | parser written in ECMAScript (also popularly known as 9 | [JavaScript](https://en.wikipedia.org/wiki/JavaScript)). 10 | Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), 11 | with the help of [many contributors](https://github.com/jquery/esprima/contributors). 12 | 13 | ### Features 14 | 15 | - Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) 16 | - Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree) 17 | - Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/) 18 | - Optional tracking of syntax node location (index-based and line-column) 19 | - [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima)) 20 | 21 | ### API 22 | 23 | Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program. 24 | 25 | A simple example on Node.js REPL: 26 | 27 | ```javascript 28 | > var esprima = require('esprima'); 29 | > var program = 'const answer = 42'; 30 | 31 | > esprima.tokenize(program); 32 | [ { type: 'Keyword', value: 'const' }, 33 | { type: 'Identifier', value: 'answer' }, 34 | { type: 'Punctuator', value: '=' }, 35 | { type: 'Numeric', value: '42' } ] 36 | 37 | > esprima.parseScript(program); 38 | { type: 'Program', 39 | body: 40 | [ { type: 'VariableDeclaration', 41 | declarations: [Object], 42 | kind: 'const' } ], 43 | sourceType: 'script' } 44 | ``` 45 | 46 | For more information, please read the [complete documentation](http://esprima.org/doc). -------------------------------------------------------------------------------- /node_modules/js-yaml/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (C) 2011-2015 by Vitaly Puzrin 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/js-yaml/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var yaml = require('./lib/js-yaml.js'); 5 | 6 | 7 | module.exports = yaml; 8 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var loader = require('./js-yaml/loader'); 5 | var dumper = require('./js-yaml/dumper'); 6 | 7 | 8 | function deprecated(name) { 9 | return function () { 10 | throw new Error('Function ' + name + ' is deprecated and cannot be used.'); 11 | }; 12 | } 13 | 14 | 15 | module.exports.Type = require('./js-yaml/type'); 16 | module.exports.Schema = require('./js-yaml/schema'); 17 | module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe'); 18 | module.exports.JSON_SCHEMA = require('./js-yaml/schema/json'); 19 | module.exports.CORE_SCHEMA = require('./js-yaml/schema/core'); 20 | module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); 21 | module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full'); 22 | module.exports.load = loader.load; 23 | module.exports.loadAll = loader.loadAll; 24 | module.exports.safeLoad = loader.safeLoad; 25 | module.exports.safeLoadAll = loader.safeLoadAll; 26 | module.exports.dump = dumper.dump; 27 | module.exports.safeDump = dumper.safeDump; 28 | module.exports.YAMLException = require('./js-yaml/exception'); 29 | 30 | // Deprecated schema names from JS-YAML 2.0.x 31 | module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); 32 | module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); 33 | module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); 34 | 35 | // Deprecated functions from JS-YAML 1.x.x 36 | module.exports.scan = deprecated('scan'); 37 | module.exports.parse = deprecated('parse'); 38 | module.exports.compose = deprecated('compose'); 39 | module.exports.addConstructor = deprecated('addConstructor'); 40 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/common.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | function isNothing(subject) { 5 | return (typeof subject === 'undefined') || (subject === null); 6 | } 7 | 8 | 9 | function isObject(subject) { 10 | return (typeof subject === 'object') && (subject !== null); 11 | } 12 | 13 | 14 | function toArray(sequence) { 15 | if (Array.isArray(sequence)) return sequence; 16 | else if (isNothing(sequence)) return []; 17 | 18 | return [ sequence ]; 19 | } 20 | 21 | 22 | function extend(target, source) { 23 | var index, length, key, sourceKeys; 24 | 25 | if (source) { 26 | sourceKeys = Object.keys(source); 27 | 28 | for (index = 0, length = sourceKeys.length; index < length; index += 1) { 29 | key = sourceKeys[index]; 30 | target[key] = source[key]; 31 | } 32 | } 33 | 34 | return target; 35 | } 36 | 37 | 38 | function repeat(string, count) { 39 | var result = '', cycle; 40 | 41 | for (cycle = 0; cycle < count; cycle += 1) { 42 | result += string; 43 | } 44 | 45 | return result; 46 | } 47 | 48 | 49 | function isNegativeZero(number) { 50 | return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); 51 | } 52 | 53 | 54 | module.exports.isNothing = isNothing; 55 | module.exports.isObject = isObject; 56 | module.exports.toArray = toArray; 57 | module.exports.repeat = repeat; 58 | module.exports.isNegativeZero = isNegativeZero; 59 | module.exports.extend = extend; 60 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/exception.js: -------------------------------------------------------------------------------- 1 | // YAML error class. http://stackoverflow.com/questions/8458984 2 | // 3 | 'use strict'; 4 | 5 | function YAMLException(reason, mark) { 6 | // Super constructor 7 | Error.call(this); 8 | 9 | this.name = 'YAMLException'; 10 | this.reason = reason; 11 | this.mark = mark; 12 | this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); 13 | 14 | // Include stack trace in error object 15 | if (Error.captureStackTrace) { 16 | // Chrome and NodeJS 17 | Error.captureStackTrace(this, this.constructor); 18 | } else { 19 | // FF, IE 10+ and Safari 6+. Fallback for others 20 | this.stack = (new Error()).stack || ''; 21 | } 22 | } 23 | 24 | 25 | // Inherit from Error 26 | YAMLException.prototype = Object.create(Error.prototype); 27 | YAMLException.prototype.constructor = YAMLException; 28 | 29 | 30 | YAMLException.prototype.toString = function toString(compact) { 31 | var result = this.name + ': '; 32 | 33 | result += this.reason || '(unknown reason)'; 34 | 35 | if (!compact && this.mark) { 36 | result += ' ' + this.mark.toString(); 37 | } 38 | 39 | return result; 40 | }; 41 | 42 | 43 | module.exports = YAMLException; 44 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/mark.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var common = require('./common'); 5 | 6 | 7 | function Mark(name, buffer, position, line, column) { 8 | this.name = name; 9 | this.buffer = buffer; 10 | this.position = position; 11 | this.line = line; 12 | this.column = column; 13 | } 14 | 15 | 16 | Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { 17 | var head, start, tail, end, snippet; 18 | 19 | if (!this.buffer) return null; 20 | 21 | indent = indent || 4; 22 | maxLength = maxLength || 75; 23 | 24 | head = ''; 25 | start = this.position; 26 | 27 | while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { 28 | start -= 1; 29 | if (this.position - start > (maxLength / 2 - 1)) { 30 | head = ' ... '; 31 | start += 5; 32 | break; 33 | } 34 | } 35 | 36 | tail = ''; 37 | end = this.position; 38 | 39 | while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { 40 | end += 1; 41 | if (end - this.position > (maxLength / 2 - 1)) { 42 | tail = ' ... '; 43 | end -= 5; 44 | break; 45 | } 46 | } 47 | 48 | snippet = this.buffer.slice(start, end); 49 | 50 | return common.repeat(' ', indent) + head + snippet + tail + '\n' + 51 | common.repeat(' ', indent + this.position - start + head.length) + '^'; 52 | }; 53 | 54 | 55 | Mark.prototype.toString = function toString(compact) { 56 | var snippet, where = ''; 57 | 58 | if (this.name) { 59 | where += 'in "' + this.name + '" '; 60 | } 61 | 62 | where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); 63 | 64 | if (!compact) { 65 | snippet = this.getSnippet(); 66 | 67 | if (snippet) { 68 | where += ':\n' + snippet; 69 | } 70 | } 71 | 72 | return where; 73 | }; 74 | 75 | 76 | module.exports = Mark; 77 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*eslint-disable max-len*/ 4 | 5 | var common = require('./common'); 6 | var YAMLException = require('./exception'); 7 | var Type = require('./type'); 8 | 9 | 10 | function compileList(schema, name, result) { 11 | var exclude = []; 12 | 13 | schema.include.forEach(function (includedSchema) { 14 | result = compileList(includedSchema, name, result); 15 | }); 16 | 17 | schema[name].forEach(function (currentType) { 18 | result.forEach(function (previousType, previousIndex) { 19 | if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { 20 | exclude.push(previousIndex); 21 | } 22 | }); 23 | 24 | result.push(currentType); 25 | }); 26 | 27 | return result.filter(function (type, index) { 28 | return exclude.indexOf(index) === -1; 29 | }); 30 | } 31 | 32 | 33 | function compileMap(/* lists... */) { 34 | var result = { 35 | scalar: {}, 36 | sequence: {}, 37 | mapping: {}, 38 | fallback: {} 39 | }, index, length; 40 | 41 | function collectType(type) { 42 | result[type.kind][type.tag] = result['fallback'][type.tag] = type; 43 | } 44 | 45 | for (index = 0, length = arguments.length; index < length; index += 1) { 46 | arguments[index].forEach(collectType); 47 | } 48 | return result; 49 | } 50 | 51 | 52 | function Schema(definition) { 53 | this.include = definition.include || []; 54 | this.implicit = definition.implicit || []; 55 | this.explicit = definition.explicit || []; 56 | 57 | this.implicit.forEach(function (type) { 58 | if (type.loadKind && type.loadKind !== 'scalar') { 59 | throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); 60 | } 61 | }); 62 | 63 | this.compiledImplicit = compileList(this, 'implicit', []); 64 | this.compiledExplicit = compileList(this, 'explicit', []); 65 | this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); 66 | } 67 | 68 | 69 | Schema.DEFAULT = null; 70 | 71 | 72 | Schema.create = function createSchema() { 73 | var schemas, types; 74 | 75 | switch (arguments.length) { 76 | case 1: 77 | schemas = Schema.DEFAULT; 78 | types = arguments[0]; 79 | break; 80 | 81 | case 2: 82 | schemas = arguments[0]; 83 | types = arguments[1]; 84 | break; 85 | 86 | default: 87 | throw new YAMLException('Wrong number of arguments for Schema.create function'); 88 | } 89 | 90 | schemas = common.toArray(schemas); 91 | types = common.toArray(types); 92 | 93 | if (!schemas.every(function (schema) { return schema instanceof Schema; })) { 94 | throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); 95 | } 96 | 97 | if (!types.every(function (type) { return type instanceof Type; })) { 98 | throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); 99 | } 100 | 101 | return new Schema({ 102 | include: schemas, 103 | explicit: types 104 | }); 105 | }; 106 | 107 | 108 | module.exports = Schema; 109 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema/core.js: -------------------------------------------------------------------------------- 1 | // Standard YAML's Core schema. 2 | // http://www.yaml.org/spec/1.2/spec.html#id2804923 3 | // 4 | // NOTE: JS-YAML does not support schema-specific tag resolution restrictions. 5 | // So, Core schema has no distinctions from JSON schema is JS-YAML. 6 | 7 | 8 | 'use strict'; 9 | 10 | 11 | var Schema = require('../schema'); 12 | 13 | 14 | module.exports = new Schema({ 15 | include: [ 16 | require('./json') 17 | ] 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema/default_full.js: -------------------------------------------------------------------------------- 1 | // JS-YAML's default schema for `load` function. 2 | // It is not described in the YAML specification. 3 | // 4 | // This schema is based on JS-YAML's default safe schema and includes 5 | // JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. 6 | // 7 | // Also this schema is used as default base schema at `Schema.create` function. 8 | 9 | 10 | 'use strict'; 11 | 12 | 13 | var Schema = require('../schema'); 14 | 15 | 16 | module.exports = Schema.DEFAULT = new Schema({ 17 | include: [ 18 | require('./default_safe') 19 | ], 20 | explicit: [ 21 | require('../type/js/undefined'), 22 | require('../type/js/regexp'), 23 | require('../type/js/function') 24 | ] 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema/default_safe.js: -------------------------------------------------------------------------------- 1 | // JS-YAML's default schema for `safeLoad` function. 2 | // It is not described in the YAML specification. 3 | // 4 | // This schema is based on standard YAML's Core schema and includes most of 5 | // extra types described at YAML tag repository. (http://yaml.org/type/) 6 | 7 | 8 | 'use strict'; 9 | 10 | 11 | var Schema = require('../schema'); 12 | 13 | 14 | module.exports = new Schema({ 15 | include: [ 16 | require('./core') 17 | ], 18 | implicit: [ 19 | require('../type/timestamp'), 20 | require('../type/merge') 21 | ], 22 | explicit: [ 23 | require('../type/binary'), 24 | require('../type/omap'), 25 | require('../type/pairs'), 26 | require('../type/set') 27 | ] 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema/failsafe.js: -------------------------------------------------------------------------------- 1 | // Standard YAML's Failsafe schema. 2 | // http://www.yaml.org/spec/1.2/spec.html#id2802346 3 | 4 | 5 | 'use strict'; 6 | 7 | 8 | var Schema = require('../schema'); 9 | 10 | 11 | module.exports = new Schema({ 12 | explicit: [ 13 | require('../type/str'), 14 | require('../type/seq'), 15 | require('../type/map') 16 | ] 17 | }); 18 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/schema/json.js: -------------------------------------------------------------------------------- 1 | // Standard YAML's JSON schema. 2 | // http://www.yaml.org/spec/1.2/spec.html#id2803231 3 | // 4 | // NOTE: JS-YAML does not support schema-specific tag resolution restrictions. 5 | // So, this schema is not such strict as defined in the YAML specification. 6 | // It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. 7 | 8 | 9 | 'use strict'; 10 | 11 | 12 | var Schema = require('../schema'); 13 | 14 | 15 | module.exports = new Schema({ 16 | include: [ 17 | require('./failsafe') 18 | ], 19 | implicit: [ 20 | require('../type/null'), 21 | require('../type/bool'), 22 | require('../type/int'), 23 | require('../type/float') 24 | ] 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAMLException = require('./exception'); 4 | 5 | var TYPE_CONSTRUCTOR_OPTIONS = [ 6 | 'kind', 7 | 'resolve', 8 | 'construct', 9 | 'instanceOf', 10 | 'predicate', 11 | 'represent', 12 | 'defaultStyle', 13 | 'styleAliases' 14 | ]; 15 | 16 | var YAML_NODE_KINDS = [ 17 | 'scalar', 18 | 'sequence', 19 | 'mapping' 20 | ]; 21 | 22 | function compileStyleAliases(map) { 23 | var result = {}; 24 | 25 | if (map !== null) { 26 | Object.keys(map).forEach(function (style) { 27 | map[style].forEach(function (alias) { 28 | result[String(alias)] = style; 29 | }); 30 | }); 31 | } 32 | 33 | return result; 34 | } 35 | 36 | function Type(tag, options) { 37 | options = options || {}; 38 | 39 | Object.keys(options).forEach(function (name) { 40 | if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { 41 | throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); 42 | } 43 | }); 44 | 45 | // TODO: Add tag format check. 46 | this.tag = tag; 47 | this.kind = options['kind'] || null; 48 | this.resolve = options['resolve'] || function () { return true; }; 49 | this.construct = options['construct'] || function (data) { return data; }; 50 | this.instanceOf = options['instanceOf'] || null; 51 | this.predicate = options['predicate'] || null; 52 | this.represent = options['represent'] || null; 53 | this.defaultStyle = options['defaultStyle'] || null; 54 | this.styleAliases = compileStyleAliases(options['styleAliases'] || null); 55 | 56 | if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { 57 | throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); 58 | } 59 | } 60 | 61 | module.exports = Type; 62 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/bool.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | function resolveYamlBoolean(data) { 6 | if (data === null) return false; 7 | 8 | var max = data.length; 9 | 10 | return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || 11 | (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); 12 | } 13 | 14 | function constructYamlBoolean(data) { 15 | return data === 'true' || 16 | data === 'True' || 17 | data === 'TRUE'; 18 | } 19 | 20 | function isBoolean(object) { 21 | return Object.prototype.toString.call(object) === '[object Boolean]'; 22 | } 23 | 24 | module.exports = new Type('tag:yaml.org,2002:bool', { 25 | kind: 'scalar', 26 | resolve: resolveYamlBoolean, 27 | construct: constructYamlBoolean, 28 | predicate: isBoolean, 29 | represent: { 30 | lowercase: function (object) { return object ? 'true' : 'false'; }, 31 | uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, 32 | camelcase: function (object) { return object ? 'True' : 'False'; } 33 | }, 34 | defaultStyle: 'lowercase' 35 | }); 36 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/js/function.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var esprima; 4 | 5 | // Browserified version does not have esprima 6 | // 7 | // 1. For node.js just require module as deps 8 | // 2. For browser try to require mudule via external AMD system. 9 | // If not found - try to fallback to window.esprima. If not 10 | // found too - then fail to parse. 11 | // 12 | try { 13 | // workaround to exclude package from browserify list. 14 | var _require = require; 15 | esprima = _require('esprima'); 16 | } catch (_) { 17 | /*global window */ 18 | if (typeof window !== 'undefined') esprima = window.esprima; 19 | } 20 | 21 | var Type = require('../../type'); 22 | 23 | function resolveJavascriptFunction(data) { 24 | if (data === null) return false; 25 | 26 | try { 27 | var source = '(' + data + ')', 28 | ast = esprima.parse(source, { range: true }); 29 | 30 | if (ast.type !== 'Program' || 31 | ast.body.length !== 1 || 32 | ast.body[0].type !== 'ExpressionStatement' || 33 | (ast.body[0].expression.type !== 'ArrowFunctionExpression' && 34 | ast.body[0].expression.type !== 'FunctionExpression')) { 35 | return false; 36 | } 37 | 38 | return true; 39 | } catch (err) { 40 | return false; 41 | } 42 | } 43 | 44 | function constructJavascriptFunction(data) { 45 | /*jslint evil:true*/ 46 | 47 | var source = '(' + data + ')', 48 | ast = esprima.parse(source, { range: true }), 49 | params = [], 50 | body; 51 | 52 | if (ast.type !== 'Program' || 53 | ast.body.length !== 1 || 54 | ast.body[0].type !== 'ExpressionStatement' || 55 | (ast.body[0].expression.type !== 'ArrowFunctionExpression' && 56 | ast.body[0].expression.type !== 'FunctionExpression')) { 57 | throw new Error('Failed to resolve function'); 58 | } 59 | 60 | ast.body[0].expression.params.forEach(function (param) { 61 | params.push(param.name); 62 | }); 63 | 64 | body = ast.body[0].expression.body.range; 65 | 66 | // Esprima's ranges include the first '{' and the last '}' characters on 67 | // function expressions. So cut them out. 68 | if (ast.body[0].expression.body.type === 'BlockStatement') { 69 | /*eslint-disable no-new-func*/ 70 | return new Function(params, source.slice(body[0] + 1, body[1] - 1)); 71 | } 72 | // ES6 arrow functions can omit the BlockStatement. In that case, just return 73 | // the body. 74 | /*eslint-disable no-new-func*/ 75 | return new Function(params, 'return ' + source.slice(body[0], body[1])); 76 | } 77 | 78 | function representJavascriptFunction(object /*, style*/) { 79 | return object.toString(); 80 | } 81 | 82 | function isFunction(object) { 83 | return Object.prototype.toString.call(object) === '[object Function]'; 84 | } 85 | 86 | module.exports = new Type('tag:yaml.org,2002:js/function', { 87 | kind: 'scalar', 88 | resolve: resolveJavascriptFunction, 89 | construct: constructJavascriptFunction, 90 | predicate: isFunction, 91 | represent: representJavascriptFunction 92 | }); 93 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/js/regexp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../../type'); 4 | 5 | function resolveJavascriptRegExp(data) { 6 | if (data === null) return false; 7 | if (data.length === 0) return false; 8 | 9 | var regexp = data, 10 | tail = /\/([gim]*)$/.exec(data), 11 | modifiers = ''; 12 | 13 | // if regexp starts with '/' it can have modifiers and must be properly closed 14 | // `/foo/gim` - modifiers tail can be maximum 3 chars 15 | if (regexp[0] === '/') { 16 | if (tail) modifiers = tail[1]; 17 | 18 | if (modifiers.length > 3) return false; 19 | // if expression starts with /, is should be properly terminated 20 | if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; 21 | } 22 | 23 | return true; 24 | } 25 | 26 | function constructJavascriptRegExp(data) { 27 | var regexp = data, 28 | tail = /\/([gim]*)$/.exec(data), 29 | modifiers = ''; 30 | 31 | // `/foo/gim` - tail can be maximum 4 chars 32 | if (regexp[0] === '/') { 33 | if (tail) modifiers = tail[1]; 34 | regexp = regexp.slice(1, regexp.length - modifiers.length - 1); 35 | } 36 | 37 | return new RegExp(regexp, modifiers); 38 | } 39 | 40 | function representJavascriptRegExp(object /*, style*/) { 41 | var result = '/' + object.source + '/'; 42 | 43 | if (object.global) result += 'g'; 44 | if (object.multiline) result += 'm'; 45 | if (object.ignoreCase) result += 'i'; 46 | 47 | return result; 48 | } 49 | 50 | function isRegExp(object) { 51 | return Object.prototype.toString.call(object) === '[object RegExp]'; 52 | } 53 | 54 | module.exports = new Type('tag:yaml.org,2002:js/regexp', { 55 | kind: 'scalar', 56 | resolve: resolveJavascriptRegExp, 57 | construct: constructJavascriptRegExp, 58 | predicate: isRegExp, 59 | represent: representJavascriptRegExp 60 | }); 61 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/js/undefined.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../../type'); 4 | 5 | function resolveJavascriptUndefined() { 6 | return true; 7 | } 8 | 9 | function constructJavascriptUndefined() { 10 | /*eslint-disable no-undefined*/ 11 | return undefined; 12 | } 13 | 14 | function representJavascriptUndefined() { 15 | return ''; 16 | } 17 | 18 | function isUndefined(object) { 19 | return typeof object === 'undefined'; 20 | } 21 | 22 | module.exports = new Type('tag:yaml.org,2002:js/undefined', { 23 | kind: 'scalar', 24 | resolve: resolveJavascriptUndefined, 25 | construct: constructJavascriptUndefined, 26 | predicate: isUndefined, 27 | represent: representJavascriptUndefined 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/map.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | module.exports = new Type('tag:yaml.org,2002:map', { 6 | kind: 'mapping', 7 | construct: function (data) { return data !== null ? data : {}; } 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/merge.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | function resolveYamlMerge(data) { 6 | return data === '<<' || data === null; 7 | } 8 | 9 | module.exports = new Type('tag:yaml.org,2002:merge', { 10 | kind: 'scalar', 11 | resolve: resolveYamlMerge 12 | }); 13 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/null.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | function resolveYamlNull(data) { 6 | if (data === null) return true; 7 | 8 | var max = data.length; 9 | 10 | return (max === 1 && data === '~') || 11 | (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); 12 | } 13 | 14 | function constructYamlNull() { 15 | return null; 16 | } 17 | 18 | function isNull(object) { 19 | return object === null; 20 | } 21 | 22 | module.exports = new Type('tag:yaml.org,2002:null', { 23 | kind: 'scalar', 24 | resolve: resolveYamlNull, 25 | construct: constructYamlNull, 26 | predicate: isNull, 27 | represent: { 28 | canonical: function () { return '~'; }, 29 | lowercase: function () { return 'null'; }, 30 | uppercase: function () { return 'NULL'; }, 31 | camelcase: function () { return 'Null'; } 32 | }, 33 | defaultStyle: 'lowercase' 34 | }); 35 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/omap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | var _hasOwnProperty = Object.prototype.hasOwnProperty; 6 | var _toString = Object.prototype.toString; 7 | 8 | function resolveYamlOmap(data) { 9 | if (data === null) return true; 10 | 11 | var objectKeys = [], index, length, pair, pairKey, pairHasKey, 12 | object = data; 13 | 14 | for (index = 0, length = object.length; index < length; index += 1) { 15 | pair = object[index]; 16 | pairHasKey = false; 17 | 18 | if (_toString.call(pair) !== '[object Object]') return false; 19 | 20 | for (pairKey in pair) { 21 | if (_hasOwnProperty.call(pair, pairKey)) { 22 | if (!pairHasKey) pairHasKey = true; 23 | else return false; 24 | } 25 | } 26 | 27 | if (!pairHasKey) return false; 28 | 29 | if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); 30 | else return false; 31 | } 32 | 33 | return true; 34 | } 35 | 36 | function constructYamlOmap(data) { 37 | return data !== null ? data : []; 38 | } 39 | 40 | module.exports = new Type('tag:yaml.org,2002:omap', { 41 | kind: 'sequence', 42 | resolve: resolveYamlOmap, 43 | construct: constructYamlOmap 44 | }); 45 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/pairs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | var _toString = Object.prototype.toString; 6 | 7 | function resolveYamlPairs(data) { 8 | if (data === null) return true; 9 | 10 | var index, length, pair, keys, result, 11 | object = data; 12 | 13 | result = new Array(object.length); 14 | 15 | for (index = 0, length = object.length; index < length; index += 1) { 16 | pair = object[index]; 17 | 18 | if (_toString.call(pair) !== '[object Object]') return false; 19 | 20 | keys = Object.keys(pair); 21 | 22 | if (keys.length !== 1) return false; 23 | 24 | result[index] = [ keys[0], pair[keys[0]] ]; 25 | } 26 | 27 | return true; 28 | } 29 | 30 | function constructYamlPairs(data) { 31 | if (data === null) return []; 32 | 33 | var index, length, pair, keys, result, 34 | object = data; 35 | 36 | result = new Array(object.length); 37 | 38 | for (index = 0, length = object.length; index < length; index += 1) { 39 | pair = object[index]; 40 | 41 | keys = Object.keys(pair); 42 | 43 | result[index] = [ keys[0], pair[keys[0]] ]; 44 | } 45 | 46 | return result; 47 | } 48 | 49 | module.exports = new Type('tag:yaml.org,2002:pairs', { 50 | kind: 'sequence', 51 | resolve: resolveYamlPairs, 52 | construct: constructYamlPairs 53 | }); 54 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/seq.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | module.exports = new Type('tag:yaml.org,2002:seq', { 6 | kind: 'sequence', 7 | construct: function (data) { return data !== null ? data : []; } 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/set.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | var _hasOwnProperty = Object.prototype.hasOwnProperty; 6 | 7 | function resolveYamlSet(data) { 8 | if (data === null) return true; 9 | 10 | var key, object = data; 11 | 12 | for (key in object) { 13 | if (_hasOwnProperty.call(object, key)) { 14 | if (object[key] !== null) return false; 15 | } 16 | } 17 | 18 | return true; 19 | } 20 | 21 | function constructYamlSet(data) { 22 | return data !== null ? data : {}; 23 | } 24 | 25 | module.exports = new Type('tag:yaml.org,2002:set', { 26 | kind: 'mapping', 27 | resolve: resolveYamlSet, 28 | construct: constructYamlSet 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/str.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | module.exports = new Type('tag:yaml.org,2002:str', { 6 | kind: 'scalar', 7 | construct: function (data) { return data !== null ? data : ''; } 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/js-yaml/lib/js-yaml/type/timestamp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Type = require('../type'); 4 | 5 | var YAML_DATE_REGEXP = new RegExp( 6 | '^([0-9][0-9][0-9][0-9])' + // [1] year 7 | '-([0-9][0-9])' + // [2] month 8 | '-([0-9][0-9])$'); // [3] day 9 | 10 | var YAML_TIMESTAMP_REGEXP = new RegExp( 11 | '^([0-9][0-9][0-9][0-9])' + // [1] year 12 | '-([0-9][0-9]?)' + // [2] month 13 | '-([0-9][0-9]?)' + // [3] day 14 | '(?:[Tt]|[ \\t]+)' + // ... 15 | '([0-9][0-9]?)' + // [4] hour 16 | ':([0-9][0-9])' + // [5] minute 17 | ':([0-9][0-9])' + // [6] second 18 | '(?:\\.([0-9]*))?' + // [7] fraction 19 | '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour 20 | '(?::([0-9][0-9]))?))?$'); // [11] tz_minute 21 | 22 | function resolveYamlTimestamp(data) { 23 | if (data === null) return false; 24 | if (YAML_DATE_REGEXP.exec(data) !== null) return true; 25 | if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; 26 | return false; 27 | } 28 | 29 | function constructYamlTimestamp(data) { 30 | var match, year, month, day, hour, minute, second, fraction = 0, 31 | delta = null, tz_hour, tz_minute, date; 32 | 33 | match = YAML_DATE_REGEXP.exec(data); 34 | if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); 35 | 36 | if (match === null) throw new Error('Date resolve error'); 37 | 38 | // match: [1] year [2] month [3] day 39 | 40 | year = +(match[1]); 41 | month = +(match[2]) - 1; // JS month starts with 0 42 | day = +(match[3]); 43 | 44 | if (!match[4]) { // no hour 45 | return new Date(Date.UTC(year, month, day)); 46 | } 47 | 48 | // match: [4] hour [5] minute [6] second [7] fraction 49 | 50 | hour = +(match[4]); 51 | minute = +(match[5]); 52 | second = +(match[6]); 53 | 54 | if (match[7]) { 55 | fraction = match[7].slice(0, 3); 56 | while (fraction.length < 3) { // milli-seconds 57 | fraction += '0'; 58 | } 59 | fraction = +fraction; 60 | } 61 | 62 | // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute 63 | 64 | if (match[9]) { 65 | tz_hour = +(match[10]); 66 | tz_minute = +(match[11] || 0); 67 | delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds 68 | if (match[9] === '-') delta = -delta; 69 | } 70 | 71 | date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); 72 | 73 | if (delta) date.setTime(date.getTime() - delta); 74 | 75 | return date; 76 | } 77 | 78 | function representYamlTimestamp(object /*, style*/) { 79 | return object.toISOString(); 80 | } 81 | 82 | module.exports = new Type('tag:yaml.org,2002:timestamp', { 83 | kind: 'scalar', 84 | resolve: resolveYamlTimestamp, 85 | construct: constructYamlTimestamp, 86 | instanceOf: Date, 87 | represent: representYamlTimestamp 88 | }); 89 | -------------------------------------------------------------------------------- /node_modules/js-yaml/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "js-yaml@3.13.1", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "js-yaml@3.13.1", 9 | "_id": "js-yaml@3.13.1", 10 | "_inBundle": false, 11 | "_integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 12 | "_location": "/js-yaml", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "js-yaml@3.13.1", 18 | "name": "js-yaml", 19 | "escapedName": "js-yaml", 20 | "rawSpec": "3.13.1", 21 | "saveSpec": null, 22 | "fetchSpec": "3.13.1" 23 | }, 24 | "_requiredBy": [ 25 | "/" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 28 | "_spec": "3.13.1", 29 | "_where": "c:\\code-analysis-2", 30 | "author": { 31 | "name": "Vladimir Zapparov", 32 | "email": "dervus.grim@gmail.com" 33 | }, 34 | "bin": { 35 | "js-yaml": "bin/js-yaml.js" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/nodeca/js-yaml/issues" 39 | }, 40 | "contributors": [ 41 | { 42 | "name": "Aleksey V Zapparov", 43 | "email": "ixti@member.fsf.org", 44 | "url": "http://www.ixti.net/" 45 | }, 46 | { 47 | "name": "Vitaly Puzrin", 48 | "email": "vitaly@rcdesign.ru", 49 | "url": "https://github.com/puzrin" 50 | }, 51 | { 52 | "name": "Martin Grenfell", 53 | "email": "martin.grenfell@gmail.com", 54 | "url": "http://got-ravings.blogspot.com" 55 | } 56 | ], 57 | "dependencies": { 58 | "argparse": "^1.0.7", 59 | "esprima": "^4.0.0" 60 | }, 61 | "description": "YAML 1.2 parser and serializer", 62 | "devDependencies": { 63 | "ansi": "^0.3.1", 64 | "benchmark": "^2.1.4", 65 | "browserify": "^16.2.2", 66 | "codemirror": "^5.13.4", 67 | "eslint": "^4.1.1", 68 | "fast-check": "1.1.3", 69 | "istanbul": "^0.4.5", 70 | "mocha": "^5.2.0", 71 | "uglify-js": "^3.0.1" 72 | }, 73 | "files": [ 74 | "index.js", 75 | "lib/", 76 | "bin/", 77 | "dist/" 78 | ], 79 | "homepage": "https://github.com/nodeca/js-yaml", 80 | "keywords": [ 81 | "yaml", 82 | "parser", 83 | "serializer", 84 | "pyyaml" 85 | ], 86 | "license": "MIT", 87 | "name": "js-yaml", 88 | "repository": { 89 | "type": "git", 90 | "url": "git+https://github.com/nodeca/js-yaml.git" 91 | }, 92 | "scripts": { 93 | "test": "make test" 94 | }, 95 | "version": "3.13.1" 96 | } 97 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules/ -------------------------------------------------------------------------------- /node_modules/sprintf-js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007-2014, Alexandru Marasteanu 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of this software nor the names of its contributors may be 12 | used to endorse or promote products derived from this software without 13 | specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sprintf", 3 | "description": "JavaScript sprintf implementation", 4 | "version": "1.0.3", 5 | "main": "src/sprintf.js", 6 | "license": "BSD-3-Clause-Clear", 7 | "keywords": ["sprintf", "string", "formatting"], 8 | "authors": ["Alexandru Marasteanu (http://alexei.ro/)"], 9 | "homepage": "https://github.com/alexei/sprintf.js", 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/alexei/sprintf.js.git" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/demo/angular.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
{{ "%+010d"|sprintf:-123 }}
10 |
{{ "%+010d"|vsprintf:[-123] }}
11 |
{{ "%+010d"|fmt:-123 }}
12 |
{{ "%+010d"|vfmt:[-123] }}
13 |
{{ "I've got %2$d apples and %1$d oranges."|fmt:4:2 }}
14 |
{{ "I've got %(apples)d apples and %(oranges)d oranges."|fmt:{apples: 2, oranges: 4} }}
15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/dist/angular-sprintf.min.js: -------------------------------------------------------------------------------- 1 | /*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ 2 | 3 | angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]); 4 | //# sourceMappingURL=angular-sprintf.min.map -------------------------------------------------------------------------------- /node_modules/sprintf-js/dist/angular-sprintf.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} -------------------------------------------------------------------------------- /node_modules/sprintf-js/dist/angular-sprintf.min.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} -------------------------------------------------------------------------------- /node_modules/sprintf-js/dist/sprintf.min.js: -------------------------------------------------------------------------------- 1 | /*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ 2 | 3 | !function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"j":g=JSON.stringify(g,null,j[6]?parseInt(j[6]):0);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"g":g=j[7]?parseFloat(g).toPrecision(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}e.json.test(j[8])?q[q.length]=g:(!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g)}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); 4 | //# sourceMappingURL=sprintf.min.map -------------------------------------------------------------------------------- /node_modules/sprintf-js/gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | grunt.initConfig({ 3 | pkg: grunt.file.readJSON("package.json"), 4 | 5 | uglify: { 6 | options: { 7 | banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n", 8 | sourceMap: true 9 | }, 10 | build: { 11 | files: [ 12 | { 13 | src: "src/sprintf.js", 14 | dest: "dist/sprintf.min.js" 15 | }, 16 | { 17 | src: "src/angular-sprintf.js", 18 | dest: "dist/angular-sprintf.min.js" 19 | } 20 | ] 21 | } 22 | }, 23 | 24 | watch: { 25 | js: { 26 | files: "src/*.js", 27 | tasks: ["uglify"] 28 | } 29 | } 30 | }) 31 | 32 | grunt.loadNpmTasks("grunt-contrib-uglify") 33 | grunt.loadNpmTasks("grunt-contrib-watch") 34 | 35 | grunt.registerTask("default", ["uglify", "watch"]) 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "sprintf-js@1.0.3", 5 | "c:\\code-analysis-2" 6 | ] 7 | ], 8 | "_from": "sprintf-js@1.0.3", 9 | "_id": "sprintf-js@1.0.3", 10 | "_inBundle": false, 11 | "_integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 12 | "_location": "/sprintf-js", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "sprintf-js@1.0.3", 18 | "name": "sprintf-js", 19 | "escapedName": "sprintf-js", 20 | "rawSpec": "1.0.3", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.3" 23 | }, 24 | "_requiredBy": [ 25 | "/argparse" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 28 | "_spec": "1.0.3", 29 | "_where": "c:\\code-analysis-2", 30 | "author": { 31 | "name": "Alexandru Marasteanu", 32 | "email": "hello@alexei.ro", 33 | "url": "http://alexei.ro/" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/alexei/sprintf.js/issues" 37 | }, 38 | "description": "JavaScript sprintf implementation", 39 | "devDependencies": { 40 | "grunt": "*", 41 | "grunt-contrib-uglify": "*", 42 | "grunt-contrib-watch": "*", 43 | "mocha": "*" 44 | }, 45 | "homepage": "https://github.com/alexei/sprintf.js#readme", 46 | "license": "BSD-3-Clause", 47 | "main": "src/sprintf.js", 48 | "name": "sprintf-js", 49 | "repository": { 50 | "type": "git", 51 | "url": "git+https://github.com/alexei/sprintf.js.git" 52 | }, 53 | "scripts": { 54 | "test": "mocha test/test.js" 55 | }, 56 | "version": "1.0.3" 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/sprintf-js/src/angular-sprintf.js: -------------------------------------------------------------------------------- 1 | angular. 2 | module("sprintf", []). 3 | filter("sprintf", function() { 4 | return function() { 5 | return sprintf.apply(null, arguments) 6 | } 7 | }). 8 | filter("fmt", ["$filter", function($filter) { 9 | return $filter("sprintf") 10 | }]). 11 | filter("vsprintf", function() { 12 | return function(format, argv) { 13 | return vsprintf(format, argv) 14 | } 15 | }). 16 | filter("vfmt", ["$filter", function($filter) { 17 | return $filter("vsprintf") 18 | }]) 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-analysis", 3 | "version": "1.0.0", 4 | "description": "Node dependencies for the .NET Code analysis action.", 5 | "scripts": { 6 | "test": "mocha" 7 | }, 8 | "author": "Microsoft Corporation", 9 | "license": "", 10 | "dependencies": { 11 | "@actions/core": "1.2.6", 12 | "@actions/exec": "1.0.4", 13 | "js-yaml": "3.13.1", 14 | "@types/mocha": "^2.2.44", 15 | "@types/node": "^8.0.53", 16 | "@types/q": "^1.0.6", 17 | "@types/sinon": "^4.1.2" 18 | }, 19 | "devDependencies": { 20 | "sinon": "^4.1.3", 21 | "typescript": "^3.7.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /policy/github.changelog.md: -------------------------------------------------------------------------------- 1 | # GitHub Policy Change Log 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). 5 | 6 | ## v1.1.0 - 06/18/2020 7 | GitHub Policy Release - requiredTools -------------------------------------------------------------------------------- /policy/github.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Security.CodeAnalysis.Policy.GitHub 5 | 1.1.0 6 | Microsoft Security Code Analysis Policy for GitHub. 7 | Microsoft 8 | https://aka.ms/mscadocs 9 | en-US 10 | MS-PL 11 | false 12 | 13 | © Microsoft Corporation. All rights reserved. 14 | 15 | ## v1.1.0 - 06/18/2020 16 | GitHub Policy Release - requiredTools 17 | 18 | 19 | -------------------------------------------------------------------------------- /sample/ClassLibrary1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30911.218 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{D93DCE72-417F-4F71-8BC5-03CDB1932B9D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D93DCE72-417F-4F71-8BC5-03CDB1932B9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D93DCE72-417F-4F71-8BC5-03CDB1932B9D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D93DCE72-417F-4F71-8BC5-03CDB1932B9D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D93DCE72-417F-4F71-8BC5-03CDB1932B9D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F67E648A-4693-4494-8C38-B2735AC8DADE} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /sample/ClassLibrary1/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | 5 | namespace ClassLibrary1 6 | { 7 | public class Class1 8 | { 9 | public void M() 10 | { 11 | Console.WriteLine("Hello World!"); 12 | 13 | Console.WriteLine("Console App"); 14 | MD5 md5 = MD5.Create(); 15 | 16 | string contents = "Super secure data."; 17 | byte[] contentBytes = UTF8Encoding.UTF8.GetBytes(contents); 18 | 19 | byte[] hash = md5.ComputeHash(contentBytes); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /sample/ClassLibrary1/ClassLibrary1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/build.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/msca-toolkit/msca-toolkit.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | Microsoft.Security.CodeAnalysis.Cli 6 | 0.* 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/msca-toolkit/msca-toolkit.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import * as process from 'process'; 3 | import * as core from '@actions/core'; 4 | import * as exec from '@actions/exec'; 5 | import * as fs from 'fs'; 6 | import * as yaml from 'js-yaml'; 7 | import { MscaInstaller } from './msca-installer' 8 | 9 | export class MscaAction { 10 | cliVersion: string = '0.*'; 11 | constructor() { } 12 | 13 | async setupEnvironment() { 14 | 15 | console.log('------------------------------------------------------------------------------'); 16 | 17 | if (!process.env.MSCA_FILEPATH) { 18 | let cliVersion = this.resolveCliVersion(); 19 | let mscaInstaller = new MscaInstaller(); 20 | await mscaInstaller.install(cliVersion); 21 | } 22 | 23 | console.log('------------------------------------------------------------------------------'); 24 | } 25 | 26 | resolveCliVersion() : string { 27 | let cliVersion = this.cliVersion; 28 | 29 | if (process.env.MSCA_VERSION) { 30 | cliVersion = process.env.MSCA_VERSION; 31 | } 32 | 33 | return cliVersion; 34 | } 35 | 36 | isNullOrWhiteSpace(value: string) : boolean { 37 | return !value || !value.trim(); 38 | } 39 | 40 | async init() { 41 | 42 | let cliFilePath: string = process.env.MSCA_FILEPATH; 43 | core.debug(`cliFilePath = ${cliFilePath}`); 44 | 45 | try { 46 | await exec.exec(cliFilePath, ['init', '--force']); 47 | } 48 | catch (error) { 49 | core.debug(error.Message); 50 | } 51 | } 52 | 53 | async run(inputArgs: string[]) { 54 | 55 | await this.setupEnvironment(); 56 | 57 | await this.init(); 58 | 59 | let cliFilePath: string = process.env.MSCA_FILEPATH; 60 | core.debug(`cliFilePath = ${cliFilePath}`); 61 | 62 | let args = ['run']; 63 | 64 | if (inputArgs != null) 65 | { 66 | for (let i = 0; i < inputArgs.length; i++) 67 | { 68 | args.push(inputArgs[i]); 69 | } 70 | } 71 | 72 | if (core.isDebug()) { 73 | args.push('--logger-level'); 74 | args.push('trace'); 75 | } 76 | 77 | let sarifFile : string = path.join(process.env.GITHUB_WORKSPACE, '.gdn', 'analysis_results.sarif'); 78 | core.debug(`sarifFile = ${sarifFile}`); 79 | 80 | // Write it as a GitHub Action variable for follow up tasks to consume 81 | core.exportVariable('ANALYSIS_RESULTS_SARIF_FILE', sarifFile); 82 | core.setOutput('sarifFile', sarifFile); 83 | 84 | args.push('--export-breaking-results-to-file'); 85 | args.push(`${sarifFile}`); 86 | 87 | core.debug('Running Microsoft Security Code Analysis...'); 88 | 89 | try { 90 | await exec.exec(cliFilePath, args); 91 | } 92 | catch (error) { 93 | core.setFailed(error.Message); 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "lib": [ 6 | "es6" 7 | ], 8 | "outDir": "./lib", 9 | "rootDir": "./src", 10 | "strict": false, 11 | "noImplicitAny": false, 12 | "esModuleInterop": true 13 | }, 14 | "include": [ 15 | "src/**/*" 16 | ], 17 | "exclude": [ 18 | "node_modules", 19 | "**/*.test.ts" 20 | ] 21 | } --------------------------------------------------------------------------------