This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prettify the hover output of a type | |
*/ | |
export type Prettify<T> = { | |
[K in keyof T]: T[K] | |
} & {} | |
/** | |
* Make certain fields from T as partial | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
const glob = require('glob'); | |
admin.initializeApp(functions.config().firebase); | |
/** | |
* Cloud triggers | |
*/ | |
const files = glob.sync('./triggers/**/*.f.js', {cwd: __dirname}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Writes logs to the file every 5 sec | |
* or a maximum of 10 count is reached (which ever is first) | |
*/ | |
public class FileLoggingTree extends Timber.DebugTree { | |
private static final SimpleDateFormat LOG_DATE_FORMAT = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss.SSS aa"); | |
private static final SimpleDateFormat FILE_DATE_FORMAT = new SimpleDateFormat("dd-MM-yyyy"); | |
private Relay<String> logBuffer = ReplayRelay.<String>create().toSerialized(); |