Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c61c128044
|
@ -14,17 +14,18 @@ let transport;
|
||||||
**/
|
**/
|
||||||
async function logFile() {
|
async function logFile() {
|
||||||
const homeDir = os_1.homedir();
|
const homeDir = os_1.homedir();
|
||||||
const linuxDir = `/.config/mcopy/`;
|
const linuxDir = `/.mcopy/`;
|
||||||
const macDir = `/Library/Logs/mcopy/`;
|
const macDir = `/Library/Logs/mcopy/`;
|
||||||
const winDir = `/AppData/Roaming/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;
|
let dirExists;
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
logPath = path_1.join(homeDir, macDir);
|
logPath = path_1.normalize(path_1.join(homeDir, macDir));
|
||||||
}
|
}
|
||||||
else if (process.platform === 'win32') {
|
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);
|
dirExists = await fs_extra_1.exists(logPath);
|
||||||
if (!dirExists) {
|
if (!dirExists) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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,sBAAs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,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"}
|
|
@ -126,9 +126,9 @@ class Sequencer {
|
||||||
* @param {object} arg Arguments from ipc message
|
* @param {object} arg Arguments from ipc message
|
||||||
**/
|
**/
|
||||||
async start(arg) {
|
async start(arg) {
|
||||||
|
const psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
|
||||||
let startTime = +new Date();
|
let startTime = +new Date();
|
||||||
let ms;
|
let ms;
|
||||||
this.psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
|
|
||||||
if (arg && arg.arr) {
|
if (arg && arg.arr) {
|
||||||
this.arr = arg.arr; //overwrite sequence
|
this.arr = arg.arr; //overwrite sequence
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ class Sequencer {
|
||||||
if (this.cmd.proj.filmout.state.enabled === true) {
|
if (this.cmd.proj.filmout.state.enabled === true) {
|
||||||
await this.cmd.proj.filmout.display.close();
|
await this.cmd.proj.filmout.display.close();
|
||||||
}
|
}
|
||||||
electron_1.powerSaveBlocker.stop(this.psbId);
|
electron_1.powerSaveBlocker.stop(psbId);
|
||||||
this.psbId = null;
|
this.psbId = null;
|
||||||
ms = (+new Date()) - startTime;
|
ms = (+new Date()) - startTime;
|
||||||
//end sequence
|
//end sequence
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -35,23 +35,33 @@ gui.counterUpdate = function (which, raw) {
|
||||||
const formattedVal = gui.fmtZero(raw, 6);
|
const formattedVal = gui.fmtZero(raw, 6);
|
||||||
$(`.${which} .count`).val(formattedVal);
|
$(`.${which} .count`).val(formattedVal);
|
||||||
};
|
};
|
||||||
|
gui.notifierWorking = true;
|
||||||
gui.notify = function (title, message) {
|
gui.notify = function (title, message) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
if (!gui.notifierWorking) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
notifier.notify({
|
try {
|
||||||
title: title,
|
notifier.notify({
|
||||||
message: message,
|
title: title,
|
||||||
//icon: path.join(__dirname, 'coulson.jpg'), // Absolute path (doesn't work on balloons)
|
message: message,
|
||||||
sound: true, // Only Notification Center or Windows Toasters
|
//icon: path.join(__dirname, 'coulson.jpg'), // Absolute path (doesn't work on balloons)
|
||||||
wait: true // Wait with callback, until user action is taken against notification
|
sound: true, // Only Notification Center or Windows Toasters
|
||||||
}, function (err, response) {
|
wait: true // Wait with callback, until user action is taken against notification
|
||||||
// Response is response from notification
|
}, function (err, response) {
|
||||||
if (err) {
|
// Response is response from notification
|
||||||
log.error(`Error with notification`, err);
|
if (err) {
|
||||||
return reject(err);
|
log.error(`Error with notification`, err);
|
||||||
}
|
return reject(err);
|
||||||
return resolve(true);
|
}
|
||||||
});
|
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) {
|
gui.updateCam = async function (t) {
|
||||||
|
|
|
@ -4252,7 +4252,7 @@
|
||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "3.0.1",
|
"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=",
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
|
|
|
@ -14,17 +14,18 @@ let transport;
|
||||||
**/
|
**/
|
||||||
async function logFile() {
|
async function logFile() {
|
||||||
const homeDir = os_1.homedir();
|
const homeDir = os_1.homedir();
|
||||||
const linuxDir = `/.config/mcopy/`;
|
const linuxDir = `/.mcopy/`;
|
||||||
const macDir = `/Library/Logs/mcopy/`;
|
const macDir = `/Library/Logs/mcopy/`;
|
||||||
const winDir = `/AppData/Roaming/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;
|
let dirExists;
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
logPath = path_1.join(homeDir, macDir);
|
logPath = path_1.normalize(path_1.join(homeDir, macDir));
|
||||||
}
|
}
|
||||||
else if (process.platform === 'win32') {
|
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);
|
dirExists = await fs_extra_1.exists(logPath);
|
||||||
if (!dirExists) {
|
if (!dirExists) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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,OAAO,GAAG,WAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAChC;IAED,SAAS,GAAG,MAAM,iBAAM,CAAC,OAAO,CAAC,CAAC;IAElC,IAAI,CAAC,SAAS,EAAE;QACf,IAAI;YACH,MAAM,gBAAK,CAAC,OAAO,CAAC,CAAC;SACrB;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CA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AS,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"}
|
|
@ -126,9 +126,9 @@ class Sequencer {
|
||||||
* @param {object} arg Arguments from ipc message
|
* @param {object} arg Arguments from ipc message
|
||||||
**/
|
**/
|
||||||
async start(arg) {
|
async start(arg) {
|
||||||
|
const psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
|
||||||
let startTime = +new Date();
|
let startTime = +new Date();
|
||||||
let ms;
|
let ms;
|
||||||
this.psbId = electron_1.powerSaveBlocker.start('prevent-display-sleep');
|
|
||||||
if (arg && arg.arr) {
|
if (arg && arg.arr) {
|
||||||
this.arr = arg.arr; //overwrite sequence
|
this.arr = arg.arr; //overwrite sequence
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ class Sequencer {
|
||||||
if (this.cmd.proj.filmout.state.enabled === true) {
|
if (this.cmd.proj.filmout.state.enabled === true) {
|
||||||
await this.cmd.proj.filmout.display.close();
|
await this.cmd.proj.filmout.display.close();
|
||||||
}
|
}
|
||||||
electron_1.powerSaveBlocker.stop(this.psbId);
|
electron_1.powerSaveBlocker.stop(psbId);
|
||||||
this.psbId = null;
|
this.psbId = null;
|
||||||
ms = (+new Date()) - startTime;
|
ms = (+new Date()) - startTime;
|
||||||
//end sequence
|
//end sequence
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
import { createLogger, transports, format } from 'winston';
|
import { createLogger, transports, format } from 'winston';
|
||||||
import { join } from 'path';
|
import { join, normalize } from 'path';
|
||||||
import { mkdir, exists } from 'fs-extra';
|
import { mkdir, exists } from 'fs-extra';
|
||||||
import { homedir } from 'os';
|
import { homedir } from 'os';
|
||||||
|
|
||||||
|
@ -16,17 +16,19 @@ let transport : any
|
||||||
**/
|
**/
|
||||||
async function logFile () {
|
async function logFile () {
|
||||||
const homeDir : string = homedir();
|
const homeDir : string = homedir();
|
||||||
const linuxDir : string = `/.config/mcopy/`;
|
const linuxDir : string = `/.mcopy/`;
|
||||||
const macDir : string = `/Library/Logs/mcopy/`;
|
const macDir : string = `/Library/Logs/mcopy/`;
|
||||||
const winDir : string = `/AppData/Roaming/mcopy/`;
|
const winDir : string = `/AppData/Roaming/mcopy/`;
|
||||||
let logPath : string = join(homeDir, linuxDir);
|
let logPath : string = normalize(join(homeDir, linuxDir));
|
||||||
let dirExists : boolean;
|
let dirExists : boolean;
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
logPath = join(homeDir, macDir);
|
logPath = normalize(join(homeDir, macDir));
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
logPath = join(homeDir, winDir);
|
logPath = normalize(join(homeDir, winDir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(logPath)
|
||||||
|
|
||||||
dirExists = await exists(logPath);
|
dirExists = await exists(logPath);
|
||||||
|
|
||||||
|
|
|
@ -145,11 +145,10 @@ class Sequencer {
|
||||||
* @param {object} arg Arguments from ipc message
|
* @param {object} arg Arguments from ipc message
|
||||||
**/
|
**/
|
||||||
public async start (arg : any) {
|
public async start (arg : any) {
|
||||||
|
const psbId : number = powerSaveBlocker.start('prevent-display-sleep');
|
||||||
let startTime : number = +new Date();
|
let startTime : number = +new Date();
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
|
||||||
this.psbId = powerSaveBlocker.start('prevent-display-sleep');
|
|
||||||
|
|
||||||
if (arg && arg.arr) {
|
if (arg && arg.arr) {
|
||||||
this.arr = arg.arr; //overwrite sequence
|
this.arr = arg.arr; //overwrite sequence
|
||||||
} else {
|
} else {
|
||||||
|
@ -214,7 +213,7 @@ class Sequencer {
|
||||||
await this.cmd.proj.filmout.display.close();
|
await this.cmd.proj.filmout.display.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
powerSaveBlocker.stop(this.psbId)
|
powerSaveBlocker.stop(psbId)
|
||||||
this.psbId = null
|
this.psbId = null
|
||||||
|
|
||||||
ms = ( +new Date() ) - startTime;
|
ms = ( +new Date() ) - startTime;
|
||||||
|
|
Loading…
Reference in New Issue