Browse Source

handle err

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
20b6eb1f6b
  1. 36
      api/utils/logger.ts
  2. 161
      api/utils/tribes.ts
  3. 2
      dist/api/utils/logger.js.map
  4. 62
      dist/api/utils/tribes.js
  5. 2
      dist/api/utils/tribes.js.map

36
api/utils/logger.ts

@ -5,24 +5,24 @@ import * as moment from 'moment'
const tsFormat = (ts) => moment(ts).format('YYYY-MM-DD HH:mm:ss').trim();
const logger = expressWinston.logger({
transports: [
new winston.transports.Console()
],
format: winston.format.combine(
winston.format.timestamp(),
winston.format.colorize(),
winston.format.printf(info=>{
return `-> ${tsFormat(info.timestamp)}: ${info.message}`
})
),
meta: false, // optional: control whether you want to log the meta data about the request (default to true)
// msg: "HTTP {{req.method}} {{req.url}}", // optional: customize the default logging message. E.g. "{{res.statusCode}} {{req.method}} {{res.responseTime}}ms {{req.url}}"
expressFormat: true, // Use the default Express/morgan request formatting. Enabling this will override any msg if true. Will only output colors with colorize set to true
colorize: true, // Color the text and status code, using the Express/morgan color palette (text: gray, status: default green, 3XX cyan, 4XX yellow, 5XX red).
ignoreRoute: function (req, res) {
if(req.path.startsWith('/json')) return true // debugger
return false;
} // optional: allows to skip some log messages based on request and/or response
transports: [
new winston.transports.Console()
],
format: winston.format.combine(
winston.format.timestamp(),
winston.format.colorize(),
winston.format.printf(info=>{
return `-> ${tsFormat(info.timestamp)}: ${info.message}`
})
),
meta: false, // optional: control whether you want to log the meta data about the request (default to true)
// msg: "HTTP {{req.method}} {{req.url}}", // optional: customize the default logging message. E.g. "{{res.statusCode}} {{req.method}} {{res.responseTime}}ms {{req.url}}"
expressFormat: true, // Use the default Express/morgan request formatting. Enabling this will override any msg if true. Will only output colors with colorize set to true
colorize: true, // Color the text and status code, using the Express/morgan color palette (text: gray, status: default green, 3XX cyan, 4XX yellow, 5XX red).
ignoreRoute: function (req, res) {
if(req.path.startsWith('/json')) return true // debugger
return false;
} // optional: allows to skip some log messages based on request and/or response
})
export default logger

161
api/utils/tribes.ts

@ -7,111 +7,118 @@ import * as mqtt from 'mqtt'
import * as fetch from 'node-fetch'
const env = process.env.NODE_ENV || 'development'
const config = require(path.join(__dirname,'../../config/app.json'))[env]
const config = require(path.join(__dirname, '../../config/app.json'))[env]
let client:any
let client: any
export async function connect(onMessage) {
try{
const info = await LND.getInfo()
try {
const info = await LND.getInfo()
async function reconnect(){
client = null
const pwd = await genSignedTimestamp()
console.log('[tribes] try to connect:',`tls://${config.tribes_host}:8883`)
client = mqtt.connect(`tls://${config.tribes_host}:8883`,{
username:info.identity_pubkey,
password:pwd,
reconnectPeriod:0, // dont auto reconnect
})
client.on('connect', function () {
console.log("[tribes] connected!")
client.subscribe(`${info.identity_pubkey}/#`)
})
client.on('close', function (e) {
setTimeout(()=> reconnect(), 2000)
})
client.on('error', function (e) {
console.log('[tribes] error: ',e.message||e)
})
client.on('message', function(topic, message) {
if(onMessage) onMessage(topic, message)
})
}
reconnect()
} catch(e){
console.log("TRIBES ERROR",e)
async function reconnect() {
client = null
const pwd = await genSignedTimestamp()
console.log('[tribes] try to connect:', `tls://${config.tribes_host}:8883`)
client = mqtt.connect(`tls://${config.tribes_host}:8883`, {
username: info.identity_pubkey,
password: pwd,
reconnectPeriod: 0, // dont auto reconnect
})
client.on('connect', function () {
console.log("[tribes] connected!")
client.subscribe(`${info.identity_pubkey}/#`)
})
client.on('close', function (e) {
setTimeout(() => reconnect(), 2000)
})
client.on('error', function (e) {
console.log('[tribes] error: ', e.message || e)
})
client.on('message', function (topic, message) {
if (onMessage) onMessage(topic, message)
})
}
reconnect()
} catch (e) {
console.log("TRIBES ERROR", e)
}
}
export function subscribe(topic){
if(client) client.subscribe(topic)
export function subscribe(topic) {
if (client) client.subscribe(topic)
}
export function publish(topic,msg){
if(client) client.publish(topic,msg)
export function publish(topic, msg) {
if (client) client.publish(topic, msg)
}
export async function declare({uuid,name,description,tags,img,groupKey,host,pricePerMessage,priceToJoin,ownerAlias,ownerPubkey}) {
export async function declare({ uuid, name, description, tags, img, groupKey, host, pricePerMessage, priceToJoin, ownerAlias, ownerPubkey }) {
try {
const r = await fetch('https://' + host + '/tribes', {
method: 'POST' ,
body: JSON.stringify({
uuid, groupKey,
name, description, tags, img:img||'',
pricePerMessage:pricePerMessage||0,
priceToJoin:priceToJoin||0,
ownerAlias, ownerPubkey,
}),
headers: { 'Content-Type': 'application/json' }
method: 'POST',
body: JSON.stringify({
uuid, groupKey,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias, ownerPubkey,
}),
headers: { 'Content-Type': 'application/json' }
})
const j = await r.json()
console.log(j)
} catch (e) {
console.log('[tribes] unauthorized to declare')
}
}
export async function edit({uuid,name,description,tags,img,pricePerMessage,priceToJoin,ownerAlias}) {
export async function edit({ uuid, name, description, tags, img, pricePerMessage, priceToJoin, ownerAlias }) {
try {
const r = await fetch('https://' + getHost() + '/tribes', {
method: 'POST' ,
body: JSON.stringify({
uuid,
name, description, tags, img:img||'',
pricePerMessage:pricePerMessage||0,
priceToJoin:priceToJoin||0,
ownerAlias,
}),
headers: { 'Content-Type': 'application/json' }
method: 'POST',
body: JSON.stringify({
uuid,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias,
}),
headers: { 'Content-Type': 'application/json' }
})
const j = await r.json()
console.log(j)
} catch(e) {
console.log('[tribes] unauthorized to edit')
}
}
export async function genSignedTimestamp(){
const now = moment().unix()
const tsBytes = Buffer.from(now.toString(16), 'hex')
const sig = await LND.signBuffer(tsBytes)
const sigBytes = zbase32.decode(sig)
const totalLength = tsBytes.length + sigBytes.length
const buf = Buffer.concat([tsBytes, sigBytes], totalLength)
return urlBase64(buf)
export async function genSignedTimestamp() {
const now = moment().unix()
const tsBytes = Buffer.from(now.toString(16), 'hex')
const sig = await LND.signBuffer(tsBytes)
const sigBytes = zbase32.decode(sig)
const totalLength = tsBytes.length + sigBytes.length
const buf = Buffer.concat([tsBytes, sigBytes], totalLength)
return urlBase64(buf)
}
export async function verifySignedTimestamp(stsBase64){
const stsBuf = Buffer.from(stsBase64, 'base64')
const sig = stsBuf.subarray(4,92)
const sigZbase32 = zbase32.encode(sig)
const r = await LND.verifyBytes(stsBuf.subarray(0,4), sigZbase32) // sig needs to be zbase32 :(
if (r.valid) {
return r.pubkey
} else {
return false
}
export async function verifySignedTimestamp(stsBase64) {
const stsBuf = Buffer.from(stsBase64, 'base64')
const sig = stsBuf.subarray(4, 92)
const sigZbase32 = zbase32.encode(sig)
const r = await LND.verifyBytes(stsBuf.subarray(0, 4), sigZbase32) // sig needs to be zbase32 :(
if (r.valid) {
return r.pubkey
} else {
return false
}
}
export function getHost() {
return config.tribes_host || ''
return config.tribes_host || ''
}
function urlBase64(buf){
return buf.toString('base64').replace(/\//g, '_').replace(/\+/g, '-')
function urlBase64(buf) {
return buf.toString('base64').replace(/\//g, '_').replace(/\+/g, '-')
}

2
dist/api/utils/logger.js.map

@ -1 +1 @@
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../api/utils/logger.ts"],"names":[],"mappings":";;AAAA,kDAAiD;AACjD,mCAAkC;AAClC,iCAAgC;AAEhC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;AAEzE,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;IACjC,UAAU,EAAE;QACV,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE;KACjC;IACD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,EAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,EACzB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAA,EAAE;QAC1B,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,SA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,UAAU,CAAC,OAAO,CAAC;YAAE,OAAO,IAAI,CAAA,CAAC,WAAW;QACxD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,8EAA8E;CACjF,CAAC,CAAA;AAEF,kBAAe,MAAM,CAAA"}

62
dist/api/utils/tribes.js

@ -68,37 +68,47 @@ function publish(topic, msg) {
exports.publish = publish;
function declare({ uuid, name, description, tags, img, groupKey, host, pricePerMessage, priceToJoin, ownerAlias, ownerPubkey }) {
return __awaiter(this, void 0, void 0, function* () {
const r = yield fetch('https://' + host + '/tribes', {
method: 'POST',
body: JSON.stringify({
uuid, groupKey,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias, ownerPubkey,
}),
headers: { 'Content-Type': 'application/json' }
});
const j = yield r.json();
console.log(j);
try {
const r = yield fetch('https://' + host + '/tribes', {
method: 'POST',
body: JSON.stringify({
uuid, groupKey,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias, ownerPubkey,
}),
headers: { 'Content-Type': 'application/json' }
});
const j = yield r.json();
console.log(j);
}
catch (e) {
console.log('[tribes] unauthorized to declare');
}
});
}
exports.declare = declare;
function edit({ uuid, name, description, tags, img, pricePerMessage, priceToJoin, ownerAlias }) {
return __awaiter(this, void 0, void 0, function* () {
const r = yield fetch('https://' + getHost() + '/tribes', {
method: 'POST',
body: JSON.stringify({
uuid,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias,
}),
headers: { 'Content-Type': 'application/json' }
});
const j = yield r.json();
console.log(j);
try {
const r = yield fetch('https://' + getHost() + '/tribes', {
method: 'POST',
body: JSON.stringify({
uuid,
name, description, tags, img: img || '',
pricePerMessage: pricePerMessage || 0,
priceToJoin: priceToJoin || 0,
ownerAlias,
}),
headers: { 'Content-Type': 'application/json' }
});
const j = yield r.json();
console.log(j);
}
catch (e) {
console.log('[tribes] unauthorized to edit');
}
});
}
exports.edit = edit;

2
dist/api/utils/tribes.js.map

@ -1 +1 @@
{"version":3,"file":"tribes.js","sourceRoot":"","sources":["../../../api/utils/tribes.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,iCAAgC;AAChC,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,6BAA4B;AAC5B,oCAAmC;AAEnC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAA;AACjD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAEzE,IAAI,MAAU,CAAA;AAEd,SAAsB,OAAO,CAAC,SAAS;;QACnC,IAAG;YACC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;YAEhC,SAAe,SAAS;;oBACpB,MAAM,GAAG,IAAI,CAAA;oBACb,MAAM,GAAG,GAAG,MAAM,kBAAkB,EAAE,CAAA;oBACtC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAC,SAAS,MAAM,CAAC,WAAW,OAAO,CAAC,CAAA;oBAC1E,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,MAAM,CAAC,WAAW,OAAO,EAAC;wBACrD,QAAQ,EAAC,IAAI,CAAC,eAAe;wBAC7B,QAAQ,EAAC,GAAG;wBACZ,eAAe,EAAC,CAAC;qBACpB,CAAC,CAAA;oBACF,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE;wBACjB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;wBAClC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,eAAe,IAAI,CAAC,CAAA;oBACjD,CAAC,CAAC,CAAA;oBACF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;wBAC1B,UAAU,CAAC,GAAE,EAAE,CAAC,SAAS,EAAE,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