| 
									
										
										
										
											2019-06-03 09:12:11 +00:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function requireBluebird() { | 
					
						
							| 
									
										
										
										
											2019-10-08 04:51:15 -06:00
										 |  |  | 	try { | 
					
						
							|  |  |  | 		return require('bluebird'); | 
					
						
							|  |  |  | 	} catch (e) { | 
					
						
							|  |  |  | 		console.error(''); | 
					
						
							|  |  |  | 		console.error( | 
					
						
							|  |  |  | 			"DON'T PANIC. You're running an old version of node with incomplete Promise support." | 
					
						
							|  |  |  | 		); | 
					
						
							|  |  |  | 		console.error('EASY FIX: `npm install --save bluebird`'); | 
					
						
							|  |  |  | 		console.error(''); | 
					
						
							|  |  |  | 		throw e; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-06-03 09:12:11 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ('undefined' === typeof Promise) { | 
					
						
							| 
									
										
										
										
											2019-10-08 04:51:15 -06:00
										 |  |  | 	global.Promise = requireBluebird(); | 
					
						
							| 
									
										
										
										
											2019-06-03 09:12:11 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ('function' !== typeof require('util').promisify) { | 
					
						
							| 
									
										
										
										
											2019-10-08 04:51:15 -06:00
										 |  |  | 	require('util').promisify = requireBluebird().promisify; | 
					
						
							| 
									
										
										
										
											2019-06-03 09:12:11 +00:00
										 |  |  | } |