@fto-consult/expo-ui 8.10.0 → 8.11.0
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/create-app/dependencies.js +38 -36
- package/bin/index.js +7 -0
- package/bin/update.js +52 -0
- package/package.json +2 -2
@@ -1,36 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
1
|
+
|
2
|
+
module.exports = {
|
3
|
+
"@emotion/native": "^11.11.0",
|
4
|
+
"@expo/html-elements": "^0.5.1",
|
5
|
+
"@expo/vector-icons": "^14.0.0",
|
6
|
+
"@pchmn/expo-material3-theme": "^1.3.2",
|
7
|
+
"@react-native-community/datetimepicker": "^7.6.1",
|
8
|
+
"@react-native-community/netinfo": "^11.1.0",
|
9
|
+
"@react-native/assets-registry": "^0.72.0",
|
10
|
+
"@react-navigation/native": "^6.1.9",
|
11
|
+
"@react-navigation/native-stack": "^6.9.17",
|
12
|
+
"@react-navigation/stack": "^6.3.20",
|
13
|
+
"@shopify/flash-list": "^1.6.3",
|
14
|
+
"expo": "^50.0.3",
|
15
|
+
"expo-barcode-scanner": "~12.9.2",
|
16
|
+
"expo-camera": "~14.0.1",
|
17
|
+
"expo-clipboard": "~5.0.1",
|
18
|
+
"expo-font": "~11.10.2",
|
19
|
+
"expo-image-picker": "~14.7.1",
|
20
|
+
"expo-linking": "~6.2.2",
|
21
|
+
"expo-sharing": "~11.10.0",
|
22
|
+
"expo-sqlite": "~13.2.1",
|
23
|
+
"expo-status-bar": "~1.11.1",
|
24
|
+
"expo-system-ui": "~2.9.3",
|
25
|
+
"expo-web-browser": "~12.8.1",
|
26
|
+
"react-native": "^0.73.2",
|
27
|
+
"@react-native-async-storage/async-storage": "^1.21.0",
|
28
|
+
"react-native-big-list": "^1.6.1",
|
29
|
+
"react-native-blob-util": "^0.18.6",
|
30
|
+
"react-native-safe-area-context": "^4.8.2",
|
31
|
+
"react-native-screens": "~3.29.0",
|
32
|
+
"react-native-svg": "^14.1.0",
|
33
|
+
"react-native-webview": "^13.6.4",
|
34
|
+
"react-native-gesture-handler": "~2.14.0",
|
35
|
+
"react-native-reanimated": "~3.6.0",
|
36
|
+
"react-native-view-shot": "^3.8.0"
|
37
|
+
};
|
38
|
+
|
package/bin/index.js
CHANGED
@@ -33,4 +33,11 @@ program.command('generate-getTable')
|
|
33
33
|
require("./generate-tables")();
|
34
34
|
});
|
35
35
|
|
36
|
+
program.command('update')
|
37
|
+
.description('permet de mettre à jour les dépendences expo-ui de l\'application')
|
38
|
+
.action((src, options) => {
|
39
|
+
require("./update");
|
40
|
+
});
|
41
|
+
|
42
|
+
|
36
43
|
program.parse();
|
package/bin/update.js
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
const fs = require("fs");
|
2
|
+
const path = require("path");
|
3
|
+
const projectRoot = process.cwd();
|
4
|
+
const {exec,writeFile} = require("@fto-consult/node-utils");
|
5
|
+
const dependencies = require("./create-app/dependencies");
|
6
|
+
const dependenciesArr = Object.keys(dependencies);
|
7
|
+
const dependenciesPath = path.resolve(__dirname,"create-app","dependencies.js")
|
8
|
+
const mainJSONPath = path.resolve(projectRoot,"package.json");
|
9
|
+
if(fs.existsSync(mainJSONPath)){
|
10
|
+
const packageObj = JSON.parse(fs.readFileSync(mainJSONPath));
|
11
|
+
const packageDev = typeof packageObj?.dependencies =="object" && packageObj?.dependencies || {};
|
12
|
+
const filterdDObj = {};
|
13
|
+
dependenciesArr.filter((v,index)=>{
|
14
|
+
if(!!packageDev[v]){
|
15
|
+
filterdDObj[v] = true;
|
16
|
+
return true;
|
17
|
+
}
|
18
|
+
return false;
|
19
|
+
});
|
20
|
+
const filteredDeps = Object.keys(filterdDObj);
|
21
|
+
if(filteredDeps.length){
|
22
|
+
const script = filteredDeps.join(" ");
|
23
|
+
exec(`npm install ${script}`,{projectRoot}).finally((i)=>{
|
24
|
+
exec(`npx expo install --fix`,{projectRoot}).finally(()=>{
|
25
|
+
const newPackageJS = JSON.parse(fs.readFileSync(mainJSONPath));
|
26
|
+
let hasChanged = false;
|
27
|
+
if(newPackageJS?.dependencies && typeof newPackageJS?.dependencies =="object"){
|
28
|
+
for(let i in dependencies){
|
29
|
+
const old = dependencies[i];
|
30
|
+
dependencies[i] = newPackageJS?.dependencies[i] || dependencies[i];
|
31
|
+
if(!hasChanged && dependencies[i] !== old){
|
32
|
+
hasChanged = true;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
if(hasChanged){
|
37
|
+
try {
|
38
|
+
writeFile(dependenciesPath,`
|
39
|
+
module.exports = ${JSON.stringify(dependencies,null,"\t")};
|
40
|
+
`)
|
41
|
+
} catch(e){
|
42
|
+
console.log(e," is generated error");
|
43
|
+
}
|
44
|
+
}
|
45
|
+
});
|
46
|
+
});
|
47
|
+
} else {
|
48
|
+
console.log("Aucune dépendence expo à mettre à jour");
|
49
|
+
}
|
50
|
+
} else {
|
51
|
+
console.error(`Le fichier ${mainJSONPath} de l'application est inexistant. impossible de mettre à jour les packages @fto-consult/expo-ui`)
|
52
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.11.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"dependencies": {
|
71
71
|
"@emotion/react": "^11.11.1",
|
72
72
|
"@faker-js/faker": "^8.0.2",
|
73
|
-
"@fto-consult/common": "^4.
|
73
|
+
"@fto-consult/common": "^4.13.0",
|
74
74
|
"@fto-consult/node-utils": "^1.4.7",
|
75
75
|
"apexcharts": "^3.45.2",
|
76
76
|
"commander": "^11.1.0",
|