You've already forked setup-node
							
							
				mirror of
				https://github.com/actions/setup-node.git
				synced 2025-10-31 07:06:24 +07:00 
			
		
		
		
	Add auth
This commit is contained in:
		
							
								
								
									
										21
									
								
								node_modules/end-of-stream/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/end-of-stream/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
| The MIT License (MIT) | ||||
|  | ||||
| Copyright (c) 2014 Mathias Buus | ||||
|  | ||||
| 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. | ||||
							
								
								
									
										52
									
								
								node_modules/end-of-stream/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								node_modules/end-of-stream/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,52 @@ | ||||
| # end-of-stream | ||||
|  | ||||
| A node module that calls a callback when a readable/writable/duplex stream has completed or failed. | ||||
|  | ||||
| 	npm install end-of-stream | ||||
|  | ||||
| ## Usage | ||||
|  | ||||
| Simply pass a stream and a callback to the `eos`. | ||||
| Both legacy streams, streams2 and stream3 are supported. | ||||
|  | ||||
| ``` js | ||||
| var eos = require('end-of-stream'); | ||||
|  | ||||
| eos(readableStream, function(err) { | ||||
|   // this will be set to the stream instance | ||||
| 	if (err) return console.log('stream had an error or closed early'); | ||||
| 	console.log('stream has ended', this === readableStream); | ||||
| }); | ||||
|  | ||||
| eos(writableStream, function(err) { | ||||
| 	if (err) return console.log('stream had an error or closed early'); | ||||
| 	console.log('stream has finished', this === writableStream); | ||||
| }); | ||||
|  | ||||
| eos(duplexStream, function(err) { | ||||
| 	if (err) return console.log('stream had an error or closed early'); | ||||
| 	console.log('stream has ended and finished', this === duplexStream); | ||||
| }); | ||||
|  | ||||
| eos(duplexStream, {readable:false}, function(err) { | ||||
| 	if (err) return console.log('stream had an error or closed early'); | ||||
| 	console.log('stream has finished but might still be readable'); | ||||
| }); | ||||
|  | ||||
| eos(duplexStream, {writable:false}, function(err) { | ||||
| 	if (err) return console.log('stream had an error or closed early'); | ||||
| 	console.log('stream has ended but might still be writable'); | ||||
| }); | ||||
|  | ||||
| eos(readableStream, {error:false}, function(err) { | ||||
| 	// do not treat emit('error', err) as a end-of-stream | ||||
| }); | ||||
| ``` | ||||
|  | ||||
| ## License | ||||
|  | ||||
| MIT | ||||
|  | ||||
| ## Related | ||||
|  | ||||
| `end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. | ||||
							
								
								
									
										87
									
								
								node_modules/end-of-stream/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								node_modules/end-of-stream/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,87 @@ | ||||
| var once = require('once'); | ||||
|  | ||||
| var noop = function() {}; | ||||
|  | ||||
| var isRequest = function(stream) { | ||||
| 	return stream.setHeader && typeof stream.abort === 'function'; | ||||
| }; | ||||
|  | ||||
| var isChildProcess = function(stream) { | ||||
| 	return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 | ||||
| }; | ||||
|  | ||||
| var eos = function(stream, opts, callback) { | ||||
| 	if (typeof opts === 'function') return eos(stream, null, opts); | ||||
| 	if (!opts) opts = {}; | ||||
|  | ||||
| 	callback = once(callback || noop); | ||||
|  | ||||
| 	var ws = stream._writableState; | ||||
| 	var rs = stream._readableState; | ||||
| 	var readable = opts.readable || (opts.readable !== false && stream.readable); | ||||
| 	var writable = opts.writable || (opts.writable !== false && stream.writable); | ||||
|  | ||||
| 	var onlegacyfinish = function() { | ||||
| 		if (!stream.writable) onfinish(); | ||||
| 	}; | ||||
|  | ||||
| 	var onfinish = function() { | ||||
| 		writable = false; | ||||
| 		if (!readable) callback.call(stream); | ||||
| 	}; | ||||
|  | ||||
| 	var onend = function() { | ||||
| 		readable = false; | ||||
| 		if (!writable) callback.call(stream); | ||||
| 	}; | ||||
|  | ||||
| 	var onexit = function(exitCode) { | ||||
| 		callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); | ||||
| 	}; | ||||
|  | ||||
| 	var onerror = function(err) { | ||||
| 		callback.call(stream, err); | ||||
| 	}; | ||||
|  | ||||
| 	var onclose = function() { | ||||
| 		if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); | ||||
| 		if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); | ||||
| 	}; | ||||
|  | ||||
| 	var onrequest = function() { | ||||
| 		stream.req.on('finish', onfinish); | ||||
| 	}; | ||||
|  | ||||
| 	if (isRequest(stream)) { | ||||
| 		stream.on('complete', onfinish); | ||||
| 		stream.on('abort', onclose); | ||||
| 		if (stream.req) onrequest(); | ||||
| 		else stream.on('request', onrequest); | ||||
| 	} else if (writable && !ws) { // legacy streams | ||||
| 		stream.on('end', onlegacyfinish); | ||||
| 		stream.on('close', onlegacyfinish); | ||||
| 	} | ||||
|  | ||||
| 	if (isChildProcess(stream)) stream.on('exit', onexit); | ||||
|  | ||||
| 	stream.on('end', onend); | ||||
| 	stream.on('finish', onfinish); | ||||
| 	if (opts.error !== false) stream.on('error', onerror); | ||||
| 	stream.on('close', onclose); | ||||
|  | ||||
| 	return function() { | ||||
| 		stream.removeListener('complete', onfinish); | ||||
| 		stream.removeListener('abort', onclose); | ||||
| 		stream.removeListener('request', onrequest); | ||||
| 		if (stream.req) stream.req.removeListener('finish', onfinish); | ||||
| 		stream.removeListener('end', onlegacyfinish); | ||||
| 		stream.removeListener('close', onlegacyfinish); | ||||
| 		stream.removeListener('finish', onfinish); | ||||
| 		stream.removeListener('exit', onexit); | ||||
| 		stream.removeListener('end', onend); | ||||
| 		stream.removeListener('error', onerror); | ||||
| 		stream.removeListener('close', onclose); | ||||
| 	}; | ||||
| }; | ||||
|  | ||||
| module.exports = eos; | ||||
							
								
								
									
										66
									
								
								node_modules/end-of-stream/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								node_modules/end-of-stream/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,66 @@ | ||||
| { | ||||
|   "_args": [ | ||||
|     [ | ||||
|       "end-of-stream@1.4.1", | ||||
|       "C:\\Users\\Administrator\\Documents\\setup-node" | ||||
|     ] | ||||
|   ], | ||||
|   "_development": true, | ||||
|   "_from": "end-of-stream@1.4.1", | ||||
|   "_id": "end-of-stream@1.4.1", | ||||
|   "_inBundle": false, | ||||
|   "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", | ||||
|   "_location": "/end-of-stream", | ||||
|   "_phantomChildren": {}, | ||||
|   "_requested": { | ||||
|     "type": "version", | ||||
|     "registry": true, | ||||
|     "raw": "end-of-stream@1.4.1", | ||||
|     "name": "end-of-stream", | ||||
|     "escapedName": "end-of-stream", | ||||
|     "rawSpec": "1.4.1", | ||||
|     "saveSpec": null, | ||||
|     "fetchSpec": "1.4.1" | ||||
|   }, | ||||
|   "_requiredBy": [ | ||||
|     "/pump" | ||||
|   ], | ||||
|   "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", | ||||
|   "_spec": "1.4.1", | ||||
|   "_where": "C:\\Users\\Administrator\\Documents\\setup-node", | ||||
|   "author": { | ||||
|     "name": "Mathias Buus", | ||||
|     "email": "mathiasbuus@gmail.com" | ||||
|   }, | ||||
|   "bugs": { | ||||
|     "url": "https://github.com/mafintosh/end-of-stream/issues" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "once": "^1.4.0" | ||||
|   }, | ||||
|   "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", | ||||
|   "files": [ | ||||
|     "index.js" | ||||
|   ], | ||||
|   "homepage": "https://github.com/mafintosh/end-of-stream", | ||||
|   "keywords": [ | ||||
|     "stream", | ||||
|     "streams", | ||||
|     "callback", | ||||
|     "finish", | ||||
|     "close", | ||||
|     "end", | ||||
|     "wait" | ||||
|   ], | ||||
|   "license": "MIT", | ||||
|   "main": "index.js", | ||||
|   "name": "end-of-stream", | ||||
|   "repository": { | ||||
|     "type": "git", | ||||
|     "url": "git://github.com/mafintosh/end-of-stream.git" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "test": "node test.js" | ||||
|   }, | ||||
|   "version": "1.4.1" | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Danny McCormick
					Danny McCormick