mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
prep for npm packaging
This commit is contained in:
4
.babelrc
4
.babelrc
@ -14,7 +14,7 @@
|
||||
"./view",
|
||||
"./tests",
|
||||
"./logs",
|
||||
"./build",
|
||||
"./bin.js"
|
||||
"./dist",
|
||||
"./build"
|
||||
]
|
||||
}
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ prefixes.yml
|
||||
.idea/
|
||||
node_modules/
|
||||
bin/
|
||||
dist/
|
||||
build/
|
||||
logs/
|
||||
.DS_Store
|
||||
|
15
.npmignore
15
.npmignore
@ -4,6 +4,7 @@ prefixes.yml
|
||||
node_modules/
|
||||
bin/
|
||||
build/
|
||||
src/
|
||||
logs/
|
||||
.DS_Store
|
||||
bgpalerter.pid
|
||||
@ -11,5 +12,15 @@ alertdata/
|
||||
.npmrc
|
||||
.cache/
|
||||
volumetests/
|
||||
tests/rpki_tests/vrp.json
|
||||
tests/generate_tests/prefixes.yml
|
||||
tests/
|
||||
Dockerfile
|
||||
.travis.yml
|
||||
docs/
|
||||
prefixes.yml.example
|
||||
config.yml.example
|
||||
build.sh
|
||||
index.js
|
||||
.github/
|
||||
.hound.yml
|
||||
.eslintrc.json
|
||||
.babelrc
|
||||
|
15
build.sh
15
build.sh
@ -3,21 +3,16 @@
|
||||
rm -rf bin
|
||||
mkdir bin
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
|
||||
npm install --silent
|
||||
|
||||
npm run babel . -- --ignore node_modules --out-dir build
|
||||
npm run compile
|
||||
|
||||
cp package.json build/package.json
|
||||
./node_modules/.bin/pkg ./dist/package.json --targets node12-win-x64 --output bin/bgpalerter-win-x64 --loglevel=error
|
||||
|
||||
./node_modules/.bin/pkg ./build/package.json --targets node12-win-x64 --output bin/bgpalerter-win-x64 --loglevel=error
|
||||
./node_modules/.bin/pkg ./dist/package.json --targets node12-linux-x64 --output bin/bgpalerter-linux-x64 --loglevel=error
|
||||
|
||||
./node_modules/.bin/pkg ./build/package.json --targets node12-linux-x64 --output bin/bgpalerter-linux-x64 --loglevel=error
|
||||
|
||||
./node_modules/.bin/pkg ./build/package.json --targets node12-macos-x64 --output bin/bgpalerter-macos-x64 --loglevel=error
|
||||
./node_modules/.bin/pkg ./dist/package.json --targets node12-macos-x64 --output bin/bgpalerter-macos-x64 --loglevel=error
|
||||
|
||||
echo "--> BGPalerter compiled in bin/ (ignore the warnings about files that cannot be resolved)."
|
||||
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
|
10
package.json
10
package.json
@ -2,7 +2,12 @@
|
||||
"name": "bgpalerter",
|
||||
"version": "1.26.2",
|
||||
"description": "Software to monitor streams of BGP data. Pre-configured for real-time detection of visibility loss, RPKI invalid announcements, hijacks, and more.",
|
||||
"main": "index.js",
|
||||
"author": {
|
||||
"name": "Massimo Candela",
|
||||
"url": "https://massimocandela.com"
|
||||
},
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "src/worker.js",
|
||||
"bin": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -18,14 +23,13 @@
|
||||
"test-kafka": "./node_modules/.bin/mocha --exit tests/kafka_tests/*.js --require @babel/register",
|
||||
"test-rpki": "./node_modules/.bin/mocha --exit tests/rpki_tests/tests.default.js --require @babel/register && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external.js --require @babel/register && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external-missing-roas.js --require @babel/register && rm -f -R .cache/ && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external-roas.js --require @babel/register",
|
||||
"build": "./build.sh",
|
||||
"compile": "rm -rf dist/ && ./node_modules/.bin/babel index.js -d dist && ./node_modules/.bin/babel src -d dist/src && cp package.json dist/package.json",
|
||||
"watch-and-serve": "nodemon -e yml,js,json,txt --inspect --exec babel-node index.js",
|
||||
"serve": "babel-node index.js",
|
||||
"inspect": "node --inspect --require @babel/register index.js",
|
||||
"update": "git update-index --assume-unchanged config.yml && git update-index --assume-unchanged prefixes.yml && git pull",
|
||||
"generate-prefixes": "babel-node index.js generate"
|
||||
},
|
||||
"author": "Massimo Candela",
|
||||
"license": "BSD-3-Clause",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.12.8",
|
||||
"@babel/core": "^7.12.9",
|
||||
|
@ -35,7 +35,7 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
import PubSub from './utils/pubSub';
|
||||
import FileLogger from './utils/fileLogger';
|
||||
import {version} from '../package.json';
|
||||
import { version } from '../package.json';
|
||||
import Storage from './utils/storages/storageFile';
|
||||
import axios from 'axios';
|
||||
import url from 'url';
|
||||
|
Reference in New Issue
Block a user