Merge remote-tracking branch 'origin/master'

This commit is contained in:
mmcwilliams 2020-07-30 10:54:44 -04:00
commit c61c128044
12 changed files with 52 additions and 39 deletions

View File

@ -14,17 +14,18 @@ let transport;
**/
async function logFile() {
const homeDir = os_1.homedir();
const linuxDir = `/.config/mcopy/`;
const linuxDir = `/.mcopy/`;
const macDir = `/Library/Logs/mcopy/`;
const winDir = `/AppData/Roaming/mcopy/`;
let logPath = path_1.join(homeDir, linuxDir);
let logPath = path_1.normalize(path_1.join(homeDir, linuxDir));
let dirExists;
if (process.platform === 'darwin') {
logPath = path_1.join(homeDir, macDir);
logPath = path_1.normalize(path_1.join(homeDir, macDir));
}
else if (process.platform === 'win32') {
logPath = path_1.join(homeDir, winDir);
logPath = path_1.normalize(path_1.join(homeDir, winDir));
}
console.log(logPath);
dirExists = await fs_extra_1.exists(logPath);
if (!dirExists) {
try {

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/log/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,qCAA2D;AAC3D,+BAA4B;AAC5B,uCAAyC;AACzC,2BAA6B;AAE7B,MAAM,OAAO,GAAG,mBAAmB,CAAA;AACnC,IAAI,SAAe,CAAA;AAEnB;;;;;IAKI;AACJ,KAAK,UAAU,OAAO;IACrB,MAAM,OAAO,GAAY,YAAO,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAY,iBAAiB,CAAC;IAC5C,MAAM,MAAM,GAAY,sBAAsB,CAAC;IAC/C,MAAM,MAAM,GAAY,yBAAyB,CAAC;IAClD,IAAI,OAAO,GAAY,WAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,SAAmB,CAAC;IAExB,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAClC,OAAO,GAAG,WAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAChC;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QACxC,O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,CAAC;gBAChB,MAAM,EAAE,qBAAqB;aAC7B,CAAC,EACF,gBAAM,CAAC,MAAM,CAAC,CAAC,IAAU,EAAG,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE,GAAC,CAAC,IAAI,CAAC,KAAK,KAAG,SAAS,CAAA,CAAC,CAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA,CAAC,CAAA,GAAG,CAAC,CAAC,CAC7I;YACH,UAAU,EAAE;gBACX,IAAI,CAAC,oBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC;gBACvC,IAAI,CAAC,oBAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC;aACjC;SACD,CAAC,CAAA;KACF;IACD,OAAO,SAAS,CAAA;AACjB,CAAC,CAAA"}

View File

@ -126,9 +126,9 @@ class Sequencer {
* @param {object} arg Arguments from ipc message
**/
async start(arg) {
const psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
let startTime = +new Date();
let ms;
this.psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
if (arg && arg.arr) {
this.arr = arg.arr; //overwrite sequence
}
@ -182,7 +182,7 @@ class Sequencer {
if (this.cmd.proj.filmout.state.enabled === true) {
await this.cmd.proj.filmout.display.close();
}
electron_1.powerSaveBlocker.stop(this.psbId);
electron_1.powerSaveBlocker.stop(psbId);
this.psbId = null;
ms = (+new Date()) - startTime;
//end sequence

File diff suppressed because one or more lines are too long

View File

@ -35,23 +35,33 @@ gui.counterUpdate = function (which, raw) {
const formattedVal = gui.fmtZero(raw, 6);
$(`.${which} .count`).val(formattedVal);
};
gui.notifierWorking = true;
gui.notify = function (title, message) {
'use strict';
if (!gui.notifierWorking) {
return true;
}
return new Promise((resolve, reject) => {
notifier.notify({
title: title,
message: message,
//icon: path.join(__dirname, 'coulson.jpg'), // Absolute path (doesn't work on balloons)
sound: true, // Only Notification Center or Windows Toasters
wait: true // Wait with callback, until user action is taken against notification
}, function (err, response) {
// Response is response from notification
if (err) {
log.error(`Error with notification`, err);
return reject(err);
}
return resolve(true);
});
try {
notifier.notify({
title: title,
message: message,
//icon: path.join(__dirname, 'coulson.jpg'), // Absolute path (doesn't work on balloons)
sound: true, // Only Notification Center or Windows Toasters
wait: true // Wait with callback, until user action is taken against notification
}, function (err, response) {
// Response is response from notification
if (err) {
log.error(`Error with notification`, err);
return reject(err);
}
return resolve(true);
});
} catch (err) {
//notify-send is not found
//determine an alternate for raspian
//this feels like a hack
}
});
};
gui.updateCam = async function (t) {

2
app/package-lock.json generated
View File

@ -4252,7 +4252,7 @@
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"

View File

@ -14,17 +14,18 @@ let transport;
**/
async function logFile() {
const homeDir = os_1.homedir();
const linuxDir = `/.config/mcopy/`;
const linuxDir = `/.mcopy/`;
const macDir = `/Library/Logs/mcopy/`;
const winDir = `/AppData/Roaming/mcopy/`;
let logPath = path_1.join(homeDir, linuxDir);
let logPath = path_1.normalize(path_1.join(homeDir, linuxDir));
let dirExists;
if (process.platform === 'darwin') {
logPath = path_1.join(homeDir, macDir);
logPath = path_1.normalize(path_1.join(homeDir, macDir));
}
else if (process.platform === 'win32') {
logPath = path_1.join(homeDir, winDir);
logPath = path_1.normalize(path_1.join(homeDir, winDir));
}
console.log(logPath);
dirExists = await fs_extra_1.exists(logPath);
if (!dirExists) {
try {

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/log/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,qCAA2D;AAC3D,+BAA4B;AAC5B,uCAAyC;AACzC,2BAA6B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GAAG;YACX,IAAI,EAAG,cAAc,OAAO,KAAK,CAAA,CAAC,CAAC;YACnC,IAAI,EAAG,cAAc,OAAO,KAAK,CAAA,CAAC,CAAC;YACnC,KAAK,EAAG,cAAc,OAAO,KAAK,CAAA,CAAC,CAAC;SACpC,CAAA;KACD;SAAM;QACN,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE;YACrB,aAAa,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAChC,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;SAC7B;QACD,SAAS,GAAG,sBAAY,CAAC;YACxB,MAAM,EAAG,gBAAM,CAAC,OAAO,CACnB,gBAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAG,GAAG,CAAC,KAAK,IAAI,OAAO,EAAE,CAAC,EACjD,gBAAM,CAAC,SAAS,CAAC;gBAChB,MAAM,EAAE,qBAAqB;aAC7B,CAAC,EACF,gBAAM,CAAC,MAAM,CAAC,CAAC,IAAU,EAAG,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE,GAAC,CAAC,IAAI,CAAC,KAAK,KAAG,SAAS,CAAA,CAAC,CAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA,CAAC,CAAA,GAAG,CAAC,CAAC,CAC7I;YACH,UAAU,EAAE;gBACX,IAAI,CAAC,oBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC;gBACvC,IAAI,CAAC,oBAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC;aACjC;SACD,CAAC,CAAA;KACF;IACD,OAAO,SAAS,CAAA;AACjB,CAAC,CAAA"}

View File

@ -126,9 +126,9 @@ class Sequencer {
* @param {object} arg Arguments from ipc message
**/
async start(arg) {
const psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
let startTime = +new Date();
let ms;
this.psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
if (arg && arg.arr) {
this.arr = arg.arr; //overwrite sequence
}
@ -182,7 +182,7 @@ class Sequencer {
if (this.cmd.proj.filmout.state.enabled === true) {
await this.cmd.proj.filmout.display.close();
}
electron_1.powerSaveBlocker.stop(this.psbId);
electron_1.powerSaveBlocker.stop(psbId);
this.psbId = null;
ms = (+new Date()) - startTime;
//end sequence

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
'use strict'
import { createLogger, transports, format } from 'winston';
import { join } from 'path';
import { join, normalize } from 'path';
import { mkdir, exists } from 'fs-extra';
import { homedir } from 'os';
@ -16,17 +16,19 @@ let transport : any
**/
async function logFile () {
const homeDir : string = homedir();
const linuxDir : string = `/.config/mcopy/`;
const linuxDir : string = `/.mcopy/`;
const macDir : string = `/Library/Logs/mcopy/`;
const winDir : string = `/AppData/Roaming/mcopy/`;
let logPath : string = join(homeDir, linuxDir);
let logPath : string = normalize(join(homeDir, linuxDir));
let dirExists : boolean;
if (process.platform === 'darwin') {
logPath = join(homeDir, macDir);
logPath = normalize(join(homeDir, macDir));
} else if (process.platform === 'win32') {
logPath = join(homeDir, winDir);
logPath = normalize(join(homeDir, winDir));
}
console.log(logPath)
dirExists = await exists(logPath);

View File

@ -145,11 +145,10 @@ class Sequencer {
* @param {object} arg Arguments from ipc message
**/
public async start (arg : any) {
const psbId : number = powerSaveBlocker.start('prevent-display-sleep');
let startTime : number = +new Date();
let ms : number;
this.psbId = powerSaveBlocker.start('prevent-display-sleep');
if (arg && arg.arr) {
this.arr = arg.arr; //overwrite sequence
} else {
@ -214,7 +213,7 @@ class Sequencer {
await this.cmd.proj.filmout.display.close();
}
powerSaveBlocker.stop(this.psbId)
powerSaveBlocker.stop(psbId)
this.psbId = null
ms = ( +new Date() ) - startTime;