GPR authentication support

This commit is contained in:
Alex Mullans
2019-09-09 10:27:23 -07:00
committed by Alex Mullans
parent 6c0e2a2a6b
commit 6bd4969ec6
518 changed files with 95599 additions and 2875 deletions

38
node_modules/universal-user-agent/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,38 @@
language: node_js
cache:
directories:
- ~/.npm
- node_modules/cypress/dist
# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
- /^greenkeeper.*$/
stages:
- test
- name: release
if: branch = master AND type IN (push)
jobs:
include:
- stage: test
node_js: 6
script: npm run test
- node_js: 8
script: npm run test
- node_js: 10
env: Node 10 & coverage upload
script:
- npm run test
- npm run coverage:upload
- node_js: lts/*
env: browser tests
script: npm run test:browser
- stage: release
node_js: lts/*
env: semantic-release
script: npm run semantic-release

7
node_modules/universal-user-agent/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,7 @@
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

25
node_modules/universal-user-agent/README.md generated vendored Normal file
View File

@ -0,0 +1,25 @@
# universal-user-agent
> Get a user agent string in both browser and node
[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent)
[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent)
[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/)
```js
const getUserAgent = require('universal-user-agent')
const userAgent = getUserAgent()
// userAgent will look like this
// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0"
// in node: Node.js/v8.9.4 (macOS High Sierra; x64)
```
## Credits
The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent).
## License
[ISC](LICENSE.md)

6
node_modules/universal-user-agent/browser.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
module.exports = getUserAgentBrowser
function getUserAgentBrowser () {
/* global navigator */
return navigator.userAgent
}

4
node_modules/universal-user-agent/cypress.json generated vendored Normal file
View File

@ -0,0 +1,4 @@
{
"integrationFolder": "test",
"video": false
}

1
node_modules/universal-user-agent/index.d.ts generated vendored Normal file
View File

@ -0,0 +1 @@
export default function getUserAgentNode(): string;

15
node_modules/universal-user-agent/index.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
module.exports = getUserAgentNode
const osName = require('os-name')
function getUserAgentNode () {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return 'Windows <version undetectable>'
}
throw error
}
}

85
node_modules/universal-user-agent/package.json generated vendored Normal file
View File

@ -0,0 +1,85 @@
{
"_args": [
[
"universal-user-agent@2.1.0",
"C:\\dev\\repos\\actions\\setup-dotnet"
]
],
"_from": "universal-user-agent@2.1.0",
"_id": "universal-user-agent@2.1.0",
"_inBundle": false,
"_integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==",
"_location": "/universal-user-agent",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "universal-user-agent@2.1.0",
"name": "universal-user-agent",
"escapedName": "universal-user-agent",
"rawSpec": "2.1.0",
"saveSpec": null,
"fetchSpec": "2.1.0"
},
"_requiredBy": [
"/@octokit/graphql"
],
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz",
"_spec": "2.1.0",
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
"author": {
"name": "Gregor Martynus",
"url": "https://github.com/gr2m"
},
"browser": "browser.js",
"bugs": {
"url": "https://github.com/gr2m/universal-user-agent/issues"
},
"dependencies": {
"os-name": "^3.0.0"
},
"description": "Get a user agent string in both browser and node",
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "^3.0.2",
"cypress": "^3.1.0",
"mocha": "^6.0.0",
"nyc": "^14.0.0",
"proxyquire": "^2.1.0",
"semantic-release": "^15.9.15",
"sinon": "^7.2.4",
"sinon-chai": "^3.2.0",
"standard": "^12.0.1",
"test": "^0.6.0",
"travis-deploy-once": "^5.0.7"
},
"homepage": "https://github.com/gr2m/universal-user-agent#readme",
"keywords": [],
"license": "ISC",
"main": "index.js",
"name": "universal-user-agent",
"repository": {
"type": "git",
"url": "git+https://github.com/gr2m/universal-user-agent.git"
},
"scripts": {
"coverage": "nyc report --reporter=html && open coverage/index.html",
"coverage:upload": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
"semantic-release": "semantic-release",
"test": "nyc mocha \"test/*-test.js\"",
"test:browser": "cypress run --browser chrome",
"travis-deploy-once": "travis-deploy-once"
},
"standard": {
"globals": [
"describe",
"it",
"beforeEach",
"afterEach",
"expect"
]
},
"types": "index.d.ts",
"version": "2.1.0"
}

57
node_modules/universal-user-agent/test/smoke-test.js generated vendored Normal file
View File

@ -0,0 +1,57 @@
// make tests run in both Node & Express
if (!global.cy) {
const chai = require('chai')
const sinon = require('sinon')
const sinonChai = require('sinon-chai')
chai.use(sinonChai)
global.expect = chai.expect
let sandbox
beforeEach(() => {
sandbox = sinon.createSandbox()
global.cy = {
stub: function () {
return sandbox.stub.apply(sandbox, arguments)
},
log () {
console.log.apply(console, arguments)
}
}
})
afterEach(() => {
sandbox.restore()
})
}
const getUserAgent = require('..')
describe('smoke', () => {
it('works', () => {
expect(getUserAgent()).to.be.a('string')
expect(getUserAgent().length).to.be.above(10)
})
if (!process.browser) { // test on node only
const proxyquire = require('proxyquire').noCallThru()
it('works around wmic error on Windows (#5)', () => {
const getUserAgent = proxyquire('..', {
'os-name': () => {
throw new Error('Command failed: wmic os get Caption')
}
})
expect(getUserAgent()).to.equal('Windows <version undetectable>')
})
it('does not swallow unexpected errors', () => {
const getUserAgent = proxyquire('..', {
'os-name': () => {
throw new Error('oops')
}
})
expect(getUserAgent).to.throw('oops')
})
}
})