mirror of
				https://github.com/nttgin/BGPalerter.git
				synced 2024-05-19 06:50:08 +00:00 
			
		
		
		
	import version directly from package.json
This commit is contained in:
		
							
								
								
									
										3
									
								
								env.js
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								env.js
									
									
									
									
									
								
							@@ -38,10 +38,11 @@ import winston from 'winston';
 | 
				
			|||||||
import Input from "./inputs/inputYml";
 | 
					import Input from "./inputs/inputYml";
 | 
				
			||||||
require('winston-daily-rotate-file');
 | 
					require('winston-daily-rotate-file');
 | 
				
			||||||
const { combine, timestamp, label, printf } = winston.format;
 | 
					const { combine, timestamp, label, printf } = winston.format;
 | 
				
			||||||
 | 
					import {version} from './package.json';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const defaultConfigFilePath = path.resolve(process.cwd(), 'config.yml');
 | 
					const defaultConfigFilePath = path.resolve(process.cwd(), 'config.yml');
 | 
				
			||||||
const vector = {
 | 
					const vector = {
 | 
				
			||||||
    version: process.env.npm_package_version,
 | 
					    version: version,
 | 
				
			||||||
    configFile: global.EXTERNAL_CONFIG_FILE || defaultConfigFilePath
 | 
					    configFile: global.EXTERNAL_CONFIG_FILE || defaultConfigFilePath
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
let config = {
 | 
					let config = {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user