diff --git a/Aether App Native setup documentation.txt b/Aether App Native setup documentation.txt
deleted file mode 100644
index f4a925b..0000000
--- a/Aether App Native setup documentation.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-git clone https://scott_idem@bitbucket.org/oneskyit/one-sky-it-app-native.git ~/OSIT_dev/aether_app_native
-
-cd ~/OSIT_dev/aether_app_native/
-npm update
-npm start
-
-git branch
-git checkout development
diff --git a/ae_native_app_config.default.json b/ae_native_app_config.default.json
deleted file mode 100644
index ee150c2..0000000
--- a/ae_native_app_config.default.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "developer_tools": false,
- "native_app_which_html": "default",
- "native_app_index_path": "[home]/OSIT/native_app/app/index.html",
- "native_app_index_url": "https://app.oneskyit.com/native/index.html",
-
- "native_app_js_css_base_url": "https://demo.oneskyit.com",
- "native_app_js_css_base_url_bak": "https://bak-demo.oneskyit.com",
-
- "account_id": "",
- "event_id": "",
- "event_device_id": "soon_to_be_required",
- "event_location_id": "",
- "event_session_id": "",
-
- "account_code": "",
- "event_code": "",
- "event_device_code": "eventually_use_code",
- "event_location_code": "",
- "event_session_code": "",
-
- "app_root_path": "[home]/OSIT/native_app",
-
- "api_protocol": "https",
- "api_server": "api.oneskyit.com",
- "api_port": 443,
- "api_path": "",
- "api_secret_key": "ABCD1234XYZ",
-
- "api_protocol_backup": "https",
- "api_server_backup": "bak-api.oneskyit.com",
- "api_port_backup": 443,
- "api_path_backup": "",
- "api_secret_key_backup": "ABCD1234XYZ",
-
- "access_control_allow_origin": "*",
-
- "idb_name": "osit",
-
- "local_file_cache_path": "[home]/OSIT/file_cache",
- "host_file_temp_path": "[home]/OSIT/temp",
-
-
-
- "display_arrangement": "mirror_and_extend",
- "display_builtin_resolution": "",
- "display_builtin_refresh": "",
- "display_builtin_rotation": "",
- "display_external_resolution": "",
- "display_external_refresh": "",
- "display_external_rotation": "",
-
- "audio_out_volume": null,
- "audio_in_volume": null,
-
- "recording_fps": 30,
- "recording_show_cursor": true,
- "recording_highlight_clicks": false,
- "recording_screen_id": null,
- "recording_audio_device_id": null,
- "known_builtin_screen_ids": [69732032, 69733952, 69733248],
- "known_builtin_audio_device_ids": [ "AppleHDAEngineInput:1B,0,1,0:1", "BuiltInMicrophoneDevice" ],
- "recording_video_codec": "h264",
- "recording_path": "[home]/recordings",
- "recording_base_filename": "recording",
- "aperture_bin_path": null,
- "recording_start_datetime": "2019-10-12 01:01:01Z",
- "recording_stop_datetime": "2019-10-31 23:59:59Z",
- "recordings_datetime": [
- { "start": "2019-10-11T09:50:00.00", "stop": "2019-10-11T10:15:00.00" },
- { "start": "2019-10-11T10:50:00.00", "stop": "2019-10-11T11:15:00.00" }
- ]
-}
diff --git a/aether_app_native.code-workspace b/aether_app_native.code-workspace
deleted file mode 100644
index 876a149..0000000
--- a/aether_app_native.code-workspace
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "folders": [
- {
- "path": "."
- }
- ],
- "settings": {}
-}
\ No newline at end of file
diff --git a/app/css/aether_app_native_v3.css b/app/css/aether_app_native_v3.css
deleted file mode 100644
index cbebafa..0000000
--- a/app/css/aether_app_native_v3.css
+++ /dev/null
@@ -1,28 +0,0 @@
-body {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-
- /* margin: .1em;
- padding: .1em; */
-}
-
-section#Main-Body {
- /* outline: solid thin red; */
-
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
-
-section#Main-Nav-Menu {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
-
-section#Main-Content {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
\ No newline at end of file
diff --git a/app/files/launcher.reset b/app/files/launcher.reset
deleted file mode 100644
index 3a0225e..0000000
--- a/app/files/launcher.reset
+++ /dev/null
@@ -1 +0,0 @@
-launcher reset
diff --git a/app/files/test.txt b/app/files/test.txt
deleted file mode 100644
index 5eb252b..0000000
--- a/app/files/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-test txt
diff --git a/app/img/favicon.ico b/app/img/favicon.ico
deleted file mode 100755
index cf49949..0000000
Binary files a/app/img/favicon.ico and /dev/null differ
diff --git a/app/img/oneskyit_logo.png b/app/img/oneskyit_logo.png
deleted file mode 100644
index 64f2487..0000000
Binary files a/app/img/oneskyit_logo.png and /dev/null differ
diff --git a/app/img/osit_logo_100.png b/app/img/osit_logo_100.png
deleted file mode 100644
index 1dfa88d..0000000
Binary files a/app/img/osit_logo_100.png and /dev/null differ
diff --git a/app/img/osit_logo_150.png b/app/img/osit_logo_150.png
deleted file mode 100644
index 64f2487..0000000
Binary files a/app/img/osit_logo_150.png and /dev/null differ
diff --git a/app/img/osit_logo_32.png b/app/img/osit_logo_32.png
deleted file mode 100644
index cf49949..0000000
Binary files a/app/img/osit_logo_32.png and /dev/null differ
diff --git a/app/img/site_background.png b/app/img/site_background.png
deleted file mode 100644
index fe4b84f..0000000
Binary files a/app/img/site_background.png and /dev/null differ
diff --git a/app/img/site_background.svg b/app/img/site_background.svg
deleted file mode 100644
index 14e8c60..0000000
--- a/app/img/site_background.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/app/img/site_background.webp b/app/img/site_background.webp
deleted file mode 100644
index e5a15b5..0000000
Binary files a/app/img/site_background.webp and /dev/null differ
diff --git a/app/index.bootstrap.html b/app/index.bootstrap.html
deleted file mode 100644
index 5e2a482..0000000
--- a/app/index.bootstrap.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
- One Sky IT's Aether App - External XXX
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Loaded HTML
-
-
-
diff --git a/app/index.current.html b/app/index.current.html
deleted file mode 100644
index 6ddb121..0000000
--- a/app/index.current.html
+++ /dev/null
@@ -1,362 +0,0 @@
-
-
-
-
-
-
- One Sky IT's Aether App - External
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- System-Notifications (and Site-Notifications)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/index.html b/app/index.html
deleted file mode 100644
index a0ee9ca..0000000
--- a/app/index.html
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
- One Sky IT's Aether App
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- System-Notifications (and Site-Notifications)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/js/aether_app_native_v3.js b/app/js/aether_app_native_v3.js
deleted file mode 100644
index 1297d64..0000000
--- a/app/js/aether_app_native_v3.js
+++ /dev/null
@@ -1,632 +0,0 @@
-'use strict';
-const os = require('os');
-const path = require('path');
-const fs = require('fs');
-const fs_promises = require('node:fs/promises');
-const child_process = require('child_process');
-const { ipcRenderer } = require('electron');
-
-// import psList from 'ps-list';
-// const ps_list = require('ps-list');
-
-let home_directory = require('os').homedir();
-console.log('Home: '+home_directory);
-
-let tmp_directory = require('os').tmpdir();
-console.log('Temporary: '+tmp_directory);
-
-let config = null;
-
-exports.load_config = function () {
- console.log('*** Electron framework: load_config() ***');
-
- let cwd = process.cwd();
- console.log(`CWD: ${cwd}`);
-
- try {
- if (cwd == '/') {
- cwd = home_directory;
- }
- console.log('Reading directory...');
- let directory_list = fs_promises.readdir(cwd).then(function (read_dir_result) {
- console.log('Got contents:');
- for (let file of read_dir_result) {
- console.log(file);
- }
- });
- } catch (err) {
- console.error(err);
- }
-
- // let home_directory = require('os').homedir();
- // console.log('Home: '+home_directory);
-
- // let tmp_directory = require('os').tmpdir();
- // console.log('Temporary: '+tmp_directory);
-
- // let config = null;
- let config_directory = null;
- // let default_config_path = path.join(process.cwd(),'config.json.default');
- let default_config_path = 'config.json.default';
- console.log(default_config_path);
- let config_path = null;
-
- // Set the config path for macOS or Linux
- if (os.platform == 'darwin') {
- config_directory = path.join(home_directory, 'Library/Application Support/OSIT');
- console.log('macOS config directory: '+config_directory);
- } else if (os.platform == 'linux') {
- config_directory = path.join(home_directory, '.config/OSIT');
- console.log('Linux config directory: '+config_directory);
- }
-
- // Look for the config file and copy the default if not found.
- if (fs.existsSync(config_directory)) {
- console.log('Config directory found: '+config_directory);
- } else {
- fs.mkdirSync(config_directory);
- console.log('Config directory created: '+config_directory);
-
- //default_config_path = path.join(process.cwd(),'config.json.default');
- // config_path = path.join(config_directory, 'config.json');
- // fs.copyFileSync(default_config_path, config_path);
- // console.log('Default config file copied: '+config_directory);
- }
-
- config_path = path.join(config_directory, 'config.json');
-
- // 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}`);
- } 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);
-
- // config = JSON.parse(fs.readFileSync(config_path));
- // console.log('Config file read.');
- } else if (fs.existsSync(path.join(cwd, 'config.json'))) {
- //fs.copyFileSync(default_config_path, config_path);
- //console.log('Default config file copied: '+config_directory);
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- config_path = path.join(cwd, 'config.json');
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- let found_config_path = path.join(cwd, 'config.json');
-
- fs.copyFileSync(found_config_path, config_path);
- console.log(`Found config file copied: ${config_directory}`);
- } else if (fs.existsSync(path.join(cwd, 'config.json.default'))) {
- console.log(`Config file (config.json) not found under ${config_directory} or CWD. Using default config in CWD. ${cwd}`);
- default_config_path = path.join(cwd, 'config.json.default');
-
- fs.copyFileSync(default_config_path, config_path);
- console.log(`Default config file copied: ${config_directory}`);
- } else {
- console.log('Can not find a config file.');
-
- return false;
- }
-
- config = JSON.parse(fs.readFileSync(config_path));
- console.log('Config file read.');
-
- 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);
-
- 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);
- // if (fs.existsSync(config.local_file_cache_path)) {
- // } else {
- // fs.mkdirSync(config.local_file_cache_path);
- // console.log(`Host file cache directory created: ${config.local_file_cache_path}`);
- // }
-
- 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);
- // if (fs.existsSync(config.host_file_temp_path)) {
- // } else {
- // fs.mkdirSync(config.host_file_temp_path);
- // console.log(`Host file temp directory created: ${config.host_file_temp_path}`);
- // }
-
- 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(config);
- return config;
-}
-
-
-// Check for local file
-// Updated 2022-05-06
-exports.check_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: check_local_file() ***');
- // console.log('Check for local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- let full_local_file_path = path.join(local_file_path, filename);
- console.log(full_local_file_path);
-
- if (fs.existsSync(full_local_file_path)) {
- console.log(`Local file exists: ${full_local_file_path}`);
- return true;
- } else {
- return false;
- }
-}
-
-
-// Check local hash file cache
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.check_hash_file_cache = async function ({local_file_cache_path, hash}) {
- // console.log('*** Electron framework export: check_hash_file_cache() ***');
- // console.log('Check local hash file cache');
- console.log(`*** Electron framework export: check_hash_file_cache() *** Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}`);
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- // console.log(hash_file_cache_path);
-
- if (fs.existsSync(hash_file_cache_path)) {
- // console.log(`Hashed file exists in cache: ${hash_file_cache_path}`);
- return true;
- } else {
- console.log(`Hashed file not found in cache: ${hash_file_cache_path}`);
- return false;
- }
-}
-
-
-// Download hash file to cache
-// Used by Svelte Event Launcher
-// Updated 2022-05-06
-exports.download_hash_file_to_cache = async function ({api_base_url, local_file_cache_path, event_file_id=null, hash=null}) {
- // console.log('*** Electron framework export: download_hash_file_to_cache() ***');
- // console.log('Download hash file to cache');
- console.log(`*** Electron framework export: download_hash_file_to_cache() *** Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- let endpoint = `/event/file/${event_file_id}/download`;
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- fs.mkdirSync(subdirectory_path);
- console.log(`Subdirectory directory created: ${subdirectory_path}`);
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- if (fs.existsSync(hash_file_cache_path)) {
- if (check_hash) {
- const file_buffer = fs.readFileSync(hash_file_cache_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');S
- if (file_hash_sha256_check == hash) {
- console.log('File hash match', file_hash_sha256_check);
- return true;
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- }
- // console.log(`!!!ABOUT TO CALL DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
- let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, hash_file_cache_path).then((result) => {
- if (result) {
- console.log('IPC download file process finished successfully');
- return true;
- } else if (result == null) {
- console.log('IPC Download Result (file not found?):', result);
- return null;
- } else {
- console.log('IPC Download Result (file being downloaded or something went wrong):', result);
- return false;
- }
- });
- // console.log(`!!!DONE WITH DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
-
- return download_file_result;
-}
-
-
-// Open cached hash file after copying to temp directory
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.open_hash_file_to_temp = async function ({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework export: open_hash_file_to_temp() ***');
- // console.log('Open cached hash file after copying to temp directory');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- let subdirectory = hash.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => {
- console.log('IPC open hash file to temp finished');
- console.log(result);
- return true;
- })
-
- // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- // console.log(result);
-
- console.log(open_hash_file_to_temp_result);
- console.log('End: open_hash_file_to_temp()');
- if (open_hash_file_to_temp_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-// Open local file
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-03-10
-exports.open_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: open_local_file() ***');
- // console.log('Open local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- // let full_local_file_path = path.join(local_file_path, filename);
- // console.log(full_local_file_path);
-
- // if (fs.existsSync(full_local_file_path)) {
- // console.log(`Local file exists: ${full_local_file_path}`);
- // // return true;
- // } else {
- // return false;
- // }
-
- let open_local_file_result = await ipcRenderer.invoke('open_local_file', local_file_path, filename).then((result) => {
- console.log('IPC open local file finished');
- console.log(result);
- return true;
- })
-
- console.log(open_local_file_result);
- console.log('End: open_local_file()');
- if (open_local_file_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-// // Check local file cache and download from server if needed.
-// // Updated 2022-03-09
-// // exports.check_file_cache = async function ({local_file_cache_path, event_file_id, hash}) {
-// exports.check_file_cache = async function ({api_base_url, local_file_cache_path, event_file_id, hash}) {
-// console.log('*** Electron framework export: check_file_cache() ***');
-// // console.log('Check local file cache and download from server if needed.');
-// console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
-// // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
-// let hash_filename = hash+'.file';
-
-// let save_path = path.join(local_file_cache_path, hash_filename);
-// console.log(save_path);
-
-// if (fs.existsSync(save_path)) {
-// console.log('Hashed file cache already exists: '+save_path);
-// return true;
-// } else {
-// console.log('Hashed file not found in local cache. Downloading file: '+save_path);
-// let endpoint = `/event/file/${event_file_id}/download`;
-// let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
-// console.log(result);
-
-// return new Promise((resolve, reject) => {
-// ipcRenderer.once('download_file_reply', function(event, response){
-// console.log(response);
-// return response;
-// })
-// resolve(true);
-// });
-
-// // await ipcRenderer.once('download_file_reply', function(event, response){
-// // console.log(response);
-// // return response;
-// // });
-
-// // result.then(function (response) {
-// // console.log('Downloaded!!!???');
-// // return true;
-// // }).catch(function (error) {
-// // console.log(error);
-// // return false;
-// // });
-
-// // return result;
-
-// // console.log(result);
-// // if (result) {
-// // return true;
-// // } else {
-// // return false;
-// // }
-// }
-// }
-
-
-// Check local file cache and download from server if needed. Must use IPC to Main to download file. Set a Promise to wait for download_file_reply.
-// Updated 2022-03-09
-async function check_file_cache({api_base_url, local_file_cache_path, event_file_id, hash}) {
- console.log('*** Electron framework: check_file_cache() ***');
- // console.log('Check local file cache and download from server if needed.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
- let hash_filename = hash+'.file';
-
- let save_path = path.join(local_file_cache_path, hash_filename);
- console.log(save_path);
-
- if (fs.existsSync(save_path)) {
- console.log('Hashed file cache already exists: '+save_path);
- return true;
- } else {
- console.log('Hashed file not found in local cache. Downloading file: '+save_path);
- let endpoint = `/event/file/${event_file_id}/download`;
- let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
- console.log(result);
-
- return new Promise((resolve, reject) => {
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
- return response;
- })
- resolve(true);
- });
-
- // await ipcRenderer.once('download_file_reply', function(event, response){
- // console.log(response);
- // return response;
- // });
-
- // result.then(function (response) {
- // console.log('Downloaded!!!???');
- // return true;
- // }).catch(function (error) {
- // console.log(error);
- // return false;
- // });
-
- // return result;
-
- // console.log(result);
- // if (result) {
- // return true;
- // } else {
- // return false;
- // }
- }
-}
-
-
-// IPC to Main: Open local file cache if available. Copy to temp directory with given filename first.
-// Updated 2022-03-09
-async function open_local_file({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: open_local_file() ***');
- // console.log('Open local file cache if available. Copy to temp directory with given filename first.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- console.log(local_file_cache_path);
- console.log(hash);
- console.log(filename);
-
- let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- console.log(result);
-
- return true;
-}
-
-
-// No longer needed? Not referenced as of 2022-10-11
-exports.check_file_cache_and_open_local_file = async function ({local_file_cache_path, event_file_id, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: check_file_cache_and_open_local_file() ***');
- console.log('Checking the local file cache against the remote server and then opening the local file.');
-
- let check_file_cache_result = check_file_cache({local_file_cache_path: local_file_cache_path, event_file_id: event_file_id, hash: hash});
- console.log(check_file_cache_result);
-
- if (check_file_cache_result) {
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- }
-
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
-
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- })
-}
-
-
-// Kill processes
-// Updated 2022-05-07
-exports.kill_processes = async function ({process_name = null}) {
- console.log('*** Electron framework export: kill_processes() ***');
- console.log(process_name); // process_name or grep pattern
-
- let cmd = '';
- if (os.platform == 'darwin') {
- // cmd = `osascript -e 'quit app "${process_name}" saving no'`;
- cmd = `osascript -e 'quit application "${process_name}" saving no'`;
- } else {
- cmd = `pkill ${process_name}`;
- }
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) console.log(err);
- console.log(stdout);
- });
- console.log(`Killed processes matching ${process_name}`);
-
- if (os.platform == 'darwin') {
- if (process_name == 'Parallels:Acrobat Reader') {
- // Regular expression: (Parallels).*(Acrobat Reader)
- // This will find any process with Parallels and Acrobat Reader in the name
- cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels Acrobat Reader process');
- }
-
- if (process_name == 'Parallels:PowerPoint') {
- // Regular expression: (Parallels).*(PowerPoint)
- // This will find any process with Parallels and PowerPoint in the name
- cmd = `pkill -i -f '(Parallels).*(PowerPoint)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels PowerPoint process');
- }
- }
-
- // let signal = 'SIGTERM'; // 'SIGTERM', 'SIGINT', 'SIGHUP'
- // process.kill(pid, signal);
- // process.kill(pid, 0); // Special case test if process exists
-
- return true;
-}
-
-
-// Run raw osascript
-// Updated 2022-05-07
-exports.run_osascript = async function ({cmd=null, interactive=false, language=null, flags='h', program_file=null}) {
- console.log('*** Electron framework export: run_osascript() ***');
- console.log(cmd);
-
- if (os.platform == 'darwin') {
- } else {
- console.log('Not available for this platform. macOS (darwin) only.');
- return false;
- }
-
- let osascript_str = '';
-
- if (Array.isArray(cmd)) {
- console.log('List of cmd strings');
- let cmds_str = '';
- for (let i = 0; i < cmd.length; i++) {
- cmds_str += `-e '${cmd[i]}'`;
- }
- osascript_str = `osascript ${cmds_str}`
-
- } else if (typeof cmd === 'string') {
- console.log('Single cmd string');
- osascript_str = `osascript -e '${cmd}'`;
- } else {
- return false;
- }
-
- if (language) {
- console.log(`Language: ${language}`);
- osascript_str = `${osascript_str} -l ${language}`;
- }
-
- if (flags) {
- console.log(`Flags: ${flags}`);
- osascript_str = `${osascript_str} -s ${flags}`;
- }
-
- console.log(`OSA Script String: ${osascript_str}`);
- child_process.exec(osascript_str, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- console.log(stdin);
- });
-
- console.log('Finished');
- return true;
-}
-
-
-// Run raw command
-// Updated 2022-05-07
-exports.run_cmd = async function ({cmd=null}) {
- console.log('*** Electron framework export: run_cmd() ***');
-
- console.log(`Command String: ${cmd}`);
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- console.log(stdin);
- });
-
- console.log('Finished');
- return true;
-}
-
-
-// Run raw command
-// Updated 2022-05-25
-exports.get_device_info = async function () {
- console.log('*** Electron framework export: get_device_info() ***');
-
- let data = {};
- data['arch'] = os.arch();
- data['hostname'] = os.hostname();
- data['cpus'] = os.cpus();
- data['freemem'] = os.freemem();
- data['totalmem'] = os.totalmem();
- data['loadavg'] = os.loadavg();
- data['networkInterfaces'] = os.networkInterfaces();
- data['platform'] = os.platform();
- data['release'] = os.release();
- data['uptime'] = os.uptime();
- data['version'] = os.version();
-
- console.log(data);
- return data;
-}
diff --git a/app/js/aether_app_native_v4.js b/app/js/aether_app_native_v4.js
deleted file mode 100644
index ae9c392..0000000
--- a/app/js/aether_app_native_v4.js
+++ /dev/null
@@ -1,1191 +0,0 @@
-'use strict';
-/* This should only contain functions that can not be pulled easily into Svelte */
-/*
-Exported functions in use:
-* load_config()
-* check_hash_file_cache()
-* download_hash_file_to_cache()
-* open_hash_file_to_temp()
-* open_local_file()
-* kill_processes()
-* run_osascript()
-* run_cmd()
-* get_device_info
-
-Local functions in use:
-* open_local_file()
-*/
-
-const child_process = require('child_process');
-const crypto = require('crypto');
-const fs = require('fs');
-const fs_promises = require('node:fs/promises');
-const os = require('os');
-const path = require('path');
-const { ipcRenderer } = require('electron');
-
-// import psList from 'ps-list';
-// const ps_list = require('ps-list');
-
-let home_directory = require('os').homedir();
-console.log('Home: '+home_directory);
-
-let tmp_directory = require('os').tmpdir();
-console.log('Temporary: '+tmp_directory);
-
-let config = null;
-
-exports.load_init_config = function () {
- console.log('*** Aether App Native export: load_init_config() ***');
-
- let cwd = process.cwd();
- console.log(`CWD: ${cwd}`);
-
- try {
- if (cwd == '/') {
- cwd = home_directory;
- }
- let directory_list = fs.readdirSync(cwd)
- console.log('CWD Contents:', directory_list);
- } catch (err) {
- console.error(err);
- }
-
- // let home_directory = require('os').homedir();
- // console.log('Home: '+home_directory);
-
- // let tmp_directory = require('os').tmpdir();
- // console.log('Temporary: '+tmp_directory);
-
- // let config = null;
- let config_directory = null;
- // let default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json');
- let default_config_path = 'ae_native_app_config.current.json';
- console.log(`Default Config File (path): ${default_config_path}`);
- let config_path = null;
-
- // Set the config path for macOS or Linux
- if (os.platform == 'darwin') {
- // config_directory = path.join(home_directory, 'Library/Application Support/OSIT');
- config_directory = path.join(home_directory, 'OSIT/native_app');
- console.log('macOS config directory: '+config_directory);
- } else if (os.platform == 'linux') {
- config_directory = path.join(home_directory, '.config/OSIT');
- console.log('Linux config directory: '+config_directory);
- }
-
- // Look for the config file and copy the default if not found.
- if (fs.existsSync(config_directory)) {
- console.log('Config directory found: '+config_directory);
- } else {
- fs.mkdirSync(config_directory);
- console.log('Config directory created: '+config_directory);
-
- //default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json');
- // config_path = path.join(config_directory, 'ae_native_app_config.json');
- // fs.copyFileSync(default_config_path, config_path);
- // console.log('Default config file copied: '+config_directory);
- }
-
- config_path = path.join(config_directory, 'ae_native_app_config.json');
-
- // 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 (ae_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);
-
- // config = JSON.parse(fs.readFileSync(config_path));
- // console.log('Config file read.');
- } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.json'))) {
- //fs.copyFileSync(default_config_path, config_path);
- //console.log('Default config file copied: '+config_directory);
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- config_path = path.join(cwd, 'ae_native_app_config.json');
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- let found_config_path = path.join(cwd, 'ae_native_app_config.json');
-
- fs.copyFileSync(found_config_path, config_path);
- console.log(`Found config file copied: ${config_directory}`);
- } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.current.json'))) {
- console.log(`Config file (config.json) not found under ${config_directory} or CWD. Using default config in CWD. ${cwd}`);
- default_config_path = path.join(cwd, 'ae_native_app_config.current.json');
-
- fs.copyFileSync(default_config_path, config_path);
- console.log(`Default config file copied: ${config_directory}`);
- } else {
- console.log('Can not find a config file.');
-
- return false;
- }
-
- let local_config = JSON.parse(fs.readFileSync(config_path));
- console.log('Config file read.', local_config);
- config = local_config;
-
- // Do some quick clean up.
-
- 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(`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(`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);
- console.log(`Host file cache directory created: ${config.local_file_cache_path}`);
- }
-
- 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(`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);
- console.log(`Host file temp directory created: ${config.host_file_temp_path}`);
- }
-
- if (!config.account_id) {
- config.account_id = '_XY7DXtc9MY'; // Not ideal...?
- }
-
- let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => {
- console.log('IPC import config finished');
- // console.log(result);
- return result; // Result should be "true"
- })
-
- //console.log(config);
- return config;
-}
-
-
-exports.load_full_config = function (init_config) {
- console.log('*** Aether App Native export: load_config() ***');
-
- console.log('Init config.', init_config);
- // config = init_config;
-
- config = get_url_cfg(init_config).then((cfg) => {
- console.log('URL config file downloaded.', cfg);
-
- let new_config = init_config;
-
- // Update with remote device config settings from API.
- new_config.account_id = cfg.account_id_random;
- new_config.event_id = cfg.event_id_random;
- new_config.event_device_id = cfg.event_device_id;
- new_config.event_location_id = cfg.event_location_id;
- new_config.event_session_id = cfg.event_session_id;
-
- new_config.check_event_device_loop_period = cfg.check_event_device_loop_period;
- new_config.check_event_location_loop_period = cfg.check_event_location_loop_period;
- new_config.check_event_loop_period = cfg.check_event_loop_period;
- new_config.check_event_session_loop_period = cfg.check_event_session_loop_period;
-
- new_config.record_audio = cfg.record_audio;
- new_config.record_video = cfg.record_video;
- new_config.recording_path = cfg.recording_path;
- new_config.recording_path = new_config.recording_path.replace('[home]', home_directory);
- new_config.recording_path = new_config.recording_path.replace('[tmp]', home_directory);
-
- new_config.home_directory = home_directory; // From the OS platform
- new_config.tmp_directory = tmp_directory; // From the OS platform
-
- new_config.app_root_path = new_config.app_root_path.replace('[home]', home_directory);
- new_config.app_root_path = new_config.app_root_path.replace('[tmp]', tmp_directory);
- console.log(`App Root Path: ${new_config.app_root_path}`);
-
- new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[home]', home_directory);
- new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[tmp]', tmp_directory);
- console.log(`Local File Cache Path: ${new_config.local_file_cache_path}`);
- if (fs.existsSync(new_config.local_file_cache_path)) {
- } else {
- fs.mkdirSync(new_config.local_file_cache_path);
- console.log(`Host file cache directory created: ${new_config.local_file_cache_path}`);
- }
-
- new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[home]', home_directory);
- new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[tmp]', tmp_directory);
- console.log(`Host file temp path: ${new_config.host_file_temp_path}`);
- if (fs.existsSync(new_config.host_file_temp_path)) {
- } else {
- fs.mkdirSync(new_config.host_file_temp_path);
- console.log(`Host file temp directory created: ${new_config.host_file_temp_path}`);
- }
-
- let import_config_to_ipc_result = ipcRenderer.invoke('import_config', new_config).then((result) => {
- console.log('IPC import config finished');
- // console.log(result);
- return result; // Result should be "true"
- })
-
- return new_config
- })
-
- //console.log(config);
- return config;
-}
-
-
-async function get_url_cfg(cfg) {
- let base_url = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`;
-
- let axios_api = axios.create({
- baseURL: base_url,
- timeout: 60000, // in milliseconds; 60000 = 60 seconds
- /* other custom settings */
- });
- // axios_api.defaults.headers = cfg['headers'];
-
- // axios.defaults.baseURL = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`;
- axios_api.defaults.headers.common['Access-Control-Allow-Origin'] = cfg.access_control_allow_origin; // '*'; // app_cfg.access_control_allow_origin;
- axios_api.defaults.headers.common['content-type'] = 'application/json';
- axios_api.defaults.headers.common['x-aether-api-key'] = cfg.api_secret_key;
- // axios_api.defaults.headers.common['x-account-id'] = cfg.account_id;
-
- let event_device_id = 'dbgMWS3KEHE';
- let endpoint = `/event/device/${event_device_id}`;
-
- let params = {'event_device_code': 'asdf'};
-
- let response_data_promise = await axios_api.get(
- endpoint,
- {
- params: params,
- onDownloadProgress: (progressEvent) => {
- let percent_completed = Math.round(
- (progressEvent.loaded * 100) / progressEvent.total
- );
- console.log('GET Data Timestamp:', progressEvent.timeStamp, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed);
-
- // temp_get_object_percent_completed = percent_completed;
- }
- }
- )
- .then(function (response) {
- console.log(`Response: ${response}`);
-
- let return_data = response.data['data'];
- if (Array.isArray(return_data)) {
- console.log(`Data result is an array/list. Array length: ${return_data.length}`);
- } else {
- console.log(`Data result is a dictionary/object, not an array/list.`);
- }
- return return_data;
- })
- .catch(function (error) {
- console.log(`Base URL: ${base_url} | Endpoint: ${endpoint}`);
-
- console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion???
- if (error.response) {
- console.log(`Response Status: ${error.response.status}; Status Text: ${error.response.statusText}`);
- } else {
- console.log('Error:', error);
- }
-
- if (error.response && error.response.status === 404) {
- return null; // Returning null since there were no results
- }
- return false; // Returning false since something may have gone wrong. Also more in line with what the API returns.
- });
-
- return response_data_promise;
-}
-
-
-
-
-
-
-
-
-// Check for local file
-// Updated 2022-05-06
-exports.check_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: check_local_file() ***');
- // console.log('Check for local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- let full_local_file_path = path.join(local_file_path, filename);
- console.log(full_local_file_path);
-
- if (fs.existsSync(full_local_file_path)) {
- console.log(`Local file exists: ${full_local_file_path}`);
- return true;
- } else {
- return false;
- }
-}
-
-
-// Check local hash file cache
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.check_hash_file_cache = async function ({local_file_cache_path, hash}) {
- // console.log('*** Electron framework export: check_hash_file_cache() ***');
- // console.log('Check local hash file cache');
- console.log(`*** Electron framework export: check_hash_file_cache() *** Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}`);
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- // console.log(hash_file_cache_path);
-
- if (fs.existsSync(hash_file_cache_path)) {
- // console.log(`Hashed file exists in cache: ${hash_file_cache_path}`);
- return true;
- } else {
- console.log(`Hashed file not found in cache: ${hash_file_cache_path}`);
- return false;
- }
-}
-
-
-// Check local hash file cache
-// Used by Svelte Event Launcher
-// Updated 2022-10-12
-exports.check_hash_file_cache_v2 = async function ({local_file_cache_path, hash, verify_hash=false}) {
- console.log('*** Aether App Native export: check_hash_file_cache_v2() ***');
- console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}`);
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- // This should not happen. The subdirectory needs to be created.
- console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`);
- return false;
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- // console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- console.log('File hash match', file_hash_sha256_check);
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- return true;
- } else {
- console.log(`Hashed file not found in cache: ${full_cached_hash_path}`);
- return null;
- }
-}
-
-
-// Download hash file to cache
-// Used by Svelte Event Launcher
-// Updated 2022-05-06
-exports.download_hash_file_to_cache = async function ({api_base_url, local_file_cache_path, event_file_id=null, hash=null}) {
- // console.log('*** Electron framework export: download_hash_file_to_cache() ***');
- // console.log('Download hash file to cache');
- console.log(`*** Electron framework export: download_hash_file_to_cache() *** Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- let endpoint = `/event/file/${event_file_id}/download`;
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- fs.mkdirSync(subdirectory_path);
- console.log(`Subdirectory directory created: ${subdirectory_path}`);
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- if (fs.existsSync(hash_file_cache_path)) {
- if (check_hash) {
- const file_buffer = fs.readFileSync(hash_file_cache_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');S
- if (file_hash_sha256_check == hash) {
- console.log('File hash match', file_hash_sha256_check);
- return true;
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- }
- // console.log(`!!!ABOUT TO CALL DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
- let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, hash_file_cache_path).then((result) => {
- if (result) {
- console.log('IPC download file process finished successfully');
- return true;
- } else if (result == null) {
- console.log('IPC Download Result (file not found?):', result);
- return null;
- } else {
- console.log('IPC Download Result (file being downloaded or something went wrong):', result);
- return false;
- }
- });
- // console.log(`!!!DONE WITH DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
-
- return download_file_result;
-}
-
-
-// Download hash file to cache
-// Used by Svelte Event Launcher
-// Updated 2022-10-12
-exports.download_hash_file_to_cache_v2 = async function ({api_base_url, local_file_cache_path, event_file_id=null, hash=null, verify_hash=true, overwrite_existing=false}) {
- console.log('*** Aether App Native export: download_hash_file_to_cache_v2() ***');
- console.log(`Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let endpoint = `/event/file/${event_file_id}/download`;
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- fs.mkdirSync(subdirectory_path);
- console.log(`Hashed file subdirectory directory created in cache directory: ${subdirectory_path}`);
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- if (overwrite_existing) {
- console.log('Going to overwrite the existing file even though the hash matches.');
- } else {
- return true;
- }
- } else {
- // This should only happen if the file is actively being copied or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- if (overwrite_existing) {
- console.log('Going to overwrite the existing file because the hash does not match.');
- } else {
- return false;
- }
- }
- }
- }
-
- let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result) => {
- if (result) {
- console.log('IPC download file process finished successfully');
- return true;
- } else if (result == null) {
- console.log('IPC Download Result (file not found?):', result);
- return null;
- } else {
- console.log('IPC Download Result (file being downloaded or something went wrong):', result);
- return false;
- }
- });
-
- return download_file_result;
-}
-
-
-
-// Open cached hash file after copying to temp directory
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.open_hash_file_to_temp = async function ({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework export: open_hash_file_to_temp() ***');
- // console.log('Open cached hash file after copying to temp directory');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- let subdirectory = hash.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => {
- console.log('IPC open hash file to temp finished');
- console.log(result);
- return true;
- })
-
- // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- // console.log(result);
-
- console.log(open_hash_file_to_temp_result);
- console.log('End: open_hash_file_to_temp()');
- if (open_hash_file_to_temp_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-
-// Open cached hash file after copying to temp directory
-// Used by Svelte Event Launcher
-// Updated 2022-10-12
-exports.open_hash_file_to_temp_v2 = async function ({local_file_cache_path, hash, host_file_temp_path, filename, verify_hash=true}) {
- console.log('*** Aether App Native export: open_hash_file_to_temp_v2() ***');
- console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Local File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- // console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory');
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- // This should not happen. The subdirectory needs to be created.
- console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`);
- return false;
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- } else {
- console.log(`Hashed file not found in cache: ${full_cached_hash_path}`);
- return null;
- }
-
- let local_file_cache_path_w_sub = subdirectory_path; // I need to go back and clean up the variable names related file directory and file paths.
- // NOTE: Setting check_hash to false since by default it was checked above.
- let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', local_file_cache_path_w_sub, hash, host_file_temp_path, filename, verify_hash=false).then((result) => {
- console.log('IPC open hash file to temp finished');
- if (result) {
- console.log('Local hash file was opened from temp directory.');
- return result;
- } else {
- console.log('Local hash file was not opened from the temp directory. Something went wrong.');
- console.log(result);
- return false;
- }
- })
-
- // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- // console.log(result);
-
- // console.log(open_hash_file_to_temp_result);
- // console.log('End: open_hash_file_to_temp()');
- // if (open_hash_file_to_temp_result) {
- // console.log('File opened successfully');
- // return true;
- // } else {
- // console.log('File was not opened successfully');
- // return false;
- // }
-
- // let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => {
- // console.log('IPC open hash file to temp finished');
- // if (result) {
- // console.log('Local hash file was opened from temp directory.');
- // return result;
- // } else {
- // console.log('Local hash file was not opened from the temp directory. Something went wrong.');
- // console.log(result);
- // return false;
- // }
- // })
-
- return open_hash_file_to_temp_result;
-}
-
-
-
-
-// Open local file
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-03-10
-exports.open_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: open_local_file() ***');
- // console.log('Open local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- // let full_local_file_path = path.join(local_file_path, filename);
- // console.log(full_local_file_path);
-
- // if (fs.existsSync(full_local_file_path)) {
- // console.log(`Local file exists: ${full_local_file_path}`);
- // // return true;
- // } else {
- // return false;
- // }
-
- let open_local_file_result = await ipcRenderer.invoke('open_local_file', local_file_path, filename).then((result) => {
- console.log('IPC open local file finished');
- console.log(result);
- return true;
- })
-
- console.log(open_local_file_result);
- console.log('End: open_local_file()');
- if (open_local_file_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-// // Check local file cache and download from server if needed.
-// // Updated 2022-03-09
-// // exports.check_file_cache = async function ({local_file_cache_path, event_file_id, hash}) {
-// exports.check_file_cache = async function ({api_base_url, local_file_cache_path, event_file_id, hash}) {
-// console.log('*** Electron framework export: check_file_cache() ***');
-// // console.log('Check local file cache and download from server if needed.');
-// console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
-// // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
-// let hash_filename = hash+'.file';
-
-// let save_path = path.join(local_file_cache_path, hash_filename);
-// console.log(save_path);
-
-// if (fs.existsSync(save_path)) {
-// console.log('Hashed file cache already exists: '+save_path);
-// return true;
-// } else {
-// console.log('Hashed file not found in local cache. Downloading file: '+save_path);
-// let endpoint = `/event/file/${event_file_id}/download`;
-// let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
-// console.log(result);
-
-// return new Promise((resolve, reject) => {
-// ipcRenderer.once('download_file_reply', function(event, response){
-// console.log(response);
-// return response;
-// })
-// resolve(true);
-// });
-
-// // await ipcRenderer.once('download_file_reply', function(event, response){
-// // console.log(response);
-// // return response;
-// // });
-
-// // result.then(function (response) {
-// // console.log('Downloaded!!!???');
-// // return true;
-// // }).catch(function (error) {
-// // console.log(error);
-// // return false;
-// // });
-
-// // return result;
-
-// // console.log(result);
-// // if (result) {
-// // return true;
-// // } else {
-// // return false;
-// // }
-// }
-// }
-
-
-// Check local file cache and download from server if needed. Must use IPC to Main to download file. Set a Promise to wait for download_file_reply.
-// Updated 2022-03-09
-async function check_file_cache({api_base_url, local_file_cache_path, event_file_id, hash}) {
- console.log('*** Electron framework: check_file_cache() ***');
- // console.log('Check local file cache and download from server if needed.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
- let hash_filename = hash+'.file';
-
- let save_path = path.join(local_file_cache_path, hash_filename);
- console.log(save_path);
-
- if (fs.existsSync(save_path)) {
- console.log('Hashed file cache already exists: '+save_path);
- return true;
- } else {
- console.log('Hashed file not found in local cache. Downloading file: '+save_path);
- let endpoint = `/event/file/${event_file_id}/download`;
- let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
- console.log(result);
-
- return new Promise((resolve, reject) => {
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
- return response;
- })
- resolve(true);
- });
-
- // await ipcRenderer.once('download_file_reply', function(event, response){
- // console.log(response);
- // return response;
- // });
-
- // result.then(function (response) {
- // console.log('Downloaded!!!???');
- // return true;
- // }).catch(function (error) {
- // console.log(error);
- // return false;
- // });
-
- // return result;
-
- // console.log(result);
- // if (result) {
- // return true;
- // } else {
- // return false;
- // }
- }
-}
-
-
-// IPC to Main: Open local file cache if available. Copy to temp directory with given filename first.
-// Updated 2022-03-09
-async function open_local_file({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: open_local_file() ***');
- // console.log('Open local file cache if available. Copy to temp directory with given filename first.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- console.log(local_file_cache_path);
- console.log(hash);
- console.log(filename);
-
- let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- console.log(result);
-
- return true;
-}
-
-
-// No longer needed? Not referenced as of 2022-10-11
-exports.check_file_cache_and_open_local_file = async function ({local_file_cache_path, event_file_id, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: check_file_cache_and_open_local_file() ***');
- console.log('Checking the local file cache against the remote server and then opening the local file.');
-
- let check_file_cache_result = check_file_cache({local_file_cache_path: local_file_cache_path, event_file_id: event_file_id, hash: hash});
- console.log(check_file_cache_result);
-
- if (check_file_cache_result) {
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- }
-
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
-
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- })
-}
-
-
-// Kill processes
-// Signals: HUP (hang up), INT (interrupt), QUIT (quit), ABRT (abort), KILL (non-catchable, non-ignoraable kill), ALRMn (alarm clock), TERM (default; software termination signal)
-// Updated 2022-05-07
-exports.kill_processes = async function ({process_name = null, process_id = null, signal = null}) {
- console.log('*** Electron framework export: kill_processes() ***');
- console.log(process_name); // process_name or grep pattern
-
- let cmd = '';
- if (os.platform == 'darwin') {
- if (signal == 'HUP') {
- cmd = `killall -HUP '${process_name}'`;
- } else if (signal == 'INT') {
- cmd = `killall -INT '${process_name}'`;
- } else if (signal == 'QUIT') {
- cmd = `killall -QUIT '${process_name}'`;
- } else if (signal == 'ABRT') {
- cmd = `killall -ABRT '${process_name}'`;
- } else if (signal == 'KILL') {
- cmd = `killall -KILL '${process_name}'`;
- } else if (signal == 'ALRM') {
- cmd = `killall -ALRM '${process_name}'`;
- } else if (signal == 'TERM') {
- cmd = `killall -TERM '${process_name}'`;
- } else if (process_id && signal == 'HUP') {
- cmd = `killall -HUP ${process_id}`;
- } else if (process_id && signal == 'INT') {
- cmd = `killall -INT ${process_id}`;
- } else if (process_id && signal == 'QUIT') {
- cmd = `killall -QUIT ${process_id}`;
- } else if (process_id && signal == 'ABRT') {
- cmd = `killall -ABRT ${process_id}`;
- } else if (process_id && signal == 'KILL') {
- cmd = `killall -KILL ${process_id}`;
- } else if (process_id && signal == 'ALRM') {
- cmd = `killall -ALRM ${process_id}`;
- } else if (process_id && signal == 'TERM') {
- cmd = `killall -TERM ${process_id}`;
- } else {
- // cmd = `osascript -e 'quit app "${process_name}" saving no'`;
- cmd = `osascript -e 'quit application "${process_name}" saving no'`;
- }
-
- } else {
- cmd = `pkill ${process_name}`;
- }
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) console.log(err);
- console.log(stdout);
- });
- console.log(`Killed processes matching ${process_name}`);
-
- if (os.platform == 'darwin') {
- if (process_name == 'Parallels:Acrobat Reader') {
- // Regular expression: (Parallels).*(Acrobat Reader)
- // This will find any process with Parallels and Acrobat Reader in the name
- cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels Acrobat Reader process');
- }
-
- if (process_name == 'Parallels:PowerPoint') {
- // Regular expression: (Parallels).*(PowerPoint)
- // This will find any process with Parallels and PowerPoint in the name
- cmd = `pkill -i -f '(Parallels).*(PowerPoint)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels PowerPoint process');
- }
- }
-
- // let signal = 'SIGTERM'; // 'SIGTERM', 'SIGINT', 'SIGHUP'
- // process.kill(pid, signal);
- // process.kill(pid, 0); // Special case test if process exists
-
- return true;
-}
-
-
-// Run raw osascript
-// Updated 2022-05-07
-exports.run_osascript = async function ({cmd=null, interactive=false, language=null, flags='h', program_file=null}) {
- console.log('*** Electron framework export: run_osascript() ***');
- console.log(cmd);
-
- if (os.platform == 'darwin') {
- } else {
- console.log('Not available for this platform. macOS (darwin) only.');
- return false;
- }
-
- let osascript_str = '';
-
- if (Array.isArray(cmd)) {
- console.log('List of cmd strings');
- let cmds_str = '';
- for (let i = 0; i < cmd.length; i++) {
- cmds_str += `-e '${cmd[i]}'`;
- }
- osascript_str = `osascript ${cmds_str}`
-
- } else if (typeof cmd === 'string') {
- console.log('Single cmd string');
- osascript_str = `osascript -e '${cmd}'`;
- } else {
- return false;
- }
-
- if (language) {
- console.log(`Language: ${language}`);
- osascript_str = `${osascript_str} -l ${language}`;
- }
-
- if (flags) {
- console.log(`Flags: ${flags}`);
- osascript_str = `${osascript_str} -s ${flags}`;
- }
-
- console.log(`OSA Script String: ${osascript_str}`);
- child_process.exec(osascript_str, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- console.log(stdin);
- });
-
- console.log('Finished');
- return true;
-}
-
-
-// Run raw command
-// Updated 2022-05-07
-exports.run_cmd = async function ({cmd=null, return_stdout=null, return_stdin=null, sync=null}) {
- console.log('*** Electron framework export: run_cmd() ***');
-
- console.log(`Command String: ${cmd}`);
-
- let result;
-
- if (!sync) {
- result = child_process.exec(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) {
- console.log('Error:', err);
- return false;
- };
-
- console.log('stdout:', stdout);
- // console.log('stdin:', stdin);
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
- });
- } else {
- result = child_process.execSync(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) {
- console.log('Error:', err);
- return false;
- };
-
- console.log('stdout:', stdout);
- // console.log('stdin:', stdin);
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
- });
- }
-
- console.log('Result:', result);
- return result;
-}
-
-
-// Run raw command sync
-// Updated 2022-05-07
-exports.run_cmd_sync = function ({cmd=null, return_stdout=null, return_stdin=null}) {
- console.log('*** Electron framework export: run_cmd() ***');
-
- console.log(`Command String: ${cmd}`);
-
- let stdout;
-
- try {
- stdout = child_process.execSync(cmd, {encoding: 'utf8'});
- console.log('Std Out:', stdout);
- } catch (err) {
- console.error('Error:', err);
- return false;
- }
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
-
- // let result;
- // let stdout;
- // let stderr;
- // try {
- // let { stdout, stderr } = child_process.execSync(cmd, (err, stdout, stdin) => {
- // // if (err) throw err;
- // if (err) {
- // console.log('Error:', err);
- // return false;
- // };
-
- // console.log('stdout:', stdout);
- // // console.log('stdin:', stdin);
-
- // if (return_stdout) {
- // console.log('Finished and returning stdout');
- // return stdout;
- // } else {
- // console.log('Finished and returning true');
- // return true;
- // }
- // });
- // } catch (err) {
- // console.error(err);
- // return false;
- // }
-
- // console.log('Result:', result);
- // return result;
-}
-
-
-// Run raw command
-// Updated 2022-05-25
-exports.get_device_info = async function () {
- console.log('*** Electron framework export: get_device_info() ***');
-
- // https://nodejs.org/api/os.html
-
- let data = {};
- data['arch'] = os.arch();
- data['hostname'] = os.hostname();
- data['cpus'] = os.cpus();
- data['freemem'] = os.freemem();
- data['totalmem'] = os.totalmem();
- data['loadavg'] = os.loadavg();
- data['networkInterfaces'] = os.networkInterfaces();
- data['platform'] = os.platform();
- data['release'] = os.release();
- data['uptime'] = os.uptime();
- data['version'] = os.version();
-
- console.log(data);
- return data;
-}
-
-
-
-// For loading JS file
-function loadJS(){
-
- // Gives -1 when the given input is not in the string
- // i.e this file has not been added
-
- if(filesAdded.indexOf('script.js') !== -1)
- return
-
- // Head tag
- var head = document.getElementsByTagName('head')[0]
-
- // Creating script element
- var script = document.createElement('script')
- script.src = 'script.js'
- script.type = 'text/javascript'
-
- // Adding script element
- head.append(script)
-
- // Adding the name of the file to keep record
- filesAdded += ' script.js'
-}
-
-// To load CSS file
-function loadCSS() {
-
- if(filesAdded.indexOf('styles.css') !== -1)
- return
-
- var head = document.getElementsByTagName('head')[0]
-
- // Creating link element
- var style = document.createElement('link')
- style.href = 'styles.css'
- style.type = 'text/css'
- style.rel = 'stylesheet'
- head.append(style);
-
- // Adding the name of the file to keep record
- filesAdded += ' styles.css'
-}
diff --git a/app/script.current.js b/app/script.current.js
deleted file mode 100644
index e87d49a..0000000
--- a/app/script.current.js
+++ /dev/null
@@ -1,1391 +0,0 @@
-'use strict';
-/* This should only contain functions that can not be pulled easily into Svelte */
-/*
-Exported functions in use:
-* load_config()
-* check_hash_file_cache()
-* download_hash_file_to_cache()
-* open_hash_file_to_temp()
-* open_local_file()
-* kill_processes()
-* run_osascript()
-* run_cmd()
-* get_device_info
-
-Local functions in use:
-* open_local_file()
-*/
-
-const child_process = require('child_process');
-const crypto = require('crypto');
-const fs = require('fs');
-const fs_promises = require('node:fs/promises');
-const os = require('os');
-const path = require('path');
-const { ipcRenderer } = require('electron');
-
-// import psList from 'ps-list';
-// const ps_list = require('ps-list');
-
-let home_directory = require('os').homedir();
-console.log('Home: '+home_directory);
-
-let tmp_directory = require('os').tmpdir();
-console.log('Temporary: '+tmp_directory);
-
-let app_root_path = path.join(home_directory, 'OSIT/native_app'); // macOS default
-
-let config = null;
-
-let default_osit_sync_app_root_relative_path = 'OSIT/Speaker Ready System/Admin Share/Custom Applications'; // Mainly for macOS laptops
-let default_osit_sync_app_root_path = path.join(home_directory, default_osit_sync_app_root_relative_path); // macOS default
-let default_osit_sync_native_app_relative_path = 'OSIT/Speaker Ready System/Admin Share/Custom Applications/osit_binaries/osit_aether.current.app'; // Mainly for macOS laptops
-let default_native_app_relative_path = 'OSIT/native_app/osit_aether.app'; // Mainly for macOS laptops
-let default_current_native_app_relative_path = 'OSIT/native_app/osit_aether.current.app'; // Mainly for macOS laptops
-let test_native_app_relative_path = 'OSIT/native_app/osit_aether cmsc remote.app'; // Mainly for macOS laptops
-
-
-
-// exports.check_for_native_app_update = function () {
-// console.log('*** Aether App Native export: check_for_native_app_update() ***');
-//
-// let config_directory = null;
-//
-// if (os.platform == 'darwin') {
-// config_directory = path.join(home_directory, 'OSIT/native_app');
-// console.log('macOS config directory: '+config_directory);
-//
-// let electron_app_path = path.join(home_directory, default_native_app_relative_path);
-// let test_stats = fs.statSync(electron_app_path);
-// console.log(test_stats);
-//
-// if (test_stats.ctimeMs < 1684182140759) {
-// console.log(`This may be an old version!`);
-// }
-// } else if (os.platform == 'linux') {
-// config_directory = path.join(home_directory, '.config/OSIT');
-// console.log('Linux config directory: '+config_directory);
-// } else {
-// console.log('Unknown OS... Is this Windows?');
-// return false;
-// }
-//
-// }
-
-
-exports.load_init_config = function () {
- console.log('*** Aether App Native export: load_init_config() ***');
-
- let cwd = process.cwd();
- console.log(`CWD: ${cwd}`);
-
- try {
- if (cwd == '/') {
- cwd = home_directory;
- }
- let directory_list = fs.readdirSync(cwd)
- console.log('CWD Contents:', directory_list);
- } catch (err) {
- console.error(err);
- }
-
- // let home_directory = require('os').homedir();
- // console.log('Home: '+home_directory);
-
- // let tmp_directory = require('os').tmpdir();
- // console.log('Temporary: '+tmp_directory);
-
- // let config = null;
- let config_directory = null;
- // let default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json');
- let default_config_path = 'ae_native_app_config.current.json';
- console.log(`Default Config File (path): ${default_config_path}`);
- let config_path = null;
-
- // Set the config path for macOS or Linux
- if (os.platform == 'darwin') {
- // config_directory = path.join(home_directory, 'Library/Application Support/OSIT');
- config_directory = path.join(home_directory, 'OSIT/native_app');
- console.log('macOS config directory: '+config_directory);
-
- let electron_app_path = path.join(home_directory, default_native_app_relative_path);
- let test_stats = fs.statSync(electron_app_path);
- console.log(test_stats);
- } else if (os.platform == 'linux') {
- config_directory = path.join(home_directory, '.config/OSIT');
- console.log('Linux config directory: '+config_directory);
- }
-
- // Look for the config file and copy the default if not found.
- if (fs.existsSync(config_directory)) {
- console.log('Config directory found: '+config_directory);
- } else {
- fs.mkdirSync(config_directory);
- console.log('Config directory created: '+config_directory);
-
- //default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json');
- // config_path = path.join(config_directory, 'ae_native_app_config.json');
- // fs.copyFileSync(default_config_path, config_path);
- // console.log('Default config file copied: '+config_directory);
- }
-
- config_path = path.join(config_directory, 'ae_native_app_config.json');
-
- // 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 (ae_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);
-
- // config = JSON.parse(fs.readFileSync(config_path));
- // console.log('Config file read.');
- } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.json'))) {
- //fs.copyFileSync(default_config_path, config_path);
- //console.log('Default config file copied: '+config_directory);
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- config_path = path.join(cwd, 'ae_native_app_config.json');
-
- console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`);
- let found_config_path = path.join(cwd, 'ae_native_app_config.json');
-
- fs.copyFileSync(found_config_path, config_path);
- console.log(`Found config file copied: ${config_directory}`);
- } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.current.json'))) {
- console.log(`Config file (config.json) not found under ${config_directory} or CWD. Using default config in CWD. ${cwd}`);
- default_config_path = path.join(cwd, 'ae_native_app_config.current.json');
-
- fs.copyFileSync(default_config_path, config_path);
- console.log(`Default config file copied: ${config_directory}`);
- } else {
- console.log('Can not find a config file.');
-
- return false;
- }
-
- let local_config = JSON.parse(fs.readFileSync(config_path));
- console.log('Config file read.', local_config);
- config = local_config;
-
- // Do some quick clean up.
-
- 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(`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(`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);
- console.log(`Host file cache directory created: ${config.local_file_cache_path}`);
- }
-
- 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(`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);
- console.log(`Host file temp directory created: ${config.host_file_temp_path}`);
- }
-
- // NOTE: This is not ideal...
- if (!config.account_id) {
- if (config.event_id == 'pjrcghqwert' || config.event_id == 'nmBfuGFeR0k') {
- config.account_id = '_XY7DXtc9MY';
- } else if (config.event_id == 'r8c-rr-I4-52') { // CMSC
- config.account_id = '8Gfxbxr19Nw';
- } else if (config.event_id == 'bM4PL-l8j8p') { // LCI
- config.account_id = 'xFP7AhU8Zlc';
- } else if (config.event_id == 'Y7v-Zg-fe-gu') { // NCSD
- config.account_id = 'FrodrLD7B4w';
- } else if (config.event_id == '9jW-Db-SF-wt') { // AAPOR
- config.account_id = 'j5EBhRDqPuw';
- } else if (config.event_id == 'zJP-Ld-A7-I4') { // BGH
- config.account_id = 'GpLf_bnywCs';
- } else {
- console.log('WARNING WARNING WARNING: The account ID could not be guessed. Using the default of 1. <<< WARNING');
- config.account_id = '_XY7DXtc9MY';
- }
- }
-
- let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => {
- console.log('IPC import config finished');
- // console.log(result);
- return result; // Result should be "true"
- })
-
- //console.log(config);
- return config;
-}
-
-
-exports.load_full_config = function (init_config) {
- console.log('*** Aether App Native export: load_config() ***');
-
- console.log('Init config.', init_config);
- // config = init_config;
-
- config = get_url_cfg(init_config).then((cfg) => {
- console.log('URL config file downloaded.', cfg);
-
- let new_config = init_config;
-
- // Update with remote device config settings from API.
- new_config.account_id = cfg.account_id_random;
- new_config.event_id = cfg.event_id_random;
- new_config.event_device_id = cfg.event_device_id;
- new_config.event_location_id = cfg.event_location_id;
- new_config.event_session_id = cfg.event_session_id;
-
- new_config.check_event_device_loop_period = cfg.check_event_device_loop_period;
- new_config.check_event_location_loop_period = cfg.check_event_location_loop_period;
- new_config.check_event_loop_period = cfg.check_event_loop_period;
- new_config.check_event_session_loop_period = cfg.check_event_session_loop_period;
-
- new_config.record_audio = cfg.record_audio;
- new_config.record_video = cfg.record_video;
- new_config.recording_path = cfg.recording_path;
- new_config.recording_path = new_config.recording_path.replace('[home]', home_directory);
- new_config.recording_path = new_config.recording_path.replace('[tmp]', home_directory);
-
- new_config.home_directory = home_directory; // From the OS platform
- new_config.tmp_directory = tmp_directory; // From the OS platform
-
- new_config.app_root_path = new_config.app_root_path.replace('[home]', home_directory);
- new_config.app_root_path = new_config.app_root_path.replace('[tmp]', tmp_directory);
- console.log(`App Root Path: ${new_config.app_root_path}`);
-
- new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[home]', home_directory);
- new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[tmp]', tmp_directory);
- console.log(`Local File Cache Path: ${new_config.local_file_cache_path}`);
- if (fs.existsSync(new_config.local_file_cache_path)) {
- } else {
- fs.mkdirSync(new_config.local_file_cache_path);
- console.log(`Host file cache directory created: ${new_config.local_file_cache_path}`);
- }
-
- new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[home]', home_directory);
- new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[tmp]', tmp_directory);
- console.log(`Host file temp path: ${new_config.host_file_temp_path}`);
- if (fs.existsSync(new_config.host_file_temp_path)) {
- } else {
- fs.mkdirSync(new_config.host_file_temp_path);
- console.log(`Host file temp directory created: ${new_config.host_file_temp_path}`);
- }
-
- let import_config_to_ipc_result = ipcRenderer.invoke('import_config', new_config).then((result) => {
- console.log('IPC import config finished');
- // console.log(result);
- return result; // Result should be "true"
- })
-
- return new_config
- })
-
- //console.log(config);
- return config;
-}
-
-
-async function get_url_cfg(cfg) {
- let base_url = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`;
-
- let axios_api = axios.create({
- baseURL: base_url,
- timeout: 60000, // in milliseconds; 60000 = 60 seconds
- /* other custom settings */
- });
- // axios_api.defaults.headers = cfg['headers'];
-
- // axios.defaults.baseURL = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`;
- axios_api.defaults.headers.common['Access-Control-Allow-Origin'] = cfg.access_control_allow_origin; // '*'; // app_cfg.access_control_allow_origin;
- axios_api.defaults.headers.common['content-type'] = 'application/json';
- axios_api.defaults.headers.common['x-aether-api-key'] = cfg.api_secret_key;
- // axios_api.defaults.headers.common['x-account-id'] = cfg.account_id;
-
- let event_device_id = 'dbgMWS3KEHE';
- let endpoint = `/event/device/${event_device_id}`;
-
- let params = {'event_device_code': 'asdf'};
-
- let response_data_promise = await axios_api.get(
- endpoint,
- {
- params: params,
- onDownloadProgress: (progressEvent) => {
- let percent_completed = Math.round(
- (progressEvent.loaded * 100) / progressEvent.total
- );
- console.log('GET Data Timestamp:', progressEvent.timeStamp, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed);
-
- // temp_get_object_percent_completed = percent_completed;
- }
- }
- )
- .then(function (response) {
- console.log(`Response: ${response}`);
-
- let return_data = response.data['data'];
- if (Array.isArray(return_data)) {
- console.log(`Data result is an array/list. Array length: ${return_data.length}`);
- } else {
- console.log(`Data result is a dictionary/object, not an array/list.`);
- }
- return return_data;
- })
- .catch(function (error) {
- console.log(`Base URL: ${base_url} | Endpoint: ${endpoint}`);
-
- console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion???
- if (error.response) {
- console.log(`Response Status: ${error.response.status}; Status Text: ${error.response.statusText}`);
- } else {
- console.log('Error:', error);
- }
-
- if (error.response && error.response.status === 404) {
- return null; // Returning null since there were no results
- }
- return false; // Returning false since something may have gone wrong. Also more in line with what the API returns.
- });
-
- return response_data_promise;
-}
-
-
-
-
-
-
-
-
-// Check for local file
-// Updated 2022-05-06
-exports.check_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: check_local_file() ***');
- // console.log('Check for local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- let full_local_file_path = path.join(local_file_path, filename);
- console.log(full_local_file_path);
-
- if (fs.existsSync(full_local_file_path)) {
- console.log(`Local file exists: ${full_local_file_path}`);
- return true;
- } else {
- return false;
- }
-}
-
-
-// Check local hash file cache
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.check_hash_file_cache = async function ({local_file_cache_path, hash}) {
- // console.log('*** Electron framework export: check_hash_file_cache() ***');
- // console.log('Check local hash file cache');
- console.log(`*** Electron framework export: check_hash_file_cache() *** Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}`);
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- // console.log(hash_file_cache_path);
-
- if (fs.existsSync(hash_file_cache_path)) {
- // console.log(`Hashed file exists in cache: ${hash_file_cache_path}`);
- return true;
- } else {
- console.log(`Hashed file not found in cache: ${hash_file_cache_path}`);
- return false;
- }
-}
-
-
-// Check local hash file cache
-// Used by Svelte Event Launcher
-// Updated 2022-10-12
-exports.check_hash_file_cache_v2 = async function ({local_file_cache_path, hash, verify_hash=false}) {
- console.log('*** Aether App Native export: check_hash_file_cache_v2() ***');
- console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}`);
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- // This should not happen. The subdirectory needs to be created.
- console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`);
- return false;
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- // console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- console.log('File hash match', file_hash_sha256_check);
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- return true;
- } else {
- console.log(`Hashed file not found in cache: ${full_cached_hash_path}`);
- return null;
- }
-}
-
-
-// Download hash file to cache
-// Used by Svelte Event Launcher
-// Updated 2022-05-06
-exports.download_hash_file_to_cache = async function ({api_base_url, local_file_cache_path, event_file_id=null, hash=null}) {
- // console.log('*** Electron framework export: download_hash_file_to_cache() ***');
- // console.log('Download hash file to cache');
- console.log(`*** Electron framework export: download_hash_file_to_cache() *** Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- let endpoint = `/event/file/${event_file_id}/download`;
-
- let hash_filename = `${hash}.file`;
-
- let subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- fs.mkdirSync(subdirectory_path);
- console.log(`Subdirectory directory created: ${subdirectory_path}`);
- }
-
- let hash_file_cache_path = path.join(subdirectory_path, hash_filename);
- if (fs.existsSync(hash_file_cache_path)) {
- if (check_hash) {
- const file_buffer = fs.readFileSync(hash_file_cache_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');S
- if (file_hash_sha256_check == hash) {
- console.log('File hash match', file_hash_sha256_check);
- return true;
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- }
- // console.log(`!!!ABOUT TO CALL DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
- let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, hash_file_cache_path).then((result) => {
- if (result) {
- console.log('IPC download file process finished successfully');
- return true;
- } else if (result == null) {
- console.log('IPC Download Result (file not found?):', result);
- return null;
- } else {
- console.log('IPC Download Result (file being downloaded or something went wrong):', result);
- return false;
- }
- });
- // console.log(`!!!DONE WITH DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`);
-
- return download_file_result;
-}
-
-
-// Download hash file to cache
-// Used by Svelte Event Launcher
-// Updated 2023-05-26
-exports.download_hash_file_to_cache_v2 = async function ({api_base_url, api_base_url_backup, local_file_cache_path, event_file_id=null, hash=null, verify_hash=true, overwrite_existing=false}) {
- console.log('*** Aether App Native export: download_hash_file_to_cache_v2() ***');
- console.log(`Base URL: ${api_base_url}; Base URL Backup: ${api_base_url_backup}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let endpoint = `/event/file/${event_file_id}/download`;
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- fs.mkdirSync(subdirectory_path);
- console.log(`Hashed file subdirectory directory created in cache directory: ${subdirectory_path}`);
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- if (overwrite_existing) {
- console.log('Going to overwrite the existing file even though the hash matches.');
- } else {
- return true;
- }
- } else {
- // This should only happen if the file is actively being copied or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- if (overwrite_existing) {
- console.log('Going to overwrite the existing file because the hash does not match.');
- } else {
- return false;
- }
- }
- }
- }
-
- const tmp_full_save_path = full_cached_hash_path+'.tmp';
-
- if (fs.existsSync(tmp_full_save_path)) {
- console.log(`A temp download file was found! ${tmp_full_save_path}`);
-
- let stats = null;
- try {
- stats = fs.statSync(tmp_full_save_path);
-
- // console.log(`File Accessed Last: ${stats.atime}`); // File data last changed (actual contents)
- console.log(`File Data Last Modified: ${stats.mtime}`); // File data last changed (actual contents)
- console.log(`File Metadata Last Modified: ${stats.ctime}`); // File metadata last changed (filename, permissions, etc)
- } catch (error) {
- console.log(error);
- }
-
- let current_datetime = new Date();
- let offset_minutes = 3; // In minutes. 5 minutes of no changes to the file content seems reasonable? Trying with 3 minutes 2022-10-12
- let offset_datetime = new Date(current_datetime.getTime() - offset_minutes*60000);
-
- // console.log(`Times: ${current_datetime} ${offset_datetime} | File ${stats.mtime}`);
- if (stats.mtime < offset_datetime) {
- // console.log(`Marking as expired temp file based on modified datetime. Expire after: ${offset_minutes} minutes`);
- // overwrite_existing = true;
- } else {
- console.log(`Temp download file has not expired yet. Expire after: ${offset_minutes} minutes`);
- // return false;
- return 'tmp';
- }
- }
-
- console.log(`Trying IPC API download from: ${api_base_url}`);
- let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then(async (result) => {
-
- if (result) {
- console.log(`IPC API download file process finished successfully: ${hash}`);
- return true;
- } else if (result == null) {
- console.log(`IPC API download result (file not found?):`, result);
- return null;
- } else if (result === 'in_progress') {
- console.log(`IPC API primary download IN PROGRESS: ${hash}`);
- // return false; // Should return result instead???
- return result;
- } else if (result === 'tmp') {
- console.log(`IPC API primary download FOUND TMP: ${hash}`);
- // return false; // Should return result instead???
- return result;
- } else {
- console.log(`IPC API download result (file being downloaded or something went wrong): ${hash}`, result);
- return false;
-
- // if (api_base_url_backup) {
- // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`);
- // let download_backup_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result_backup) => {
- // if (result_backup) {
- // console.log('IPC download file (from backup) process finished successfully');
- // return true;
- // } else if (result_backup == null) {
- // console.log('IPC Download Result (from backup) (file not found?):', result_backup);
- // return null;
- // } else {
- // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result_backup);
- // return false;
- // }
- // });
- // } else {
- // return false;
- // }
- }
- return true;
- // });
- }).then(async (result) => {
- if (result === false) {
- console.log(`IPC API primary download FAILED!`); // Trying again with backup API server. API Backup: ${api_base_url_backup}`);
- if (api_base_url_backup) {
- console.log(`IPC API primary download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`);
- console.log(`Trying IPC API backup download from: ${api_base_url_backup}`);
- let download_backup_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result_backup) => {
- if (result_backup) {
- console.log(`IPC API backup download file (from backup) process finished successfully: ${hash}`);
- return true;
- } else if (result_backup == null) {
- console.log('IPC API backup download result (file not found?):', result_backup);
- return null;
- } else {
- console.log(`IPC API backup download result (file being downloaded or something went wrong): ${hash}`, result_backup);
- return false;
- }
- });
- return download_backup_file_result;
- } else {
- console.log(`IPC Download FAILED! No backup API server passed. Returning false.`);
- return false;
- }
-
- } else if (result === 'in_progress') {
- console.log(`IPC API primary download IN PROGRESS: ${hash}`);
- return false; // Should return result instead???
- } else if (result === 'tmp') {
- console.log(`IPC API primary download FOUND TMP: ${hash}`);
- return false; // Should return result instead???
- } else {
- return result;
- }
- });
-
- // if (download_file_result === false) {
- // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`)
- // download_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result) => {
- // if (result) {
- // console.log('IPC download file (from backup) process finished successfully');
- // return true;
- // } else if (result == null) {
- // console.log('IPC Download Result (from backup) (file not found?):', result);
- // return null;
- // } else {
- // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result);
- // return false;
- // }
- // });
- // }
-
- return download_file_result;
-}
-
-
-
-// Open cached hash file after copying to temp directory
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-05-06
-exports.open_hash_file_to_temp = async function ({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework export: open_hash_file_to_temp() ***');
- // console.log('Open cached hash file after copying to temp directory');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- let subdirectory = hash.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, subdirectory);
- if (fs.existsSync(subdirectory_path)) {
- } else {
- console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`);
- return false;
- }
-
- let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => {
- console.log('IPC open hash file to temp finished');
- console.log(result);
- return true;
- })
-
- // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- // console.log(result);
-
- console.log(open_hash_file_to_temp_result);
- console.log('End: open_hash_file_to_temp()');
- if (open_hash_file_to_temp_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-
-// Open cached hash file after copying to temp directory
-// Used by Svelte Event Launcher
-// Updated 2022-10-12
-exports.open_hash_file_to_temp_v2 = async function ({local_file_cache_path, hash, host_file_temp_path, filename, verify_hash=true}) {
- console.log('*** Aether App Native export: open_hash_file_to_temp_v2() ***');
- console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Local File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- // console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory');
-
- if (fs.existsSync(local_file_cache_path)) {
- } else {
- // This should not happen. The directory needs to be created.
- console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`);
- return false;
- }
-
- let hash_filename = `${hash}.file`;
-
- let hash_subdirectory = hash_filename.substring(0,2);
- let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory);
-
- if (fs.existsSync(subdirectory_path)) {
- } else {
- // This should not happen. The subdirectory needs to be created.
- console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`);
- return false;
- }
-
- let full_cached_hash_path = path.join(subdirectory_path, hash_filename);
-
- if (fs.existsSync(full_cached_hash_path)) {
- console.log(`Hashed file exists in cache: ${full_cached_hash_path}`);
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cached_hash_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- } else {
- // This should only happen if the file is actively being downloaded or it is corrupt.
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
- } else {
- console.log(`Hashed file not found in cache: ${full_cached_hash_path}`);
- return null;
- }
-
- let local_file_cache_path_w_sub = subdirectory_path; // I need to go back and clean up the variable names related file directory and file paths.
- // NOTE: Setting check_hash to false since by default it was checked above.
- let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', local_file_cache_path_w_sub, hash, host_file_temp_path, filename, verify_hash=false).then((result) => {
- console.log('IPC open hash file to temp finished');
- if (result) {
- console.log('Local hash file was opened from temp directory.');
- return result;
- } else {
- console.log('Local hash file was not opened from the temp directory. Something went wrong.');
- console.log(result);
- return false;
- }
- })
-
- // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- // console.log(result);
-
- // console.log(open_hash_file_to_temp_result);
- // console.log('End: open_hash_file_to_temp()');
- // if (open_hash_file_to_temp_result) {
- // console.log('File opened successfully');
- // return true;
- // } else {
- // console.log('File was not opened successfully');
- // return false;
- // }
-
- // let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => {
- // console.log('IPC open hash file to temp finished');
- // if (result) {
- // console.log('Local hash file was opened from temp directory.');
- // return result;
- // } else {
- // console.log('Local hash file was not opened from the temp directory. Something went wrong.');
- // console.log(result);
- // return false;
- // }
- // })
-
- return open_hash_file_to_temp_result;
-}
-
-
-
-
-// Open local file
-// Used by Svelte Event Launcher
-// NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11
-// Updated 2022-03-10
-exports.open_local_file = async function ({local_file_path, filename}) {
- console.log('*** Electron framework export: open_local_file() ***');
- // console.log('Open local file');
- console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`);
-
- // let full_local_file_path = path.join(local_file_path, filename);
- // console.log(full_local_file_path);
-
- // if (fs.existsSync(full_local_file_path)) {
- // console.log(`Local file exists: ${full_local_file_path}`);
- // // return true;
- // } else {
- // return false;
- // }
-
- let open_local_file_result = await ipcRenderer.invoke('open_local_file', local_file_path, filename).then((result) => {
- console.log('IPC open local file finished');
- console.log(result);
- return true;
- })
-
- console.log(open_local_file_result);
- console.log('End: open_local_file()');
- if (open_local_file_result) {
- console.log('File opened successfully');
- return true;
- } else {
- console.log('File was not opened successfully');
- return false;
- }
-}
-
-
-// // Check local file cache and download from server if needed.
-// // Updated 2022-03-09
-// // exports.check_file_cache = async function ({local_file_cache_path, event_file_id, hash}) {
-// exports.check_file_cache = async function ({api_base_url, local_file_cache_path, event_file_id, hash}) {
-// console.log('*** Electron framework export: check_file_cache() ***');
-// // console.log('Check local file cache and download from server if needed.');
-// console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
-// // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
-// let hash_filename = hash+'.file';
-
-// let save_path = path.join(local_file_cache_path, hash_filename);
-// console.log(save_path);
-
-// if (fs.existsSync(save_path)) {
-// console.log('Hashed file cache already exists: '+save_path);
-// return true;
-// } else {
-// console.log('Hashed file not found in local cache. Downloading file: '+save_path);
-// let endpoint = `/event/file/${event_file_id}/download`;
-// let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
-// console.log(result);
-
-// return new Promise((resolve, reject) => {
-// ipcRenderer.once('download_file_reply', function(event, response){
-// console.log(response);
-// return response;
-// })
-// resolve(true);
-// });
-
-// // await ipcRenderer.once('download_file_reply', function(event, response){
-// // console.log(response);
-// // return response;
-// // });
-
-// // result.then(function (response) {
-// // console.log('Downloaded!!!???');
-// // return true;
-// // }).catch(function (error) {
-// // console.log(error);
-// // return false;
-// // });
-
-// // return result;
-
-// // console.log(result);
-// // if (result) {
-// // return true;
-// // } else {
-// // return false;
-// // }
-// }
-// }
-
-
-// Check local file cache and download from server if needed. Must use IPC to Main to download file. Set a Promise to wait for download_file_reply.
-// Updated 2022-03-09
-async function check_file_cache({api_base_url, local_file_cache_path, event_file_id, hash}) {
- console.log('*** Electron framework: check_file_cache() ***');
- // console.log('Check local file cache and download from server if needed.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`);
-
- // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random
- let hash_filename = hash+'.file';
-
- let save_path = path.join(local_file_cache_path, hash_filename);
- console.log(save_path);
-
- if (fs.existsSync(save_path)) {
- console.log('Hashed file cache already exists: '+save_path);
- return true;
- } else {
- console.log('Hashed file not found in local cache. Downloading file: '+save_path);
- let endpoint = `/event/file/${event_file_id}/download`;
- let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread.
- console.log(result);
-
- return new Promise((resolve, reject) => {
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
- return response;
- })
- resolve(true);
- });
-
- // await ipcRenderer.once('download_file_reply', function(event, response){
- // console.log(response);
- // return response;
- // });
-
- // result.then(function (response) {
- // console.log('Downloaded!!!???');
- // return true;
- // }).catch(function (error) {
- // console.log(error);
- // return false;
- // });
-
- // return result;
-
- // console.log(result);
- // if (result) {
- // return true;
- // } else {
- // return false;
- // }
- }
-}
-
-
-// IPC to Main: Open local file cache if available. Copy to temp directory with given filename first.
-// Updated 2022-03-09
-async function open_local_file({local_file_cache_path, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: open_local_file() ***');
- // console.log('Open local file cache if available. Copy to temp directory with given filename first.');
- console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`);
-
- console.log(local_file_cache_path);
- console.log(hash);
- console.log(filename);
-
- let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename);
- console.log(result);
-
- return true;
-}
-
-
-// No longer needed? Not referenced as of 2022-10-11
-exports.check_file_cache_and_open_local_file = async function ({local_file_cache_path, event_file_id, hash, host_file_temp_path, filename}) {
- console.log('*** Electron framework: check_file_cache_and_open_local_file() ***');
- console.log('Checking the local file cache against the remote server and then opening the local file.');
-
- let check_file_cache_result = check_file_cache({local_file_cache_path: local_file_cache_path, event_file_id: event_file_id, hash: hash});
- console.log(check_file_cache_result);
-
- if (check_file_cache_result) {
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- }
-
- ipcRenderer.once('download_file_reply', function(event, response){
- console.log(response);
-
- let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename});
- console.log(open_local_file_result);
-
- return open_local_file_result;
- })
-}
-
-
-// Kill processes
-// Signals: HUP (hang up), INT (interrupt), QUIT (quit), ABRT (abort), KILL (non-catchable, non-ignoraable kill), ALRMn (alarm clock), TERM (default; software termination signal)
-// Updated 2022-05-07
-exports.kill_processes = async function ({process_name = null, process_id = null, signal = null}) {
- console.log('*** Electron framework export: kill_processes() ***');
- console.log(process_name); // process_name or grep pattern
-
- let cmd = '';
- if (os.platform == 'darwin') {
- if (signal == 'HUP') {
- cmd = `killall -HUP '${process_name}'`;
- } else if (signal == 'INT') {
- cmd = `killall -INT '${process_name}'`;
- } else if (signal == 'QUIT') {
- cmd = `killall -QUIT '${process_name}'`;
- } else if (signal == 'ABRT') {
- cmd = `killall -ABRT '${process_name}'`;
- } else if (signal == 'KILL') {
- cmd = `killall -KILL '${process_name}'`;
- } else if (signal == 'ALRM') {
- cmd = `killall -ALRM '${process_name}'`;
- } else if (signal == 'TERM') {
- cmd = `killall -TERM '${process_name}'`;
- } else if (process_id && signal == 'HUP') {
- cmd = `killall -HUP ${process_id}`;
- } else if (process_id && signal == 'INT') {
- cmd = `killall -INT ${process_id}`;
- } else if (process_id && signal == 'QUIT') {
- cmd = `killall -QUIT ${process_id}`;
- } else if (process_id && signal == 'ABRT') {
- cmd = `killall -ABRT ${process_id}`;
- } else if (process_id && signal == 'KILL') {
- cmd = `killall -KILL ${process_id}`;
- } else if (process_id && signal == 'ALRM') {
- cmd = `killall -ALRM ${process_id}`;
- } else if (process_id && signal == 'TERM') {
- cmd = `killall -TERM ${process_id}`;
- } else {
- // cmd = `osascript -e 'quit app "${process_name}" saving no'`;
- cmd = `osascript -e 'quit application "${process_name}" saving no'`;
- }
-
- } else {
- cmd = `pkill ${process_name}`;
- }
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) console.log(err);
- console.log(stdout);
- });
- console.log(`Killed processes matching ${process_name}`);
-
- if (os.platform == 'darwin') {
- if (process_name == 'Parallels:Acrobat Reader') {
- // Regular expression: (Parallels).*(Acrobat Reader)
- // This will find any process with Parallels and Acrobat Reader in the name
- cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels Acrobat Reader process');
- }
-
- if (process_name == 'Parallels:PowerPoint') {
- // Regular expression: (Parallels).*(PowerPoint)
- // This will find any process with Parallels and PowerPoint in the name
- cmd = `pkill -i -f '(Parallels).*(PowerPoint)'`;
-
- child_process.exec(cmd, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- });
- console.log('Killed Parallels PowerPoint process');
- }
- }
-
- // let signal = 'SIGTERM'; // 'SIGTERM', 'SIGINT', 'SIGHUP'
- // process.kill(pid, signal);
- // process.kill(pid, 0); // Special case test if process exists
-
- return true;
-}
-
-
-// Run raw osascript
-// Updated 2022-05-07
-exports.run_osascript = async function ({cmd=null, interactive=false, language=null, flags='h', program_file=null}) {
- console.log('*** Electron framework export: run_osascript() ***');
- console.log(cmd);
-
- if (os.platform == 'darwin') {
- } else {
- console.log('Not available for this platform. macOS (darwin) only.');
- return false;
- }
-
- let osascript_str = '';
-
- if (Array.isArray(cmd)) {
- console.log('List of cmd strings');
- let cmds_str = '';
- for (let i = 0; i < cmd.length; i++) {
- cmds_str += `-e '${cmd[i]}'`;
- }
- osascript_str = `osascript ${cmds_str}`
-
- } else if (typeof cmd === 'string') {
- console.log('Single cmd string');
- osascript_str = `osascript -e '${cmd}'`;
- } else {
- return false;
- }
-
- if (language) {
- console.log(`Language: ${language}`);
- osascript_str = `${osascript_str} -l ${language}`;
- }
-
- if (flags) {
- console.log(`Flags: ${flags}`);
- osascript_str = `${osascript_str} -s ${flags}`;
- }
-
- console.log(`OSA Script String: ${osascript_str}`);
- child_process.exec(osascript_str, (err, stdout, stdin) => {
- if (err) throw err;
- console.log(stdout);
- console.log(stdin);
- });
-
- console.log('Finished');
- return true;
-}
-
-
-// Run raw command
-// Updated 2022-05-07
-exports.run_cmd = async function ({cmd=null, return_stdout=null, return_stdin=null, sync=null}) {
- console.log('*** Electron framework export: run_cmd() ***');
-
- console.log(`Command String: ${cmd}`);
-
- let result;
-
- if (!sync) {
- result = child_process.exec(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) {
- console.log('Error:', err);
- return false;
- };
-
- console.log('stdout:', stdout);
- // console.log('stdin:', stdin);
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
- });
- } else {
- result = child_process.execSync(cmd, (err, stdout, stdin) => {
- // if (err) throw err;
- if (err) {
- console.log('Error:', err);
- return false;
- };
-
- console.log('stdout:', stdout);
- // console.log('stdin:', stdin);
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
- });
- }
-
- console.log('Result:', result);
- return result;
-}
-
-
-// Run raw command sync
-// Updated 2022-05-07
-exports.run_cmd_sync = function ({cmd=null, return_stdout=null, return_stdin=null}) {
- console.log('*** Electron framework export: run_cmd() ***');
-
- console.log(`Command String: ${cmd}`);
-
- let stdout;
-
- try {
- stdout = child_process.execSync(cmd, {encoding: 'utf8'});
- console.log('Std Out:', stdout);
- } catch (err) {
- console.error('Error:', err);
- return false;
- }
-
- if (return_stdout) {
- console.log('Finished and returning stdout');
- return stdout;
- } else {
- console.log('Finished and returning true');
- return true;
- }
-
- // let result;
- // let stdout;
- // let stderr;
- // try {
- // let { stdout, stderr } = child_process.execSync(cmd, (err, stdout, stdin) => {
- // // if (err) throw err;
- // if (err) {
- // console.log('Error:', err);
- // return false;
- // };
-
- // console.log('stdout:', stdout);
- // // console.log('stdin:', stdin);
-
- // if (return_stdout) {
- // console.log('Finished and returning stdout');
- // return stdout;
- // } else {
- // console.log('Finished and returning true');
- // return true;
- // }
- // });
- // } catch (err) {
- // console.error(err);
- // return false;
- // }
-
- // console.log('Result:', result);
- // return result;
-}
-
-
-// Run raw command
-// Updated 2022-05-25
-exports.get_device_info = async function () {
- console.log('*** Electron framework export: get_device_info() ***');
-
- // https://nodejs.org/api/os.html
-
- let data = {};
- data['arch'] = os.arch();
- data['hostname'] = os.hostname();
- data['cpus'] = os.cpus();
- data['freemem'] = os.freemem();
- data['totalmem'] = os.totalmem();
- data['loadavg'] = os.loadavg();
- data['networkInterfaces'] = os.networkInterfaces();
- data['platform'] = os.platform();
- data['release'] = os.release();
- data['uptime'] = os.uptime();
- data['version'] = os.version();
-
- console.log(data);
- return data;
-}
-
-
-
-// For loading JS file
-function loadJS(){
-
- // Gives -1 when the given input is not in the string
- // i.e this file has not been added
-
- if(filesAdded.indexOf('script.js') !== -1)
- return
-
- // Head tag
- var head = document.getElementsByTagName('head')[0]
-
- // Creating script element
- var script = document.createElement('script')
- script.src = 'script.js'
- script.type = 'text/javascript'
-
- // Adding script element
- head.append(script)
-
- // Adding the name of the file to keep record
- filesAdded += ' script.js'
-}
-
-// To load CSS file
-function loadCSS() {
-
- if(filesAdded.indexOf('styles.css') !== -1)
- return
-
- var head = document.getElementsByTagName('head')[0]
-
- // Creating link element
- var style = document.createElement('link')
- style.href = 'styles.css'
- style.type = 'text/css'
- style.rel = 'stylesheet'
- head.append(style);
-
- // Adding the name of the file to keep record
- filesAdded += ' styles.css'
-}
-
-
-
-exports.check_and_get_updated_native_app_config = function ({file_path='device_configs/ae_native_app_config.default.json', overwrite=false}) {
- console.log('*** Aether App Native export: check_and_get_updated_native_app_config() ***');
-
- if (os.platform == 'darwin') {
- let default_osit_sync_app_config_path = path.join(default_osit_sync_app_root_path, file_path);
-
- let default_app_config_path = path.join(app_root_path, 'ae_native_app_config.default.json');
- console.log('macOS app root and config directory: '+default_app_config_path);
-
- fs.copyFileSync(default_osit_sync_app_config_path, default_app_config_path);
-
- if (overwrite) {
- console.log('Overwriting the current active config file...');
- let active_app_config_path = path.join(app_root_path, 'ae_native_app_config.json');
- console.log('macOS app root and config directory: '+active_app_config_path);
-
- fs.copyFileSync(default_osit_sync_app_config_path, active_app_config_path);
- }
- } else if (os.platform == 'linux') {
- app_root_path = path.join(home_directory, '.config/OSIT');
- console.log('Linux config directory: '+app_root_path);
- return false;
- } else {
- console.log('Unknown OS... Is this Windows?');
- return false;
- }
-
- return true;
-}
\ No newline at end of file
diff --git a/app/script.js b/app/script.js
deleted file mode 100644
index e69de29..0000000
diff --git a/app/style.css b/app/style.css
deleted file mode 100644
index e69de29..0000000
diff --git a/app/style.current.css b/app/style.current.css
deleted file mode 100644
index cbebafa..0000000
--- a/app/style.current.css
+++ /dev/null
@@ -1,28 +0,0 @@
-body {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-
- /* margin: .1em;
- padding: .1em; */
-}
-
-section#Main-Body {
- /* outline: solid thin red; */
-
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
-
-section#Main-Nav-Menu {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
-
-section#Main-Content {
- /* min-height: 100%;
- height: 100%;
- max-height: 100%; */
-}
\ No newline at end of file
diff --git a/app/test.html b/app/test.html
deleted file mode 100644
index a0ee9ca..0000000
--- a/app/test.html
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
- One Sky IT's Aether App
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- System-Notifications (and Site-Notifications)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dist/main/api_client.js b/dist/main/api_client.js
new file mode 100644
index 0000000..652a239
--- /dev/null
+++ b/dist/main/api_client.js
@@ -0,0 +1,69 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fetchFullConfig = fetchFullConfig;
+async function fetchFullConfig(seed) {
+ const apiUrls = [
+ seed.onsite_api_base_url,
+ seed.primary_api_base_url,
+ seed.backup_api_base_url
+ ].filter(url => url !== null && url !== undefined);
+ let lastError = null;
+ for (const baseUrl of apiUrls) {
+ try {
+ console.log(`Bootstrap: Attempting connection to ${baseUrl}...`);
+ // --- STEP 1: Get Device Config ---
+ const deviceUrl = `${baseUrl}/v3/crud/event_device/${seed.event_device_id}`;
+ const deviceResponse = await fetch(deviceUrl, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-aether-api-key': seed.aether_api_key,
+ 'x-no-account-id': 'Nothing to See Here'
+ },
+ });
+ if (!deviceResponse.ok) {
+ throw new Error(`Device lookup failed (${deviceResponse.status})`);
+ }
+ const deviceResult = await deviceResponse.json();
+ const deviceData = deviceResult.data || deviceResult;
+ // Use 'app_base_url' as the FQDN for the site lookup
+ const fqdn = deviceData.app_base_url || 'native-demo.oneskyit.com';
+ console.log(`Bootstrap Step 1 Success: Device identified. FQDN to use: ${fqdn}`);
+ // --- STEP 2: Get Site Context ---
+ const searchUrl = `${baseUrl}/v3/crud/site_domain/search`;
+ const siteResponse = await fetch(searchUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-aether-api-key': seed.aether_api_key,
+ 'x-no-account-id': 'Nothing to See Here',
+ 'x-account-id': deviceData.account_id_random || deviceData.account_id || ''
+ },
+ body: JSON.stringify({
+ search_query: {
+ and: [{ field: 'fqdn', op: 'eq', value: fqdn }]
+ },
+ limit: 1
+ })
+ });
+ if (!siteResponse.ok) {
+ throw new Error(`Site context lookup failed (${siteResponse.status})`);
+ }
+ const siteResult = await siteResponse.json();
+ const siteDomain = (siteResult.data && siteResult.data.length > 0) ? siteResult.data[0] : null;
+ console.log(`Bootstrap Success using ${baseUrl}`);
+ return {
+ ...siteDomain,
+ native_device: deviceData
+ };
+ }
+ catch (error) {
+ console.warn(`Bootstrap failed for ${baseUrl}: `, error);
+ lastError = error;
+ continue; // Try next URL
+ }
+ }
+ console.error('Bootstrap Critical Failure: All API endpoints exhausted.', lastError);
+ return null;
+}
+//# sourceMappingURL=api_client.js.map
\ No newline at end of file
diff --git a/dist/main/api_client.js.map b/dist/main/api_client.js.map
new file mode 100644
index 0000000..250e999
--- /dev/null
+++ b/dist/main/api_client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"api_client.js","sourceRoot":"","sources":["../../src/main/api_client.ts"],"names":[],"mappings":";;AAEA,0CA4EC;AA5EM,KAAK,UAAU,eAAe,CAAC,IAAgB;IACpD,MAAM,OAAO,GAAG;QACd,IAAI,CAAC,mBAAmB;QACxB,IAAI,CAAC,oBAAoB;QACzB,IAAI,CAAC,mBAAmB;KACzB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAa,CAAC;IAE/D,IAAI,SAAS,GAAQ,IAAI,CAAC;IAE1B,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,uCAAuC,OAAO,KAAK,CAAC,CAAC;YAEjE,oCAAoC;YACpC,MAAM,SAAS,GAAG,GAAG,OAAO,yBAAyB,IAAI,CAAC,eAAe,EAAE,CAAC;YAC5E,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE;gBAC5C,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,kBAAkB,EAAE,IAAI,CAAC,cAAc;oBACvC,iBAAiB,EAAE,qBAAqB;iBACzC;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,yBAAyB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;YACrE,CAAC;YAED,MAAM,YAAY,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC;YACjD,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,IAAI,YAAY,CAAC;YAErD,qDAAqD;YACrD,MAAM,IAAI,GAAG,UAAU,CAAC,YAAY,IAAI,0BAA0B,CAAC;YACnE,OAAO,CAAC,GAAG,CAAC,6DAA6D,IAAI,EAAE,CAAC,CAAC;YAEjF,mCAAmC;YACnC,MAAM,SAAS,GAAG,GAAG,OAAO,6BAA6B,CAAC;YAC1D,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE;gBAC1C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,kBAAkB,EAAE,IAAI,CAAC,cAAc;oBACvC,iBAAiB,EAAE,qBAAqB;oBACxC,cAAc,EAAE,UAAU,CAAC,iBAAiB,IAAI,UAAU,CAAC,UAAU,IAAI,EAAE;iBAC5E;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,YAAY,EAAE;wBACZ,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;qBAChD;oBACD,KAAK,EAAE,CAAC;iBACT,CAAC;aACH,CAAC,CAAC;YAEH,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;YACzE,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAC;YAC7C,MAAM,UAAU,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAE/F,OAAO,CAAC,GAAG,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;YAElD,OAAO;gBACL,GAAG,UAAU;gBACb,aAAa,EAAE,UAAU;aAC1B,CAAC;QAEJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,wBAAwB,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC;YACzD,SAAS,GAAG,KAAK,CAAC;YAClB,SAAS,CAAC,eAAe;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,0DAA0D,EAAE,SAAS,CAAC,CAAC;IACrF,OAAO,IAAI,CAAC;AACd,CAAC"}
\ No newline at end of file
diff --git a/dist/main/config_loader.js b/dist/main/config_loader.js
new file mode 100644
index 0000000..2ac4594
--- /dev/null
+++ b/dist/main/config_loader.js
@@ -0,0 +1,62 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.loadSeedConfig = loadSeedConfig;
+const fs = __importStar(require("fs"));
+const path = __importStar(require("path"));
+const os = __importStar(require("os"));
+async function loadSeedConfig() {
+ // For development, we look in the home directory
+ const configPath = path.join(os.homedir(), 'seed.json');
+ try {
+ if (!fs.existsSync(configPath)) {
+ console.log(`Seed config not found at: ${configPath}`);
+ return null;
+ }
+ const data = fs.readFileSync(configPath, 'utf-8');
+ const config = JSON.parse(data);
+ // Basic validation
+ if (!config.event_device_id) {
+ console.error('Invalid seed config: missing event_device_id');
+ return null;
+ }
+ return config;
+ }
+ catch (error) {
+ console.error('Error loading seed config:', error);
+ return null;
+ }
+}
+//# sourceMappingURL=config_loader.js.map
\ No newline at end of file
diff --git a/dist/main/config_loader.js.map b/dist/main/config_loader.js.map
new file mode 100644
index 0000000..1d3e3c3
--- /dev/null
+++ b/dist/main/config_loader.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"config_loader.js","sourceRoot":"","sources":["../../src/main/config_loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wCAwBC;AA7BD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAGlB,KAAK,UAAU,cAAc;IAClC,iDAAiD;IACjD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;IAExD,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,6BAA6B,UAAU,EAAE,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAe,CAAC;QAE9C,mBAAmB;QACnB,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;YAC5B,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAC9D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/dist/main/index.js b/dist/main/index.js
new file mode 100644
index 0000000..5596a18
--- /dev/null
+++ b/dist/main/index.js
@@ -0,0 +1,99 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+const electron_1 = require("electron");
+const path = __importStar(require("path"));
+const config_loader_1 = require("./config_loader");
+const api_client_1 = require("./api_client");
+let mainWindow = null;
+let cachedSeed = null;
+let cachedFullConfig = null;
+async function createWindow() {
+ // 1. Initial Load of Configs
+ cachedSeed = await (0, config_loader_1.loadSeedConfig)();
+ if (cachedSeed) {
+ cachedFullConfig = await (0, api_client_1.fetchFullConfig)(cachedSeed);
+ }
+ mainWindow = new electron_1.BrowserWindow({
+ width: 1400,
+ height: 900,
+ title: 'OSIT Aether Launcher (Native)',
+ webPreferences: {
+ preload: path.join(__dirname, '../preload/index.js'),
+ contextIsolation: true,
+ nodeIntegration: false,
+ },
+ });
+ // Prioritize demo.localhost for local development
+ const devUrl = 'http://demo.localhost:5173';
+ // Fallback URL if local is offline
+ const fallbackUrl = 'https://dev-demo.oneskyit.com/';
+ console.log(`Loading UI from: ${devUrl}`);
+ mainWindow.loadURL(devUrl).catch(() => {
+ console.warn(`Failed to load ${devUrl}. Falling back to ${fallbackUrl}`);
+ mainWindow?.loadURL(fallbackUrl);
+ });
+ mainWindow.on('closed', () => {
+ mainWindow = null;
+ });
+}
+electron_1.app.on('ready', createWindow);
+electron_1.app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') {
+ electron_1.app.quit();
+ }
+});
+electron_1.app.on('activate', () => {
+ if (mainWindow === null) {
+ createWindow();
+ }
+});
+// IPC Handlers
+electron_1.ipcMain.handle('get-seed-config', async () => {
+ return cachedSeed || await (0, config_loader_1.loadSeedConfig)();
+});
+electron_1.ipcMain.handle('get-device-config', async () => {
+ if (cachedFullConfig)
+ return cachedFullConfig;
+ if (cachedSeed) {
+ cachedFullConfig = await (0, api_client_1.fetchFullConfig)(cachedSeed);
+ return cachedFullConfig;
+ }
+ return null;
+});
+electron_1.ipcMain.handle('get-jwt', async () => {
+ return null;
+});
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/main/index.js.map b/dist/main/index.js.map
new file mode 100644
index 0000000..70256a4
--- /dev/null
+++ b/dist/main/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuD;AACvD,2CAA6B;AAC7B,mDAAiD;AACjD,6CAA+C;AAG/C,IAAI,UAAU,GAAyB,IAAI,CAAC;AAC5C,IAAI,UAAU,GAAsB,IAAI,CAAC;AACzC,IAAI,gBAAgB,GAAQ,IAAI,CAAC;AAEjC,KAAK,UAAU,YAAY;IACzB,6BAA6B;IAC7B,UAAU,GAAG,MAAM,IAAA,8BAAc,GAAE,CAAC;IACpC,IAAI,UAAU,EAAE,CAAC;QACf,gBAAgB,GAAG,MAAM,IAAA,4BAAe,EAAC,UAAU,CAAC,CAAC;IACvD,CAAC;IAED,UAAU,GAAG,IAAI,wBAAa,CAAC;QAC7B,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,+BAA+B;QACtC,cAAc,EAAE;YACd,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC;YACpD,gBAAgB,EAAE,IAAI;YACtB,eAAe,EAAE,KAAK;SACvB;KACF,CAAC,CAAC;IAEH,kDAAkD;IAClD,MAAM,MAAM,GAAG,4BAA4B,CAAC;IAC5C,mCAAmC;IACnC,MAAM,WAAW,GAAG,gCAAgC,CAAC;IAErD,OAAO,CAAC,GAAG,CAAC,oBAAoB,MAAM,EAAE,CAAC,CAAC;IAE1C,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;QACpC,OAAO,CAAC,IAAI,CAAC,kBAAkB,MAAM,qBAAqB,WAAW,EAAE,CAAC,CAAC;QACzE,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,UAAU,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,cAAG,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AAE9B,cAAG,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC/B,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,cAAG,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,cAAG,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE;IACtB,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,YAAY,EAAE,CAAC;IACjB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,kBAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;IAC3C,OAAO,UAAU,IAAI,MAAM,IAAA,8BAAc,GAAE,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,kBAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;IAC7C,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IAC9C,IAAI,UAAU,EAAE,CAAC;QACf,gBAAgB,GAAG,MAAM,IAAA,4BAAe,EAAC,UAAU,CAAC,CAAC;QACrD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC;AAEH,kBAAO,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACnC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/dist/preload/index.js b/dist/preload/index.js
new file mode 100644
index 0000000..38d7869
--- /dev/null
+++ b/dist/preload/index.js
@@ -0,0 +1,10 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const electron_1 = require("electron");
+electron_1.contextBridge.exposeInMainWorld('aetherNative', {
+ getSeedConfig: () => electron_1.ipcRenderer.invoke('get-seed-config'),
+ getDeviceConfig: () => electron_1.ipcRenderer.invoke('get-device-config'),
+ getJWT: () => electron_1.ipcRenderer.invoke('get-jwt'),
+ log: (message) => console.log('[Native Log]', message),
+});
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/preload/index.js.map b/dist/preload/index.js.map
new file mode 100644
index 0000000..be7eba0
--- /dev/null
+++ b/dist/preload/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preload/index.ts"],"names":[],"mappings":";;AAAA,uCAAsD;AAEtD,wBAAa,CAAC,iBAAiB,CAAC,cAAc,EAAE;IAC9C,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAW,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAC1D,eAAe,EAAE,GAAG,EAAE,CAAC,sBAAW,CAAC,MAAM,CAAC,mBAAmB,CAAC;IAC9D,MAAM,EAAE,GAAG,EAAE,CAAC,sBAAW,CAAC,MAAM,CAAC,SAAS,CAAC;IAC3C,GAAG,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC;CAC/D,CAAC,CAAC"}
\ No newline at end of file
diff --git a/dist/shared/types.js b/dist/shared/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/dist/shared/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/dist/shared/types.js.map b/dist/shared/types.js.map
new file mode 100644
index 0000000..aff6fd6
--- /dev/null
+++ b/dist/shared/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/index.js b/index.js
deleted file mode 100644
index f7f7279..0000000
--- a/index.js
+++ /dev/null
@@ -1,586 +0,0 @@
-const { app, BrowserWindow, ipcMain, shell, systemPreferences } = require('electron');
-
-
-const axios = require('axios');
-const crypto = require('crypto');
-const fs = require('fs');
-const os = require('os');
-const path = require('path');
-const process = require('process');
-const { strict } = require('assert');
-
-//const http = require('http');
-//const request = require('request');
-//const url = require('url');
-// const usb = require('usb') // Compiled with an old version of Node.js
-
-console.log(`OS: ${os.type()} ${process.getSystemVersion()}`);
-// console.log(process.getSystemVersion());
-
-let home_directory = require('os').homedir();
-console.log('Home: '+home_directory);
-
-let tmp_directory = require('os').tmpdir();
-console.log('Temporary: '+tmp_directory);
-
-// Set the config path for macOS or Linux
-let config_directory = 'OSIT/native_app';
-let config_filename = 'ae_native_app_sk_config.json';
-let config_path = '';
-
-let local_file_cache_path = null;
-let host_file_temp_path = null;
-
-let endpoints_in_progress = [];
-
-/* Look for and load a JSON formatted config file. */
-if (os.platform == 'darwin') {
- let config_path_default = path.join(home_directory, config_directory, config_filename);
- let config_path_macos = path.join(home_directory, 'Library/Application Support/OSIT', config_filename);
- // let config_path_opt2 = path.join(home_directory, 'OSIT', config_filename);
-
- if (fs.existsSync(config_path_default)) {
- console.log('Default config file path exists: '+config_path_default);
- config_path = config_path_default;
- } else if (fs.existsSync(config_path_macos)) {
- console.log('macOS config file path exists: '+config_path_macos);
- config_path = config_path_macos;
- } else {
- console.log(`No config file found: ${config_path_default} or ${config_path_macos}`);
- config_path = '';
- // fs.mkdirSync(config_file_directory_path, true);
- // console.log('Config directory path created: '+config_file_directory_path);
- }
-
- console.log(`Using config found on macOS: ${config_path}`);
-} else if (os.platform == 'linux') {
- let config_path_default = path.join(home_directory, config_directory, config_filename);
- let config_path_linux_os = path.join(home_directory, '.config/OSIT', config_filename);
- let config_path_temp = path.join(home_directory, 'tmp/OSIT', config_filename);
-
- if (fs.existsSync(config_path_default)) {
- console.log('Default config file path exists: '+config_path_default);
- config_path = config_path_default;
- } else if (fs.existsSync(config_path_linux_os)) {
- console.log('Linux config file path exists: '+config_path_linux_os);
- config_path = config_path_linux_os;
- } else if (fs.existsSync(config_path_temp)) {
- console.log('Temp config file path exists: '+config_path_temp);
- config_path = config_path_temp;
- } else {
- console.log(`No config file found: ${config_path_default} or ${config_path_linux_os} or ${config_path_temp}`);
- config_path = '';
- }
-
- console.log(`Using config found on Linux: ${config_path}`);
-}
-
-let config = JSON.parse(fs.readFileSync(config_path));
-console.log('Config file read.', config);
-/*
-Minimal configuration contains:
-* conf_file_check_path = '~/OSIT/sync/admin_share/internal/ae_osit_app.default.conf'
-* conf_file_check_path_backup = 'ae_osit_app.conf'
-
-* api_pref_use = 'local' or 'remote' or 'backup'
-* api_base_url_local = https://local-api.oneskyit.com
-* api_base_url_remote = https://api.oneskyit.com
-* api_base_url_backup = https://bak-api.oneskyit.com
-
-* app_pref_use = 'local' or 'remote' or 'backup'
-* app_base_url_local = https://local-demo.oneskyit.com
-* app_base_url_remote = https://demo.oneskyit.com
-* app_base_url_backup = https://bak-demo.oneskyit.com
-
-* device_id = 'abcd1234'
-*/
-
-
-/*
-Ask for permissions from macOS to use the microphone, screen, camera. The OS may delay actually asking for permission until the permission is actually attempted to be used. It may be worth doing a test attempt early on if access has not already been granted. -STI 2023-06-03
-*/
-if (os.type == 'Darwin') {
- if (systemPreferences.getMediaAccessStatus('microphone') != 'granted') {
- systemPreferences.askForMediaAccess('microphone');
- } else {
- console.log('Microphone access:', systemPreferences.getMediaAccessStatus('microphone'));
- }
-
- if (systemPreferences.getMediaAccessStatus('screen') != 'granted') {
- systemPreferences.askForMediaAccess('screen');
- } else {
- console.log('Screen access:', systemPreferences.getMediaAccessStatus('screen'));
- }
-
- if (systemPreferences.getMediaAccessStatus('camera') != 'granted') {
- systemPreferences.askForMediaAccess('camera');
- } else {
- console.log('Camera access:', systemPreferences.getMediaAccessStatus('camera'));
- }
-}
-
-
-
-async function get_url_cfg() {
- let base_url = `${config.api_protocol}://${config.api_server}:${config.api_port}/${config.api_path}`;
-
- let axios_api = axios.create({
- baseURL: base_url,
- timeout: 60000, // in milliseconds; 60000 = 60 seconds
- /* other custom settings */
- });
- // axios_api.defaults.headers = config['headers'];
-
- // axios.defaults.baseURL = `${config.api_protocol}://${config.api_server}:${config.api_port}/${config.api_path}`;
- axios_api.defaults.headers.common['Access-Control-Allow-Origin'] = config.access_control_allow_origin; // '*'; // app_config.access_control_allow_origin;
- axios_api.defaults.headers.common['content-type'] = 'application/json';
- axios_api.defaults.headers.common['x-aether-api-key'] = config.api_secret_key;
- // axios_api.defaults.headers.common['x-account-id'] = config.account_id ?? 'xFP7AhU8Zlc';
- axios_api.defaults.headers.common['x-no-account-id'] = 'nothing to see here';
-
- let event_device_id = config.event_device_id ?? 'dbgMWS3KEHE';
- // let endpoint = `/event/device/${event_device_id}`;
- let endpoint = `/v2/crud/event/device/${event_device_id}`;
-
- let params = {
- inc_event_cfg: false,
- inc_event_location: false,
- enabled: 'enabled',
- };
-
- let response_data_promise = await axios_api.get(
- endpoint,
- {
- params: params,
- onDownloadProgress: (progressEvent) => {
- let percent_completed = Math.round(
- (progressEvent.loaded * 100) / progressEvent.total
- );
- console.log('GET Data Timestamp:', progressEvent.timeStamp, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed);
-
- // temp_get_object_percent_completed = percent_completed;
- }
- }
- )
- .then(function (response) {
- console.log(`Response: ${response}`);
-
- let return_data = response.data['data'];
- if (Array.isArray(return_data)) {
- console.log(`Data result is an array/list. Array length: ${return_data.length}`);
- } else {
- console.log(`Data result is a dictionary/object, not an array/list.`);
- }
- return return_data;
- })
- .catch(function (error) {
- console.log(`Base URL: ${base_url} | Endpoint: ${endpoint}`);
-
- console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion???
- if (error.response) {
- console.log(`Response Status: ${error.response.status}; Status Text: ${error.response.statusText}`);
- } else {
- console.log('Error:', error);
- }
-
- console.log('Full Error:', error);
-
- if (error.response && error.response.status === 404) {
- return null; // Returning null since there were no results
- }
- return false; // Returning false since something may have gone wrong. Also more in line with what the API returns.
- });
-
- return response_data_promise;
-}
-
-let new_config = get_url_cfg();
-console.log(new_config);
-
-
-
-
-function createWindow () {
- // Create the browser window.
- win = new BrowserWindow({
- height: config.height ?? 720,
- width: config.width ?? 1280,
- backgroundColor: '#aaa',
- icon: './app/img/favicon.ico',
- webPreferences: {
- contextIsolation: false,
- nodeIntegration: true,
- nodeIntegrationInWorker: true,
- enableRemoteModule: true
- }
- })
-
- // win.setMinimumSize(1024, 768);
- // win.setMinimumSize(1280, 768);
- win.setMinimumSize(1400, 768);
-
- //win.setFullScreenable(false)
- win.FullScreenable = false;
-
- // win.webContents.session.clearStorageData(['filesystem']); // Does this do anything???
-
- // native_app_which_html = 'default', 'path', 'url'
- // 'default' (url) is within the bundled native app
- // 'path' (external to app) is a file path on the host, probably under the home directory
- // 'url' is over HTTPS, maybe onsite or offsite
- // unknown points to an index.html file in the app directory
-
- // Load the index.html of the app
- if (config.native_app_which_html == '' || config.native_app_which_html == 'default') {
- // win.loadFile('app/index.html');
- let index_url = config.native_app_index_url ?? 'https://oneskyit.com/';
- win.loadURL(index_url);
- } else if (config.native_app_which_html == 'path') {
- let index_path = '';
-
- if (config.native_app_index_path) {
- index_path = config.native_app_index_path.replace('[home]', home_directory);
- } else {
- index_path = path.join(home_directory, 'OSIT/native_app/app/index.html');
- }
- win.loadFile(index_path);
- } else if (config.native_app_which_html == 'url') {
- let index_url = config.native_app_index_url ?? 'https://oneskyit.com/';
- win.loadURL(index_url);
- } else {
- win.loadFile('app/index.html');
- }
-
- // Open the DevTools.
- if (config.developer_tools) {
- win.webContents.openDevTools(); // Comment out for production
- }
-
- // Emitted when the window is closed.
- win.on('closed', () => {
- // Dereference the window object, usually you would store windows
- // in an array if your app supports multi windows, this is the time
- // when you should delete the corresponding element.
- win = null;
- })
-
- win.on('minimize', () => {
- //win.restore();
- })
-}
-
-
-// This method will be called when Electron has finished
-// initialization and is ready to create browser windows.
-// Some APIs can only be used after this event occurs.
-app.on('ready', createWindow);
-
-
-// Quit when all windows are closed.
-app.on('window-all-closed', () => {
- // On macOS it is common for applications and their menu bar
- // to stay active until the user quits explicitly with Cmd + Q
- if (process.platform !== 'darwin') {
- if (win) {
- win.close();
- }
- app.quit();
- }
-})
-
-
-app.on('activate', () => {
- // On macOS it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.location_files
- if (win === null) {
- createWindow();
- }
-})
-
-
-// Import config data
-// Updated 2022-04-16
-ipcMain.handle('import_config', async (event, config_data) => {
- console.log('*** Electron IPC Main: import_config() ***');
- // console.log('ipcMain on download_file: api_base_url='+api_base_url+' | api_temporary_token='+api_temporary_token);
- console.log('ipcMain on import_config:');
- console.log(config_data);
-
- config = config_data;
-
- local_file_cache_path = config.local_file_cache_path;
- host_file_temp_path = config.host_file_temp_path;
-
- if (fs.existsSync(local_file_cache_path)) {
- console.log('Host file cache path exists: '+local_file_cache_path);
- } else {
- fs.mkdirSync(local_file_cache_path, true);
- console.log('Host file cache path created: '+local_file_cache_path);
- }
-
- if (fs.existsSync(host_file_temp_path)) {
- console.log('Host file temp path exists: '+host_file_temp_path);
- } else {
- fs.mkdirSync(host_file_temp_path, true);
- console.log('Host file temp path created: '+host_file_temp_path);
- }
-
- return true;
-});
-
-
-// Download file to path
-// full_save_path should be the full path that includes the filename
-// Updated 2023-05-14
-ipcMain.handle('download_file', async (event, api_base_url, api_endpoint, full_save_path, hash=null, verify_hash=false, overwrite_existing=false, offset_minutes=3) => {
- console.log('*** Electron IPC Main: download_file() ***');
- // console.log('ipcMain on download_file: api_base_url='+api_base_url+' | api_temporary_token='+api_temporary_token);
- // console.log('ipcMain on download_file: api_base_url='+api_base_url);
- console.log(`ipcMain download and save file: HTTP ${api_endpoint} -> FILE ${full_save_path}`);
- if (!api_base_url) {
- console.log('API Base URL is required. Returning false');
- return false;
- }
-
- axios.defaults.baseURL = api_base_url;
- axios.defaults.headers.common['Access-Control-Allow-Origin'] = config.access_control_allow_origin; // '*'; // app_config.access_control_allow_origin;
- axios.defaults.headers.common['content-type'] = 'application/json';
- axios.defaults.headers.common['x-aether-api-key'] = config.api_secret_key;
- axios.defaults.headers.common['x-account-id'] = config.account_id;
-
- const url = api_endpoint;
-
- const tmp_full_save_path = full_save_path+'.tmp';
-
- if (fs.existsSync(tmp_full_save_path)) {
- console.log(`A temp download file was found! ${tmp_full_save_path}`);
-
- let stats = null;
- try {
- stats = fs.statSync(tmp_full_save_path);
-
- // console.log(`File Accessed Last: ${stats.atime}`); // File data last changed (actual contents)
- console.log(`File Data Last Modified: ${stats.mtime}`); // File data last changed (actual contents)
- console.log(`File Metadata Last Modified: ${stats.ctime}`); // File metadata last changed (filename, permissions, etc)
- } catch (error) {
- console.log(error);
- }
-
- let current_datetime = new Date();
- // In minutes. After 5ish minutes of no changes to the file content seems reasonable? Tested with 3 minutes for multiple meetings and no noticable problem.
- let offset_datetime = new Date(current_datetime.getTime() - offset_minutes*60000);
-
- // console.log(`Times: ${current_datetime} ${offset_datetime} | File ${stats.mtime}`);
- if (stats.mtime < offset_datetime) {
- console.log(`Marking as expired temp file based on modified datetime. Expire after: ${offset_minutes} minutes`);
- overwrite_existing = true;
- } else {
- console.log(`Temp download file has not expired yet. Expire after: ${offset_minutes} minutes`);
- // return false;
- return 'tmp';
- }
- }
- if (fs.existsSync(full_save_path)) {
- console.log(`A cached file was found! ${full_save_path}`);
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_save_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- } else {
- console.log('File hash does not match', file_hash_sha256_check);
- if (overwrite_existing) {
- console.log('Going to overwrite the existing file because the hash does not match.');
- } else {
- return false;
- }
- }
- }
- // return false;
- }
-
- console.log('Endpoints in Progress:', endpoints_in_progress);
- if (endpoints_in_progress.includes(api_endpoint)) {
- console.log(`Endpoint already being downloaded: ${api_endpoint}`);
- // return false;
- return 'in_progress';
- }
- // console.log(`Done with checks. Time to download! Endpoint: ${api_endpoint}`);
- endpoints_in_progress.push(api_endpoint);
-
- let download_result = await axios({
- method: 'get',
- url: url,
- responseType: 'stream' /* responseType must be stream */
- }).then(function (response) {
- console.log(`Creating write stream for downloading endpoint: ${api_endpoint}`);
- const writer = fs.createWriteStream(tmp_full_save_path);
-
- return new Promise((resolve, reject) => {
- response.data.pipe(writer);
- let error = null;
- writer.on('error', err => {
- console.log('Writer error!');
- error = err;
- console.log(error);
- writer.close();
- reject(err);
- });
- writer.on('close', () => {
-
- if (!error) {
- // console.log(`Download complete! Writer closed.`);
- resolve(true);
- } else {
- console.log('Writer closed unexpectedly!', error);
- }
- //no need to call the reject here, as it will have been called in the
- //'error' stream;
- });
- });
- })
- .then(function (response) {
- console.log(`Download complete. Temporary file moved/renamed: ${full_save_path}`);
- fs.renameSync(tmp_full_save_path, full_save_path);
-
- for( let i = 0; i < endpoints_in_progress.length; i++){
- if ( endpoints_in_progress[i] === api_endpoint) {
- endpoints_in_progress.splice(i, 1);
- // NOTE: Decrement the index variable so it does not skip the next item in the array.
- i--;
- }
- }
- return true;
- })
- .catch(function (error) {
- console.log(`Error downloading! Endpoint: ${api_endpoint}`);
-
- for( let i = 0; i < endpoints_in_progress.length; i++){
- if ( endpoints_in_progress[i] === api_endpoint) {
- endpoints_in_progress.splice(i, 1);
- // NOTE: Decrement the index variable so it does not skip the next item in the array.
- i--;
- }
- }
-
- if (error.response) {
- console.log(`Response Status: ${error.response.status}; Status Text: ${error.response.statusText}`);
- } else {
- console.log('Error:', error);
- }
-
- if (error.response && error.response.status === 404) {
- return null; // Returning null since there were no results
- }
- return false; // Returning false since something may have gone wrong. Also more in line with what the API returns.
- });
- // console.log(`Done with download function! Endpoint: ${api_endpoint}`);
-
- return download_result;
-});
-
-
-ipcMain.handle('open_hash_file_to_temp', async (event, local_file_cache_path, hash, host_file_temp_path, filename, verify_hash=true) => {
- console.log('*** Electron IPC Main: open_hash_file_to_temp() ***');
- console.log('ipcMain on open_hash_file_to_temp');
- console.log(`ipcMain open hash file from temp directory: ${local_file_cache_path} -> ${host_file_temp_path}/${filename}`);
-
- // NOTE: This may be needed later? Uncomment if paths are relative to working directory.
- // let cache_file_path = path.join(process.cwd(), local_file_cache_path);
- let cache_file_path = local_file_cache_path;
- console.log(cache_file_path);
-
- let hash_filename = hash+'.file';
- let full_cache_file_path = path.join(cache_file_path, hash_filename);
- console.log(full_cache_file_path);
-
- // NOTE: This may be needed later? Uncomment if paths are relative to working directory.
- // open_temp_file_path = path.join(process.cwd(), host_file_temp_path, filename); // 'temp/'
- open_temp_file_path = path.join(host_file_temp_path, filename); // 'temp/'
- console.log(open_temp_file_path);
-
- if (fs.existsSync(open_temp_file_path)) {
- console.log('A file with the same name already exists in the local temp directory: '+open_temp_file_path);
- // NOTE: Should the file be checked to see if it has changed from the hashed cache version???
- // NOTE: What if they made changes to the file locally in temp? The changed file would be used since a new copy is not being made.
- // NOTE: It might make sense for this to be a configurable option depending on the group. Some do not allow changes. This helps enforce that.
- }
-
- if (fs.existsSync(full_cache_file_path)) {
- // console.log(`Hashed file exists in cache: ${full_cache_file_path}`);
- console.log(`Copying file to temp: ${open_temp_file_path}`);
- try {
- fs.copyFileSync(full_cache_file_path, open_temp_file_path);
- } catch (error) {
- console.error(error);
- return false;
- }
-
- if (verify_hash) {
- const file_buffer = fs.readFileSync(full_cache_file_path);
- const file_hash_sha256 = crypto.createHash('sha256');
- file_hash_sha256.update(file_buffer);
-
- const file_hash_sha256_check = file_hash_sha256.digest('hex');
- if (file_hash_sha256_check == hash) {
- // console.log('File hash match', file_hash_sha256_check);
- } else {
- console.log('File hash does not match', file_hash_sha256_check);
- return false;
- }
- }
-
- // console.log('Creating file link: '+open_temp_file_path);
- // fs.linkSync(full_cache_file_path, open_temp_file_path);
- } else {
- console.log(`Hashed file not found in cache: ${full_cache_file_path}`);
- return false;
- }
-
- try {
- await shell.openPath(open_temp_file_path);
- } catch (error) {
- console.error(error);
- return false;
- }
-
- console.log('End: Electron IPC Main: open_hash_file_to_temp()');
- return true;
-});
-
-
-ipcMain.handle('open_local_file', async (event, local_file_path, filename, use_cwd=true) => {
- console.log('*** Electron IPC Main: open_local_file() ***');
- console.log('ipcMain on open_local_file');
- console.log(`ipcMain open local file from directory: ${local_file_path}/${filename}`);
-
- let full_local_file_path = null;
-
- if (use_cwd) {
- full_local_file_path = path.join(process.cwd(), local_file_path, filename);
- console.log(full_local_file_path);
- } else {
- full_local_file_path = path.join(local_file_path, filename);
- console.log(full_local_file_path);
- }
-
- if (fs.existsSync(full_local_file_path)) {
- console.log(`Local file exists: ${full_local_file_path}`);
- } else {
- console.log(`Local file not found: ${full_local_file_path}`);
- return false;
- }
-
- try {
- await shell.openPath(full_local_file_path);
- } catch (error) {
- console.error(error);
- return false;
- }
-
- console.log('End: Electron IPC Main: open_local_file()');
- return true;
-});
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
deleted file mode 100644
index ab0433f..0000000
--- a/package-lock.json
+++ /dev/null
@@ -1,2354 +0,0 @@
-{
- "name": "aether_app_native",
- "version": "2023.5.14.2",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "aether_app_native",
- "version": "2023.5.14.2",
- "license": "ISC",
- "dependencies": {
- "axios": "^1.1.2",
- "child_process": "^1.0.2",
- "fs": "^0.0.1-security",
- "os": "^0.1.2",
- "path": "^0.12.7"
- },
- "devDependencies": {
- "electron": "^31.0.0",
- "electron-packager": "^17.1.2"
- }
- },
- "node_modules/@electron/asar": {
- "version": "3.2.10",
- "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.10.tgz",
- "integrity": "sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "commander": "^5.0.0",
- "glob": "^7.1.6",
- "minimatch": "^3.0.4"
- },
- "bin": {
- "asar": "bin/asar.js"
- },
- "engines": {
- "node": ">=10.12.0"
- }
- },
- "node_modules/@electron/get": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz",
- "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "debug": "^4.1.1",
- "env-paths": "^2.2.0",
- "fs-extra": "^8.1.0",
- "got": "^11.8.5",
- "progress": "^2.0.3",
- "semver": "^6.2.0",
- "sumchecker": "^3.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "global-agent": "^3.0.0"
- }
- },
- "node_modules/@electron/notarize": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.4.tgz",
- "integrity": "sha512-W5GQhJEosFNafewnS28d3bpQ37/s91CDWqxVchHfmv2dQSTWpOzNlUVQwYzC1ay5bChRV/A9BTL68yj0Pa+TSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "debug": "^4.1.1",
- "fs-extra": "^9.0.1"
- },
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/@electron/notarize/node_modules/fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@electron/notarize/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/@electron/notarize/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/@electron/osx-sign": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.1.tgz",
- "integrity": "sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "compare-version": "^0.1.2",
- "debug": "^4.3.4",
- "fs-extra": "^10.0.0",
- "isbinaryfile": "^4.0.8",
- "minimist": "^1.2.6",
- "plist": "^3.0.5"
- },
- "bin": {
- "electron-osx-flat": "bin/electron-osx-flat.js",
- "electron-osx-sign": "bin/electron-osx-sign.js"
- },
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/@electron/osx-sign/node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@electron/osx-sign/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/@electron/osx-sign/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/@electron/universal": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.5.1.tgz",
- "integrity": "sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@electron/asar": "^3.2.1",
- "@malept/cross-spawn-promise": "^1.1.0",
- "debug": "^4.3.1",
- "dir-compare": "^3.0.0",
- "fs-extra": "^9.0.1",
- "minimatch": "^3.0.4",
- "plist": "^3.0.4"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/@electron/universal/node_modules/fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@electron/universal/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/@electron/universal/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/@malept/cross-spawn-promise": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz",
- "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==",
- "dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/malept"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
- }
- ],
- "license": "Apache-2.0",
- "dependencies": {
- "cross-spawn": "^7.0.1"
- },
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@sindresorhus/is": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/@szmarczak/http-timer": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
- "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "defer-to-connect": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@types/cacheable-request": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
- "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/http-cache-semantics": "*",
- "@types/keyv": "^3.1.4",
- "@types/node": "*",
- "@types/responselike": "^1.0.0"
- }
- },
- "node_modules/@types/http-cache-semantics": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
- "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/keyv": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
- "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/node": {
- "version": "20.14.15",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.15.tgz",
- "integrity": "sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~5.26.4"
- }
- },
- "node_modules/@types/responselike": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
- "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/yauzl": {
- "version": "2.10.3",
- "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
- "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@xmldom/xmldom": {
- "version": "0.8.10",
- "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
- "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
- "license": "MIT"
- },
- "node_modules/at-least-node": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
- "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/author-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz",
- "integrity": "sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/axios": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
- "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
- "license": "MIT",
- "dependencies": {
- "follow-redirects": "^1.15.6",
- "form-data": "^4.0.0",
- "proxy-from-env": "^1.1.0"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/base64-js": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/bluebird": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
- "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/boolean": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
- "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
- "dev": true,
- "license": "MIT",
- "optional": true
- },
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/buffer-equal": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz",
- "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/cacheable-lookup": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
- "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10.6.0"
- }
- },
- "node_modules/cacheable-request": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
- "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "clone-response": "^1.0.2",
- "get-stream": "^5.1.0",
- "http-cache-semantics": "^4.0.0",
- "keyv": "^4.0.0",
- "lowercase-keys": "^2.0.0",
- "normalize-url": "^6.0.1",
- "responselike": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/child_process": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz",
- "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==",
- "license": "ISC"
- },
- "node_modules/clone-response": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
- "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mimic-response": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "license": "MIT",
- "dependencies": {
- "delayed-stream": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/commander": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
- "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/compare-version": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
- "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/cross-spawn-windows-exe": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz",
- "integrity": "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==",
- "dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/malept"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/subscription/pkg/npm-cross-spawn-windows-exe?utm_medium=referral&utm_source=npm_fund"
- }
- ],
- "license": "Apache-2.0",
- "dependencies": {
- "@malept/cross-spawn-promise": "^1.1.0",
- "is-wsl": "^2.2.0",
- "which": "^2.0.2"
- },
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/debug": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
- "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decompress-response/node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/defer-to-connect": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/define-data-property": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "gopd": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/define-properties": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
- "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "define-data-property": "^1.0.1",
- "has-property-descriptors": "^1.0.0",
- "object-keys": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/detect-node": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
- "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
- "dev": true,
- "license": "MIT",
- "optional": true
- },
- "node_modules/dir-compare": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-3.3.0.tgz",
- "integrity": "sha512-J7/et3WlGUCxjdnD3HAAzQ6nsnc0WL6DD7WcwJb7c39iH1+AWfg+9OqzJNaI6PkBwBvm1mhZNL9iY/nRiZXlPg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer-equal": "^1.0.0",
- "minimatch": "^3.0.4"
- }
- },
- "node_modules/electron": {
- "version": "31.3.1",
- "resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz",
- "integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "@electron/get": "^2.0.0",
- "@types/node": "^20.9.0",
- "extract-zip": "^2.0.1"
- },
- "bin": {
- "electron": "cli.js"
- },
- "engines": {
- "node": ">= 12.20.55"
- }
- },
- "node_modules/electron-packager": {
- "version": "17.1.2",
- "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-17.1.2.tgz",
- "integrity": "sha512-XofXdikjYI7MVBcnXeoOvRR+yFFFHOLs3J7PF5KYQweigtgLshcH4W660PsvHr4lYZ03JBpLyEcUB8DzHZ+BNw==",
- "deprecated": "Please use @electron/packager moving forward. There is no API change, just a package name change",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "@electron/asar": "^3.2.1",
- "@electron/get": "^2.0.0",
- "@electron/notarize": "^1.2.3",
- "@electron/osx-sign": "^1.0.5",
- "@electron/universal": "^1.3.2",
- "cross-spawn-windows-exe": "^1.2.0",
- "debug": "^4.0.1",
- "extract-zip": "^2.0.0",
- "filenamify": "^4.1.0",
- "fs-extra": "^11.1.0",
- "galactus": "^1.0.0",
- "get-package-info": "^1.0.0",
- "junk": "^3.1.0",
- "parse-author": "^2.0.0",
- "plist": "^3.0.0",
- "rcedit": "^3.0.1",
- "resolve": "^1.1.6",
- "semver": "^7.1.3",
- "yargs-parser": "^21.1.1"
- },
- "bin": {
- "electron-packager": "bin/electron-packager.js"
- },
- "engines": {
- "node": ">= 14.17.5"
- },
- "funding": {
- "url": "https://github.com/electron/electron-packager?sponsor=1"
- }
- },
- "node_modules/electron-packager/node_modules/fs-extra": {
- "version": "11.2.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
- "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=14.14"
- }
- },
- "node_modules/electron-packager/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/electron-packager/node_modules/semver": {
- "version": "7.6.3",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
- "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/electron-packager/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/end-of-stream": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
- "node_modules/env-paths": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-arrayish": "^0.2.1"
- }
- },
- "node_modules/es-define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
- "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "get-intrinsic": "^1.2.4"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es6-error": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
- "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
- "dev": true,
- "license": "MIT",
- "optional": true
- },
- "node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/extract-zip": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
- "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "debug": "^4.1.1",
- "get-stream": "^5.1.0",
- "yauzl": "^2.10.0"
- },
- "bin": {
- "extract-zip": "cli.js"
- },
- "engines": {
- "node": ">= 10.17.0"
- },
- "optionalDependencies": {
- "@types/yauzl": "^2.9.1"
- }
- },
- "node_modules/fd-slicer": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
- "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pend": "~1.2.0"
- }
- },
- "node_modules/filename-reserved-regex": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
- "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/filenamify": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz",
- "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "filename-reserved-regex": "^2.0.0",
- "strip-outer": "^1.0.1",
- "trim-repeated": "^1.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/flora-colossus": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/flora-colossus/-/flora-colossus-2.0.0.tgz",
- "integrity": "sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "debug": "^4.3.4",
- "fs-extra": "^10.1.0"
- },
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/flora-colossus/node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/flora-colossus/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/flora-colossus/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/follow-redirects": {
- "version": "1.15.6",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
- "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/RubenVerborgh"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=4.0"
- },
- "peerDependenciesMeta": {
- "debug": {
- "optional": true
- }
- }
- },
- "node_modules/form-data": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
- "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
- "license": "MIT",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/fs": {
- "version": "0.0.1-security",
- "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
- "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==",
- "license": "ISC"
- },
- "node_modules/fs-extra": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^4.0.0",
- "universalify": "^0.1.0"
- },
- "engines": {
- "node": ">=6 <7 || >=8"
- }
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/galactus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/galactus/-/galactus-1.0.0.tgz",
- "integrity": "sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "debug": "^4.3.4",
- "flora-colossus": "^2.0.0",
- "fs-extra": "^10.1.0"
- },
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/galactus/node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/galactus/node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/galactus/node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
- "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3",
- "hasown": "^2.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-package-info": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz",
- "integrity": "sha512-SCbprXGAPdIhKAXiG+Mk6yeoFH61JlYunqdFQFHDtLjJlDjFf6x07dsS8acO+xWt52jpdVo49AlVDnUVK1sDNw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "bluebird": "^3.1.1",
- "debug": "^2.2.0",
- "lodash.get": "^4.0.0",
- "read-pkg-up": "^2.0.0"
- },
- "engines": {
- "node": ">= 4.0"
- }
- },
- "node_modules/get-package-info/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/get-package-info/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/get-stream": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pump": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/global-agent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
- "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
- "dev": true,
- "license": "BSD-3-Clause",
- "optional": true,
- "dependencies": {
- "boolean": "^3.0.1",
- "es6-error": "^4.1.1",
- "matcher": "^3.0.0",
- "roarr": "^2.15.3",
- "semver": "^7.3.2",
- "serialize-error": "^7.0.1"
- },
- "engines": {
- "node": ">=10.0"
- }
- },
- "node_modules/global-agent/node_modules/semver": {
- "version": "7.6.3",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
- "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
- "dev": true,
- "license": "ISC",
- "optional": true,
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/globalthis": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
- "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "define-properties": "^1.2.1",
- "gopd": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/gopd": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
- "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "get-intrinsic": "^1.1.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/got": {
- "version": "11.8.6",
- "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
- "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@sindresorhus/is": "^4.0.0",
- "@szmarczak/http-timer": "^4.0.5",
- "@types/cacheable-request": "^6.0.1",
- "@types/responselike": "^1.0.0",
- "cacheable-lookup": "^5.0.3",
- "cacheable-request": "^7.0.2",
- "decompress-response": "^6.0.0",
- "http2-wrapper": "^1.0.0-beta.5.2",
- "lowercase-keys": "^2.0.0",
- "p-cancelable": "^2.0.0",
- "responselike": "^2.0.0"
- },
- "engines": {
- "node": ">=10.19.0"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/got?sponsor=1"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/has-property-descriptors": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "es-define-property": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-proto": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
- "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-symbols": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
- "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/hosted-git-info": {
- "version": "2.8.9",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/http-cache-semantics": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
- "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
- "dev": true,
- "license": "BSD-2-Clause"
- },
- "node_modules/http2-wrapper": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
- "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "quick-lru": "^5.1.1",
- "resolve-alpn": "^1.0.0"
- },
- "engines": {
- "node": ">=10.19.0"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/is-core-module": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz",
- "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hasown": "^2.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-docker": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
- "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "is-docker": "cli.js"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-wsl": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
- "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-docker": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/isbinaryfile": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",
- "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 8.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/gjtorikian/"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
- "dev": true,
- "license": "ISC",
- "optional": true
- },
- "node_modules/jsonfile": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
- "dev": true,
- "license": "MIT",
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/junk": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz",
- "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/keyv": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "json-buffer": "3.0.1"
- }
- },
- "node_modules/load-json-file": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
- "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "strip-bom": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/lowercase-keys": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/matcher": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "escape-string-regexp": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "license": "MIT",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mimic-response": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/normalize-package-data": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "hosted-git-info": "^2.1.4",
- "resolve": "^1.10.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- }
- },
- "node_modules/normalize-package-data/node_modules/semver": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/normalize-url": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/os": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz",
- "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==",
- "license": "MIT"
- },
- "node_modules/p-cancelable": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
- "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-try": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^1.1.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/parse-author": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-2.0.0.tgz",
- "integrity": "sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "author-regex": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "error-ex": "^1.2.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path": {
- "version": "0.12.7",
- "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
- "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
- "license": "MIT",
- "dependencies": {
- "process": "^0.11.1",
- "util": "^0.10.3"
- }
- },
- "node_modules/path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/path-type": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
- "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pify": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/pend": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/plist": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
- "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@xmldom/xmldom": "^0.8.8",
- "base64-js": "^1.5.1",
- "xmlbuilder": "^15.1.1"
- },
- "engines": {
- "node": ">=10.4.0"
- }
- },
- "node_modules/process": {
- "version": "0.11.10",
- "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
- "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6.0"
- }
- },
- "node_modules/progress": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
- "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/proxy-from-env": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "license": "MIT"
- },
- "node_modules/pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "node_modules/quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/rcedit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.1.0.tgz",
- "integrity": "sha512-WRlRdY1qZbu1L11DklT07KuHfRk42l0NFFJdaExELEu4fEQ982bP5Z6OWGPj/wLLIuKRQDCxZJGAwoFsxhZhNA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cross-spawn-windows-exe": "^1.1.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/read-pkg": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
- "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "load-json-file": "^2.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/read-pkg-up": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
- "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "find-up": "^2.0.0",
- "read-pkg": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/resolve": {
- "version": "1.22.8",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
- "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-core-module": "^2.13.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/resolve-alpn": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/responselike": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
- "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "lowercase-keys": "^2.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/roarr": {
- "version": "2.15.4",
- "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
- "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
- "dev": true,
- "license": "BSD-3-Clause",
- "optional": true,
- "dependencies": {
- "boolean": "^3.0.1",
- "detect-node": "^2.0.4",
- "globalthis": "^1.0.1",
- "json-stringify-safe": "^5.0.1",
- "semver-compare": "^1.0.0",
- "sprintf-js": "^1.1.2"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/semver": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/semver-compare": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
- "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
- "dev": true,
- "license": "MIT",
- "optional": true
- },
- "node_modules/serialize-error": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
- "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "type-fest": "^0.13.1"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/spdx-correct": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
- "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "spdx-expression-parse": "^3.0.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "node_modules/spdx-exceptions": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
- "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
- "dev": true,
- "license": "CC-BY-3.0"
- },
- "node_modules/spdx-expression-parse": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "node_modules/spdx-license-ids": {
- "version": "3.0.18",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz",
- "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==",
- "dev": true,
- "license": "CC0-1.0"
- },
- "node_modules/sprintf-js": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
- "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "optional": true
- },
- "node_modules/strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/strip-outer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
- "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "escape-string-regexp": "^1.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/strip-outer/node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/sumchecker": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
- "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "debug": "^4.1.0"
- },
- "engines": {
- "node": ">= 8.0"
- }
- },
- "node_modules/supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/trim-repeated": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
- "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "escape-string-regexp": "^1.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/trim-repeated/node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/type-fest": {
- "version": "0.13.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
- "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "optional": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/undici-types": {
- "version": "5.26.5",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/universalify": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/util": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
- "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
- "license": "MIT",
- "dependencies": {
- "inherits": "2.0.3"
- }
- },
- "node_modules/util/node_modules/inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
- "license": "ISC"
- },
- "node_modules/validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/xmlbuilder": {
- "version": "15.1.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
- "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yauzl": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
- "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer-crc32": "~0.2.3",
- "fd-slicer": "~1.1.0"
- }
- }
- }
-}
diff --git a/package.json b/package.json
deleted file mode 100644
index 10c5bd6..0000000
--- a/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "aether_app_native",
- "productName": "Aether App: Native",
- "version": "2024.8.14.1",
- "description": "One Sky IT's Native Aether App",
- "main": "index.js",
- "scripts": {
- "start": "electron .",
- "start_nogpu": "electron . --disable-gpu",
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "Scott Idem",
- "license": "ISC",
- "dependencies": {
- "axios": "^1.1.2",
- "child_process": "^1.0.2",
- "fs": "^0.0.1-security",
- "os": "^0.1.2",
- "path": "^0.12.7"
- },
- "devDependencies": {
- "electron": "^31.0.0",
- "electron-packager": "^17.1.2"
- }
-}
diff --git a/src/main/api_client.ts b/src/main/api_client.ts
new file mode 100644
index 0000000..6e77b1f
--- /dev/null
+++ b/src/main/api_client.ts
@@ -0,0 +1,79 @@
+import { SeedConfig } from '../shared/types';
+
+export async function fetchFullConfig(seed: SeedConfig): Promise {
+ const apiUrls = [
+ seed.onsite_api_base_url,
+ seed.primary_api_base_url,
+ seed.backup_api_base_url
+ ].filter(url => url !== null && url !== undefined) as string[];
+
+ let lastError: any = null;
+
+ for (const baseUrl of apiUrls) {
+ try {
+ console.log(`Bootstrap: Attempting connection to ${baseUrl}...`);
+
+ // --- STEP 1: Get Device Config ---
+ const deviceUrl = `${baseUrl}/v3/crud/event_device/${seed.event_device_id}`;
+ const deviceResponse = await fetch(deviceUrl, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-aether-api-key': seed.aether_api_key,
+ 'x-no-account-id': 'Nothing to See Here'
+ },
+ });
+
+ if (!deviceResponse.ok) {
+ throw new Error(`Device lookup failed (${deviceResponse.status})`);
+ }
+
+ const deviceResult = await deviceResponse.json();
+ const deviceData = deviceResult.data || deviceResult;
+
+ // Use 'app_base_url' as the FQDN for the site lookup
+ const fqdn = deviceData.app_base_url || 'native-demo.oneskyit.com';
+ console.log(`Bootstrap Step 1 Success: Device identified. FQDN to use: ${fqdn}`);
+
+ // --- STEP 2: Get Site Context ---
+ const searchUrl = `${baseUrl}/v3/crud/site_domain/search`;
+ const siteResponse = await fetch(searchUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-aether-api-key': seed.aether_api_key,
+ 'x-no-account-id': 'Nothing to See Here',
+ 'x-account-id': deviceData.account_id_random || deviceData.account_id || ''
+ },
+ body: JSON.stringify({
+ search_query: {
+ and: [{ field: 'fqdn', op: 'eq', value: fqdn }]
+ },
+ limit: 1
+ })
+ });
+
+ if (!siteResponse.ok) {
+ throw new Error(`Site context lookup failed (${siteResponse.status})`);
+ }
+
+ const siteResult = await siteResponse.json();
+ const siteDomain = (siteResult.data && siteResult.data.length > 0) ? siteResult.data[0] : null;
+
+ console.log(`Bootstrap Success using ${baseUrl}`);
+
+ return {
+ ...siteDomain,
+ native_device: deviceData
+ };
+
+ } catch (error) {
+ console.warn(`Bootstrap failed for ${baseUrl}: `, error);
+ lastError = error;
+ continue; // Try next URL
+ }
+ }
+
+ console.error('Bootstrap Critical Failure: All API endpoints exhausted.', lastError);
+ return null;
+}
diff --git a/src/main/config_loader.ts b/src/main/config_loader.ts
new file mode 100644
index 0000000..ebe9dd0
--- /dev/null
+++ b/src/main/config_loader.ts
@@ -0,0 +1,30 @@
+import * as fs from 'fs';
+import * as path from 'path';
+import * as os from 'os';
+import { SeedConfig } from '../shared/types';
+
+export async function loadSeedConfig(): Promise {
+ // For development, we look in the home directory
+ const configPath = path.join(os.homedir(), 'seed.json');
+
+ try {
+ if (!fs.existsSync(configPath)) {
+ console.log(`Seed config not found at: ${configPath}`);
+ return null;
+ }
+
+ const data = fs.readFileSync(configPath, 'utf-8');
+ const config = JSON.parse(data) as SeedConfig;
+
+ // Basic validation
+ if (!config.event_device_id) {
+ console.error('Invalid seed config: missing event_device_id');
+ return null;
+ }
+
+ return config;
+ } catch (error) {
+ console.error('Error loading seed config:', error);
+ return null;
+ }
+}
diff --git a/src/main/index.ts b/src/main/index.ts
new file mode 100644
index 0000000..1109a4f
--- /dev/null
+++ b/src/main/index.ts
@@ -0,0 +1,76 @@
+import { app, BrowserWindow, ipcMain } from 'electron';
+import * as path from 'path';
+import { loadSeedConfig } from './config_loader';
+import { fetchFullConfig } from './api_client';
+import { SeedConfig } from '../shared/types';
+
+let mainWindow: BrowserWindow | null = null;
+let cachedSeed: SeedConfig | null = null;
+let cachedFullConfig: any = null;
+
+async function createWindow() {
+ // 1. Initial Load of Configs
+ cachedSeed = await loadSeedConfig();
+ if (cachedSeed) {
+ cachedFullConfig = await fetchFullConfig(cachedSeed);
+ }
+
+ mainWindow = new BrowserWindow({
+ width: 1400,
+ height: 900,
+ title: 'OSIT Aether Launcher (Native)',
+ webPreferences: {
+ preload: path.join(__dirname, '../preload/index.js'),
+ contextIsolation: true,
+ nodeIntegration: false,
+ },
+ });
+
+ // Prioritize demo.localhost for local development
+ const devUrl = 'http://demo.localhost:5173';
+ // Fallback URL if local is offline
+ const fallbackUrl = 'https://dev-demo.oneskyit.com/';
+
+ console.log(`Loading UI from: ${devUrl}`);
+
+ mainWindow.loadURL(devUrl).catch(() => {
+ console.warn(`Failed to load ${devUrl}. Falling back to ${fallbackUrl}`);
+ mainWindow?.loadURL(fallbackUrl);
+ });
+
+ mainWindow.on('closed', () => {
+ mainWindow = null;
+ });
+}
+
+app.on('ready', createWindow);
+
+app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') {
+ app.quit();
+ }
+});
+
+app.on('activate', () => {
+ if (mainWindow === null) {
+ createWindow();
+ }
+});
+
+// IPC Handlers
+ipcMain.handle('get-seed-config', async () => {
+ return cachedSeed || await loadSeedConfig();
+});
+
+ipcMain.handle('get-device-config', async () => {
+ if (cachedFullConfig) return cachedFullConfig;
+ if (cachedSeed) {
+ cachedFullConfig = await fetchFullConfig(cachedSeed);
+ return cachedFullConfig;
+ }
+ return null;
+});
+
+ipcMain.handle('get-jwt', async () => {
+ return null;
+});
diff --git a/src/preload/index.ts b/src/preload/index.ts
new file mode 100644
index 0000000..31be28c
--- /dev/null
+++ b/src/preload/index.ts
@@ -0,0 +1,8 @@
+import { contextBridge, ipcRenderer } from 'electron';
+
+contextBridge.exposeInMainWorld('aetherNative', {
+ getSeedConfig: () => ipcRenderer.invoke('get-seed-config'),
+ getDeviceConfig: () => ipcRenderer.invoke('get-device-config'),
+ getJWT: () => ipcRenderer.invoke('get-jwt'),
+ log: (message: string) => console.log('[Native Log]', message),
+});
diff --git a/src/shared/types.ts b/src/shared/types.ts
new file mode 100644
index 0000000..4d6096a
--- /dev/null
+++ b/src/shared/types.ts
@@ -0,0 +1,20 @@
+export interface SeedConfig {
+ event_device_id: string;
+ primary_api_base_url: string;
+ backup_api_base_url: string | null;
+ onsite_api_base_url: string | null;
+ aether_api_key: string;
+}
+
+export interface AetherNativeBridge {
+ getSeedConfig: () => Promise;
+ getDeviceConfig: () => Promise;
+ getJWT: () => Promise;
+ log: (message: string) => void;
+}
+
+declare global {
+ interface Window {
+ aetherNative: AetherNativeBridge;
+ }
+}
\ No newline at end of file
diff --git a/tests/test_device_lookup.py b/tests/test_device_lookup.py
new file mode 100644
index 0000000..a3888af
--- /dev/null
+++ b/tests/test_device_lookup.py
@@ -0,0 +1,55 @@
+import requests
+import json
+
+def test_device_lookup():
+ device_id = 'dbgMWS3KEHE'
+ api_key = 'INSdG85ANwsEIru3nUttMw'
+ base_url = 'https://dev-api.oneskyit.com'
+ endpoint = f'{base_url}/v3/crud/event_device/{device_id}'
+
+ headers = {
+ 'x-aether-api-key': api_key,
+ 'x-no-account-id': 'Nothing to See Here',
+ 'Content-Type': 'application/json'
+ }
+
+ params = {
+ 'view': 'enriched'
+ }
+
+ print(f'Testing lookup for device: {device_id}')
+ print(f'Endpoint: {endpoint}')
+
+ try:
+ response = requests.get(endpoint, headers=headers, params=params)
+ print(f'Status Code: {response.status_code}')
+
+ if response.status_code == 200:
+ data = response.json()
+ device_data = data.get('data', {})
+
+ print('Returned Fields (Key Values):')
+ important_fields = [
+ 'account_id_random',
+ 'app_base_url',
+ 'code',
+ 'name',
+ 'event_id_random',
+ 'event_location_id_random',
+ 'local_file_cache_path',
+ 'host_file_temp_path',
+ 'recording_path',
+ 'cfg_json'
+ ]
+
+ for field in important_fields:
+ val = device_data.get(field, 'MISSING')
+ print(f' {field}: {val}')
+ else:
+ print(f'Error Response: {response.text}')
+
+ except Exception as e:
+ print(f'Request failed: {e}')
+
+if __name__ == '__main__':
+ test_device_lookup()
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..ee7283d
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "module": "CommonJS",
+ "lib": ["ESNext", "DOM"],
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "moduleResolution": "node",
+ "outDir": "dist",
+ "rootDir": "src",
+ "sourceMap": true,
+ "baseUrl": ".",
+ "paths": {
+ "@shared/*": ["src/shared/*"]
+ }
+ },
+ "include": ["src/**/*"],
+ "exclude": ["node_modules"]
+}
\ No newline at end of file