@fto-consult/expo-ui 7.5.40 → 7.5.42
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 +1 -1
- package/electron/index.js +7 -3
- package/package.json +2 -1
package/bin/index.js
CHANGED
package/electron/index.js
CHANGED
@@ -31,9 +31,12 @@ const isAsar = (typeof require.main =="string" && require.main ||"").indexOf('ap
|
|
31
31
|
const distPath = path.join("dist",'index.html');
|
32
32
|
|
33
33
|
const processCWD = process.cwd();
|
34
|
+
const appPath = app.getAppPath();
|
35
|
+
const asarPath = path.resolve(processCWD,"resources","app.asar");
|
34
36
|
const electronProjectRoot = mainProjectRoot && typeof mainProjectRoot =='string' && fs.existsSync(path.resolve(mainProjectRoot)) && fs.existsSync(path.resolve(mainProjectRoot,distPath)) && path.resolve(mainProjectRoot) || null;
|
35
37
|
const projectRoot = electronProjectRoot || fs.existsSync(path.resolve(processCWD,"electron")) && fs.existsSync(path.resolve(processCWD,"electron",distPath)) && path.resolve(processCWD,"electron")
|
36
|
-
|| fs.existsSync(path.resolve(processCWD,distPath)) && path.resolve(processCWD) ||
|
38
|
+
|| fs.existsSync(path.resolve(processCWD,distPath)) && path.resolve(processCWD) || fs.existsSync(asarPath) && fs.existsSync(path.relative(asarPath,"dist")) && asarPath ||
|
39
|
+
processCWD;
|
37
40
|
const packageJSONPath = fs.existsSync(processCWD,"package.json")? path.resolve(processCWD,"package.json") : path.resolve(projectRoot,"package.json");
|
38
41
|
const packageJSON = fs.existsSync(packageJSONPath) ? Object.assign({},require(`${packageJSONPath}`)) : {};
|
39
42
|
const appName = typeof packageJSON.realAppName =='string' && packageJSON.realAppName || typeof packageJSON.name =="string" && packageJSON.name || "";
|
@@ -49,10 +52,11 @@ const mainProcessIndex = projectRoot && fs.existsSync(path.resolve(projectRoot,m
|
|
49
52
|
const mainProcessRequired = mainProcessIndex && require(`${mainProcessIndex}`);
|
50
53
|
//pour étendre les fonctionnalités au niveau du main proceess, bien vouloir écrire dans le fichier projectRoot/electron/main/index.js
|
51
54
|
const mainProcess = mainProcessRequired && typeof mainProcessRequired =='object'? mainProcessRequired : {};
|
55
|
+
const execPath = app.getPath ('exe') || process.execPath;
|
52
56
|
|
53
57
|
// Gardez une reference globale de l'objet window, si vous ne le faites pas, la fenetre sera
|
54
|
-
if(!isValidUrl(pUrl) && !fs.existsSync(indexFilePath)){
|
55
|
-
throw {message:`Unable to start the application: index file located at [${indexFilePath}] does not exists : projectRoot = [${projectRoot}],
|
58
|
+
if(true || !isValidUrl(pUrl) && !fs.existsSync(indexFilePath)){
|
59
|
+
throw {message:`Unable to start the application: index file located at [${indexFilePath}] does not exists : appPath = [${appPath}] projectRoot = [${projectRoot}], exec path is ${execPath}`}
|
56
60
|
}
|
57
61
|
|
58
62
|
const quit = ()=>{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "7.5.
|
3
|
+
"version": "7.5.42",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -44,6 +44,7 @@
|
|
44
44
|
"test-bin": "node ./bin/index.js",
|
45
45
|
"update-appexchart": "npm run update-apexchart",
|
46
46
|
"delete-node-modules": "rimraf ./**/node_modules",
|
47
|
+
"extract-asar" : "npx @electron/asar extract app.asar <destfolder>",
|
47
48
|
"dev": "npx expo start --no-dev --minify -c",
|
48
49
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
49
50
|
"update": "npm i pdfmake@latest expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @emotion/native@latest @fto-consult/common@latest @react-navigation/stack react-native-blob-util react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest react-native-web@latest react-dom@latest && npx expo install --fix && npm run update-apexchart && npm run update-pdfmake && npm run find-licenses"
|