Add auth support (#21)

* Updates

* Update

* Update

* Update

* Update

* Yarn sometimes prefers npmrc, so use same token

* Description

* Update readme

* Feedback

* Add type

* new toolkit and scoped registries

* npmrc in RUNNER_TEMP

* Dont always auth

* Try exporting blank token

* Get auth working for now pending runner changes

* Fix string interpolation for auth token.

* Don't export both userconfigs

* Update authutil.js

* Add single quotes for authString

* Fix the registry string.

* Use userconfig and append trailing slash

* Keep in root of repo

* Try just adding auth token

* Remove auth token

* Try changes again

* Add tests

* Npm and GPR samples

* Add types
This commit is contained in:
Danny McCormick 2019-08-06 18:26:04 -04:00 committed by GitHub
parent 0675b87d74
commit 78148dae50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
391 changed files with 79848 additions and 43 deletions

21
node_modules/nice-try/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [1.0.5] - 2018-08-25
### Changed
- Removed `prepublish` script from `package.json`
## [1.0.4] - 2017-08-08
### New
- Added a changelog
### Changed
- Ignore `yarn.lock` and `package-lock.json` files

21
node_modules/nice-try/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Tobias Reich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

32
node_modules/nice-try/README.md generated vendored Normal file
View file

@ -0,0 +1,32 @@
# nice-try
[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/)
A function that tries to execute a function and discards any error that occurs.
## Install
```
npm install nice-try
```
## Usage
```js
const niceTry = require('nice-try')
niceTry(() => JSON.parse('true')) // true
niceTry(() => JSON.parse('truee')) // undefined
niceTry() // undefined
niceTry(true) // undefined
```
## API
### Parameters
- `fn` `{Function}` Function that might or might not throw an error.
### Returns
- `{?*}` Return-value of the function when no error occurred.

65
node_modules/nice-try/package.json generated vendored Normal file
View file

@ -0,0 +1,65 @@
{
"_args": [
[
"nice-try@1.0.5",
"C:\\Users\\Administrator\\Documents\\setup-node"
]
],
"_development": true,
"_from": "nice-try@1.0.5",
"_id": "nice-try@1.0.5",
"_inBundle": false,
"_integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"_location": "/nice-try",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "nice-try@1.0.5",
"name": "nice-try",
"escapedName": "nice-try",
"rawSpec": "1.0.5",
"saveSpec": null,
"fetchSpec": "1.0.5"
},
"_requiredBy": [
"/cross-spawn"
],
"_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"_spec": "1.0.5",
"_where": "C:\\Users\\Administrator\\Documents\\setup-node",
"authors": [
"Tobias Reich <tobias@electerious.com>"
],
"bugs": {
"url": "https://github.com/electerious/nice-try/issues"
},
"description": "Tries to execute a function and discards any error that occurs",
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"mocha": "^5.1.1",
"nyc": "^12.0.1"
},
"files": [
"src"
],
"homepage": "https://github.com/electerious/nice-try",
"keywords": [
"try",
"catch",
"error"
],
"license": "MIT",
"main": "src/index.js",
"name": "nice-try",
"repository": {
"type": "git",
"url": "git+https://github.com/electerious/nice-try.git"
},
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "nyc node_modules/mocha/bin/_mocha"
},
"version": "1.0.5"
}

12
node_modules/nice-try/src/index.js generated vendored Normal file
View file

@ -0,0 +1,12 @@
'use strict'
/**
* Tries to execute a function and discards any error that occurs.
* @param {Function} fn - Function that might or might not throw an error.
* @returns {?*} Return-value of the function when no error occurred.
*/
module.exports = function(fn) {
try { return fn() } catch (e) {}
}