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

15
node_modules/wrappy/LICENSE generated vendored Normal file
View file

@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
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.

36
node_modules/wrappy/README.md generated vendored Normal file
View file

@ -0,0 +1,36 @@
# wrappy
Callback wrapping utility
## USAGE
```javascript
var wrappy = require("wrappy")
// var wrapper = wrappy(wrapperFunction)
// make sure a cb is called only once
// See also: http://npm.im/once for this specific use case
var once = wrappy(function (cb) {
var called = false
return function () {
if (called) return
called = true
return cb.apply(this, arguments)
}
})
function printBoo () {
console.log('boo')
}
// has some rando property
printBoo.iAmBooPrinter = true
var onlyPrintOnce = once(printBoo)
onlyPrintOnce() // prints 'boo'
onlyPrintOnce() // does nothing
// random property is retained!
assert.equal(onlyPrintOnce.iAmBooPrinter, true)
```

63
node_modules/wrappy/package.json generated vendored Normal file
View file

@ -0,0 +1,63 @@
{
"_args": [
[
"wrappy@1.0.2",
"C:\\Users\\Administrator\\Documents\\setup-node"
]
],
"_development": true,
"_from": "wrappy@1.0.2",
"_id": "wrappy@1.0.2",
"_inBundle": false,
"_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"_location": "/wrappy",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "wrappy@1.0.2",
"name": "wrappy",
"escapedName": "wrappy",
"rawSpec": "1.0.2",
"saveSpec": null,
"fetchSpec": "1.0.2"
},
"_requiredBy": [
"/inflight",
"/once"
],
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"_spec": "1.0.2",
"_where": "C:\\Users\\Administrator\\Documents\\setup-node",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/wrappy/issues"
},
"dependencies": {},
"description": "Callback wrapping utility",
"devDependencies": {
"tap": "^2.3.1"
},
"directories": {
"test": "test"
},
"files": [
"wrappy.js"
],
"homepage": "https://github.com/npm/wrappy",
"license": "ISC",
"main": "wrappy.js",
"name": "wrappy",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/wrappy.git"
},
"scripts": {
"test": "tap --coverage test/*.js"
},
"version": "1.0.2"
}

33
node_modules/wrappy/wrappy.js generated vendored Normal file
View file

@ -0,0 +1,33 @@
// Returns a wrapper function that returns a wrapped callback
// The wrapper function should do some stuff, and return a
// presumably different callback function.
// This makes sure that own properties are retained, so that
// decorations and such are not lost along the way.
module.exports = wrappy
function wrappy (fn, cb) {
if (fn && cb) return wrappy(fn)(cb)
if (typeof fn !== 'function')
throw new TypeError('need wrapper function')
Object.keys(fn).forEach(function (k) {
wrapper[k] = fn[k]
})
return wrapper
function wrapper() {
var args = new Array(arguments.length)
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i]
}
var ret = fn.apply(this, args)
var cb = args[args.length-1]
if (typeof ret === 'function' && ret !== cb) {
Object.keys(cb).forEach(function (k) {
ret[k] = cb[k]
})
}
return ret
}
}