@fto-consult/expo-ui 7.4.24 → 7.4.26

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/bin/index.js CHANGED
@@ -143,12 +143,11 @@ program.command('electron')
143
143
  writeFile(packagePath,JSON.stringify({...packageObj,homepage:"./"},null,"\t"));
144
144
  } catch{}
145
145
  cmd = "npx expo export:web";
146
- return exec({cmd,projectRoot}).then((e)=>{
146
+ return exec({cmd,projectRoot}).then(next).catch(reject).finally(()=>{
147
147
  try {
148
148
  writeFile(packagePath,JSON.stringify({...packageObj,homepage},null,"\t"));
149
149
  } catch{}
150
- next(e);
151
- }).catch(reject);
150
+ });
152
151
  }
153
152
  next();
154
153
  });
@@ -16,7 +16,6 @@ if(!_app || typeof _app !=='object' || typeof _app.name !=='string'){
16
16
  throw {message : "Contenu du fichier "+packagePath+" invalide!! Veuillez spécifier un nom valide d'application, propriété <<name>> dudit fichier"}
17
17
  }
18
18
  const paths = require("./paths.json");
19
- const projectRoot = paths.projectRoot || '';
20
19
  const APP_NAME = _app.name.trim().toUpperCase();
21
20
  let backupPathField = "_e_backupDataPath";
22
21
  let cBackupPathField = "company"+backupPathField;
@@ -28,6 +27,7 @@ const getPath = function(pathName){
28
27
  const APP_PATH = path.join(getPath("appData"),APP_NAME).toLowerCase();
29
28
  let databasePath = path.join(APP_PATH,"databases");
30
29
  let ROOT_APP_FOLDER = undefined;
30
+ let appBackupPathRef = undefined;
31
31
  const separator = (path.sep)
32
32
  if(typeof separator != 'string' || !separator){
33
33
  separator = (()=>{
@@ -71,8 +71,8 @@ const setDatabasePath = (newPath)=>{
71
71
  };
72
72
  const setBackupPath = (newPath)=>{
73
73
  newPath = typeof newPath =='string' && newPath || typeof ROOT_APP_FOLDER =='string' && ROOT_APP_FOLDER || path.join(getPath("documents"),APP_NAME);
74
- ELECTRON.APP_BACKUP_PATH = newPath;
75
- config.set(cBackupPathField,ELECTRON.APP_BACKUP_PATH)
74
+ appBackupPathRef = newPath;
75
+ config.set(cBackupPathField,appBackupPathRef)
76
76
  };
77
77
  const APPRef = {
78
78
  current : null,
@@ -105,14 +105,14 @@ const ELECTRON = {
105
105
  return (p)=>{
106
106
  const eePath = config.get(cBackupPathField);
107
107
  const defPath = ROOT_APP_FOLDER || path.join(getPath("documents"),APP_NAME);
108
- ELECTRON.APP_BACKUP_PATH = typeof eePath =='string' && eePath || typeof defPath =='string' && defPath || '';
109
- if(!fs.existsSync(ELECTRON.APP_BACKUP_PATH)){
110
- ELECTRON.APP_BACKUP_PATH = defPath;
108
+ appBackupPathRef = typeof eePath =='string' && eePath || typeof defPath =='string' && defPath || '';
109
+ if(!fs.existsSync(appBackupPathRef)){
110
+ appBackupPathRef = defPath;
111
111
  }
112
112
  if(p && typeof (p) ==='string'){
113
- return path.join(ELECTRON.APP_BACKUP_PATH,p);
113
+ return path.join(appBackupPathRef,p);
114
114
  }
115
- return ELECTRON.APP_BACKUP_PATH;
115
+ return appBackupPathRef;
116
116
  };
117
117
  },
118
118
  get databasePath (){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.4.24",
3
+ "version": "7.4.26",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {