System module phones home

This commit is contained in:
mmcwilliams 2019-06-24 12:42:27 -04:00
parent d15fe37de5
commit 6b10e9c28d
16 changed files with 26 additions and 22 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.4.12",
"version": "1.4.13",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -77,7 +77,7 @@ async function displays() {
*
* @returns {object} Object containing system information
*/
async function system() {
async function system(ui) {
const obj = {};
let platform;
try {
@ -98,6 +98,7 @@ async function system() {
}
obj.displays = await displays();
obj.deps = await dependencies(obj.platform);
ui.send('system', obj);
return obj;
}
module.exports = system;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,2BAAkC;AAClC,uCAAkC;AAClC,SAAS;AACT,+BAA4B;AAC5B;;;;;;IAMI;AAEJ,KAAK,UAAU,YAAY,CAAE,QAAiB;IAC7C,IAAI,GAAG,GAAS,EAAE,CAAC;IAEnB,IAAI;QACH,MAAM,WAAI,CAAC,WAAW,CAAC,CAAC;QACxB,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC;KACtB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IAED,IAAI;QACH,MAAM,WAAI,CAAC,YAAY,CAAC,CAAC;QACzB,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;KACxB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IACD,UAAU;IACV,IAAI,QAAQ,KAAK,KAAK,EAAE;QACvB,IAAI;YACH,MAAM,WAAI,CAAC,QAAQ,CAAC,CAAC;YACrB,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC;SAChB;QAAC,OAAO,GAAG,EAAE;YACb,yCAAyC;YACzC,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;KACR;IACD,OAAO,CAAC,CAAA;AACT,CAAC;AAED,KAAK,UAAU,QAAQ;IACtB,IAAI,QAAQ,GAAW,iBAAM,CAAC,cAAc,EAAE,CAAC;IAC/C,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,MAAM,CAAE,EAAQ;IAC9B,MAAM,GAAG,GAAS,EAAE,CAAC;IACrB,IAAI,QAAiB,CAAC;IAEtB,IAAI;QACH,GAAG,CAAC,GAAG,GAAG,WAAM,EAAE,CAAC;KACnB;IAAC,OAAO,GAAG,EAAE;QACb,GAAG,CAAC,GAAG,GAAG,MAAM,CAAA;KAChB;IAED,QAAQ,GAAG,SAAI,EAAE,CAAC;IAElB,IAAI,QAAQ,KAAK,QAAQ,EAAE;QAC1B,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM,IAAI,QAAQ,KAAK,YAAY,EAAE;QACrC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM;QACN,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;IAED,GAAG,CAAC,QAAQ,GAAG,MAAM,QAAQ,EAAE,CAAA;IAC/B,GAAG,CAAC,IAAI,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE5C,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEvB,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}

View File

@ -70,18 +70,17 @@ var createWindow = function () {
}
var init = async function () {
log = await require('log')({})
try {
SYSTEM = await system()
} catch (err) {
console.error(err)
}
createWindow()
createMenu()
try {
SYSTEM = await system(mainWindow.webContents)
} catch (err) {
console.error(err)
}
await settings.restore()
display = require('display')(SYSTEM)

View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.4.12",
"version": "1.4.13",
"description": "GUI for the mcopy small gauge film optical printer platform",
"main": "main.js",
"scripts": {

View File

@ -1,5 +1,5 @@
{
"version": "1.4.12",
"version": "1.4.13",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -77,7 +77,7 @@ async function displays() {
*
* @returns {object} Object containing system information
*/
async function system() {
async function system(ui) {
const obj = {};
let platform;
try {
@ -98,6 +98,7 @@ async function system() {
}
obj.displays = await displays();
obj.deps = await dependencies(obj.platform);
ui.send('system', obj);
return obj;
}
module.exports = system;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,2BAAkC;AAClC,uCAAkC;AAClC,SAAS;AACT,+BAA4B;AAC5B;;;;;;IAMI;AAEJ,KAAK,UAAU,YAAY,CAAE,QAAiB;IAC7C,IAAI,GAAG,GAAS,EAAE,CAAC;IAEnB,IAAI;QACH,MAAM,WAAI,CAAC,WAAW,CAAC,CAAC;QACxB,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC;KACtB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IAED,IAAI;QACH,MAAM,WAAI,CAAC,YAAY,CAAC,CAAC;QACzB,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;KACxB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IACD,UAAU;IACV,IAAI,QAAQ,KAAK,KAAK,EAAE;QACvB,IAAI;YACH,MAAM,WAAI,CAAC,QAAQ,CAAC,CAAC;YACrB,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC;SAChB;QA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CAAC,OAAO,EAAE;QACrB,OAAO,CAAC,CAAA;KACR;IACD,OAAO,CAAC,CAAA;AACT,CAAC;AAED,KAAK,UAAU,QAAQ;IACtB,IAAI,QAAQ,GAAW,iBAAM,CAAC,cAAc,EAAE,CAAC;IAC/C,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,MAAM,CAAE,EAAQ;IAC9B,MAAM,GAAG,GAAS,EAAE,CAAC;IACrB,IAAI,QAAiB,CAAC;IAEtB,IAAI;QACH,GAAG,CAAC,GAAG,GAAG,WAAM,EAAE,CAAC;KACnB;IAAC,OAAO,GAAG,EAAE;QACb,GAAG,CAAC,GAAG,GAAG,MAAM,CAAA;KAChB;IAED,QAAQ,GAAG,SAAI,EAAE,CAAC;IAElB,IAAI,QAAQ,KAAK,QAAQ,EAAE;QAC1B,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM,IAAI,QAAQ,KAAK,YAAY,EAAE;QACrC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM;QACN,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;IAED,GAAG,CAAC,QAAQ,GAAG,MAAM,QAAQ,EAAE,CAAA;IAC/B,GAAG,CAAC,IAAI,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE5C,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEvB,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}

View File

@ -1,6 +1,6 @@
{
"name": "mcopy-cli",
"version": "1.4.12",
"version": "1.4.13",
"description": "CLI for controlling the mcopy optical printer platform",
"main": "index.js",
"scripts": {

View File

@ -1,5 +1,5 @@
{
"version": "1.4.12",
"version": "1.4.13",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -77,7 +77,7 @@ async function displays() {
*
* @returns {object} Object containing system information
*/
async function system() {
async function system(ui) {
const obj = {};
let platform;
try {
@ -98,6 +98,7 @@ async function system() {
}
obj.displays = await displays();
obj.deps = await dependencies(obj.platform);
ui.send('system', obj);
return obj;
}
module.exports = system;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,2BAAkC;AAClC,uCAAkC;AAClC,SAAS;AACT,+BAA4B;AAC5B;;;;;;IAMI;AAEJ,KAAK,UAAU,YAAY,CAAE,QAAiB;IAC7C,IAAI,GAAG,GAAS,EAAE,CAAC;IAEnB,IAAI;QACH,MAAM,WAAI,CAAC,WAAW,CAAC,CAAC;QACxB,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC;KACtB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IAED,IAAI;QACH,MAAM,WAAI,CAAC,YAAY,CAAC,CAAC;QACzB,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;KACxB;IAAC,OAAO,GAAG,EAAE;QACb,4CAA4C;QAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;KACrD;IACD,UAAU;IACV,IAAI,QAAQ,KAAK,KAAK,EAAE;QACvB,IAAI;YACH,MAAM,WAAI,CAAC,QAAQ,CAAC,CAAC;YACrB,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC;SAChB;QAAC,OAAO,GAAG,EAAE;YACb,yCAAyC;YACzC,OAAO,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;SAClD;KACD;IAED,OAAO,GAAG,CAAC;AACZ,CAA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c,EAAE,CAAC;IAC/C,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,MAAM,CAAE,EAAQ;IAC9B,MAAM,GAAG,GAAS,EAAE,CAAC;IACrB,IAAI,QAAiB,CAAC;IAEtB,IAAI;QACH,GAAG,CAAC,GAAG,GAAG,WAAM,EAAE,CAAC;KACnB;IAAC,OAAO,GAAG,EAAE;QACb,GAAG,CAAC,GAAG,GAAG,MAAM,CAAA;KAChB;IAED,QAAQ,GAAG,SAAI,EAAE,CAAC;IAElB,IAAI,QAAQ,KAAK,QAAQ,EAAE;QAC1B,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM,IAAI,QAAQ,KAAK,YAAY,EAAE;QACrC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;SAAM;QACN,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;KACrB;IAED,GAAG,CAAC,QAAQ,GAAG,MAAM,QAAQ,EAAE,CAAA;IAC/B,GAAG,CAAC,IAAI,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE5C,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEvB,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "mcopy",
"version": "1.4.12",
"version": "1.4.13",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "mcopy",
"version": "1.4.12",
"version": "1.4.13",
"description": "Small gauge film optical printer platform",
"main": "build.js",
"directories": {

View File

@ -1,5 +1,5 @@
{
"version": "1.4.12",
"version": "1.4.13",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -80,7 +80,7 @@ async function displays () {
*
* @returns {object} Object containing system information
*/
async function system () {
async function system (ui : any) {
const obj : any = {};
let platform : string;
@ -103,6 +103,8 @@ async function system () {
obj.displays = await displays()
obj.deps = await dependencies(obj.platform);
ui.send('system', obj);
return obj;
}