added isProd package

pull/33/head
tycrek 3 years ago
parent 954c7de196
commit 3bb492f204
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -37,6 +37,7 @@
"dependencies": {
"@tycrek/ass-storage-engine": "0.2.7",
"@tycrek/express-nofavicon": "^1.0.2",
"@tycrek/isprod": "^2.0.2",
"@tycrek/log": ">=0.5.x",
"any-shell-escape": "^0.1.1",
"aws-sdk": "^2.930.0",

@ -2,7 +2,7 @@ const ffmpeg = require('ffmpeg-static');
const Jimp = require('jimp');
const shell = require('any-shell-escape');
const { exec } = require('child_process');
const { path } = require('./utils');
const { isProd, path } = require('./utils');
const { diskFilePath } = require('./config.json');
// Thumbnail parameters
@ -21,7 +21,7 @@ const THUMBNAIL = {
function getCommand(src, dest) {
return shell([
ffmpeg, '-y',
'-v', (process.env.NODE_ENV === 'production' ? 'error' : 'debug'), // Log level
'-v', (isProd ? 'error' : 'debug'), // Log level
'-i', src, // Input file
'-ss', '00:00:01.000', // Timestamp of frame to grab
'-frames:v', '1', // Number of frames to grab

@ -104,6 +104,7 @@ GENERATORS.set(idModes.r, randomGen);
GENERATORS.set(idModes.gfy, gfyGen);
module.exports = {
isProd: require('@tycrek/isprod')(),
path,
getTrueHttp,
getTrueDomain,

Loading…
Cancel
Save