From 86feb8517a3125e030af2cc1104bbea54b243c4b Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Mon, 24 Apr 2023 18:46:40 -0400 Subject: [PATCH] Getting ready for BG --- aether_app_native.code-workspace | 8 ++++++++ app/js/aether_app_native_v4.js | 24 ++++++++++-------------- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 aether_app_native.code-workspace diff --git a/aether_app_native.code-workspace b/aether_app_native.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/aether_app_native.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/app/js/aether_app_native_v4.js b/app/js/aether_app_native_v4.js index 267758d..9badde9 100644 --- a/app/js/aether_app_native_v4.js +++ b/app/js/aether_app_native_v4.js @@ -45,12 +45,8 @@ exports.load_config = function () { if (cwd == '/') { cwd = home_directory; } - let directory_list = fs_promises.readdir(cwd).then(function (read_dir_result) { - console.log('CWD Contents:', read_dir_result); - // for (let file of read_dir_result) { - // console.log(file); - // } - }); + let directory_list = fs.readdirSync(cwd) + console.log('CWD Contents:', directory_list); } catch (err) { console.error(err); } @@ -65,7 +61,7 @@ exports.load_config = function () { let config_directory = null; // let default_config_path = path.join(process.cwd(),'aether_native_app_config.current.json'); let default_config_path = 'aether_native_app_config.current.json'; - console.log(default_config_path); + console.log(`Default Config File (path): ${default_config_path}`); let config_path = null; // Set the config path for macOS or Linux @@ -94,7 +90,7 @@ exports.load_config = function () { // Attempt to open the config file. The preferred location is based on the OS's config directory. if (fs.existsSync(config_path)) { - console.log(`Config file (config.json) found under ${config_directory}`); + console.log(`Config file (aether_native_app_config.json) found under ${config_directory}`); } else if (!fs.existsSync(config_path) && fs.existsSync(default_config_path)) { fs.copyFileSync(default_config_path, config_path); console.log('Default config file copied: '+config_directory); @@ -126,18 +122,18 @@ exports.load_config = function () { } config = JSON.parse(fs.readFileSync(config_path)); - console.log('Config file read.'); + console.log('Config file read.', config); config.home_directory = home_directory; // From the OS platform config.tmp_directory = tmp_directory; // From the OS platform config.app_root_path = config.app_root_path.replace('[home]', home_directory); config.app_root_path = config.app_root_path.replace('[tmp]', tmp_directory); - console.log(config.app_root_path); + console.log(`App Root Path: ${config.app_root_path}`); config.local_file_cache_path = config.local_file_cache_path.replace('[home]', home_directory); config.local_file_cache_path = config.local_file_cache_path.replace('[tmp]', tmp_directory); - console.log(config.local_file_cache_path); + console.log(`Local File Cache Path: ${config.local_file_cache_path}`); if (fs.existsSync(config.local_file_cache_path)) { } else { fs.mkdirSync(config.local_file_cache_path); @@ -146,7 +142,7 @@ exports.load_config = function () { config.host_file_temp_path = config.host_file_temp_path.replace('[home]', home_directory); config.host_file_temp_path = config.host_file_temp_path.replace('[tmp]', tmp_directory); - console.log(config.host_file_temp_path); + console.log(`Host file temp path: ${config.host_file_temp_path}`); if (fs.existsSync(config.host_file_temp_path)) { } else { fs.mkdirSync(config.host_file_temp_path); @@ -155,8 +151,8 @@ exports.load_config = function () { let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => { console.log('IPC import config finished'); - console.log(result); - return true; + // console.log(result); + return result; // Result should be "true" }) //console.log(config); diff --git a/package-lock.json b/package-lock.json index 4c870c3..e618b0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "path": "^0.12.7" }, "devDependencies": { - "electron": "^22.0.0", + "electron": "^22.3.6", "electron-packager": "^16.0.0" } }, diff --git a/package.json b/package.json index 257330c..17cdbbe 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "path": "^0.12.7" }, "devDependencies": { - "electron": "^22.0.0", + "electron": "^22.3.6", "electron-packager": "^16.0.0" } }