@fto-consult/expo-ui 7.5.15 → 7.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/electron/index.js CHANGED
@@ -30,6 +30,10 @@ const mainProcess = mainProcessRequired && typeof mainProcessRequired =='object'
30
30
  let win = undefined;
31
31
  Menu.setApplicationMenu(null);
32
32
 
33
+ if(!isValidUrl(pUrl) && !fs.existsSync(indexFilePath)){
34
+ throw `Unable to start the application: index file located at [${indexFilePath}] does not exists : projectRoot : [${projectRoot}], electronProjectRoot = [${electronProjectRoot}], isAsar:[${require.main}]`
35
+ }
36
+
33
37
  const clipboadContextMenu = (_, props) => {
34
38
  if (props.isEditable || props.selectionText) {
35
39
  const menu = new Menu();
@@ -188,9 +192,7 @@ function createWindow () {
188
192
  if(isValidUrl(pUrl)){
189
193
  win.loadURL(pUrl);
190
194
  } else {
191
- if(!fs.existsSync(indexFilePath)){
192
- throw `Unable to start the application: index file located at [${indexFilePath}] does not exists : projectRoot : [${projectRoot}], electronProjectRoot = [${electronProjectRoot}]`
193
- } else win.loadFile(indexFilePath)
195
+ win.loadFile(indexFilePath)
194
196
  }
195
197
 
196
198
  win.on('unresponsive', async () => {
@@ -13,9 +13,9 @@ const electronProjectRoot = ipcRenderer.sendSync("get-electron-project-root");
13
13
  const sanitize = require("sanitize-filename");
14
14
  const uniqid = require("./utils/uniqid");
15
15
  if(!appName || typeof appName !=='string'){
16
- throw {message : "Nom de l'application invalide!! Veuillez spécifier un nom valide d'application"}
16
+ console.error("Nom de l'application invalide!! Veuillez spécifier un nom valide d'application ",electronProjectRoot," is electron project root")
17
17
  }
18
- const APP_NAME = appName.toUpperCase();
18
+ const APP_NAME = appName?.toUpperCase() || "";
19
19
  let backupPathField = "_e_backupDataPath";
20
20
  let cBackupPathField = "company"+backupPathField;
21
21
  let dbPathField = "_electron_DBPathField";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.5.15",
3
+ "version": "7.5.17",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",