@fto-consult/expo-ui 7.3.5 → 7.4.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.js CHANGED
@@ -1,15 +1,15 @@
1
1
  const {exec,thowError,copy,writeFile,createDirSync,getDependencyVersion} = require("./utils");
2
2
  const fs = require("fs"), path = require("path");
3
3
  const getAppDir = x=>path.resolve(__dirname,"create-app");
4
- module.exports = function(parsedArgs,{projectRoot:root}){
5
- const argvName = process.argv[3];
4
+ module.exports = function(appName,{projectRoot:root}){
6
5
  const packageObj = require("../package.json");
7
6
  root = root && fs.existsSync(root) && root || process.cwd();
8
7
  let mainPackage = fs.existsSync(path.resolve(root,"package.json")) && require(`${path.resolve(root,"package.json")}`) || null;
9
- const name = argvName && argvName.trim() || mainPackage?.name && typeof mainPackage?.name=="string" && mainPackage.name.trim() || "";
8
+ const name = appName && appName.trim() || mainPackage?.name && typeof mainPackage?.name=="string" && mainPackage.name.trim() || "";
10
9
  if(!name){
11
10
  return thowError(name," nom de l'application invalide, veuillez spécifier un nom d'application valide",argvName,process.argv);
12
11
  }
12
+ root = root && fs.existsSync(path.resolve(root))? path.resolve(root) : process.cwd();
13
13
  const devDependencies = packageObj.devDependencies;
14
14
  const inSameFolder = typeof mainPackage?.name =="string" && mainPackage?.name.trim().toLowerCase() === name?.toLowerCase().trim();
15
15
  const projectRoot = path.join(`${root}/${!inSameFolder && name || ""}`);
@@ -0,0 +1,162 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ toujours ajouter l'instruction ci-dessus à la première ligne de chaque script npx
5
+ @see : https://blog.shahednasser.com/how-to-create-a-npx-tool/
6
+ @see : https://www.npmjs.com/package/commander, for command parsing
7
+ */
8
+ 'use strict';
9
+ process.on('unhandledRejection', err => {
10
+ throw err;
11
+ });
12
+ const createAppScript = "create-app";
13
+ const supportedScript = {
14
+ "init" : true, //initialize electron app
15
+ "start" : true,//start electron
16
+ "build" : true, //script pour faire un build,
17
+ "package" : true, ///script pour le packagin de l'application
18
+ "generate-getTable" : true,/// script pour la génération de la fonction getTable des tables de l'application
19
+ [createAppScript] : true,//les script de création de l'application
20
+ }
21
+ const {createDir,electronDir,copy,exec,throwError} = require("./utils");
22
+ const path= require("path");
23
+ const fs = require("fs");
24
+ const dir = path.resolve(__dirname);
25
+ const projectRoot = path.resolve(process.cwd());
26
+ const parsedArgs = require("../electron/utils/parseArgs")(null,supportedScript);
27
+ parsedArgs.script = typeof parsedArgs.script =='string' && parsedArgs.script && parsedArgs.script.toLowerCase().trim() || "";
28
+ if(!parsedArgs.script || !(parsedArgs.script in supportedScript)){
29
+ throwError("Erreur : script invalide, vous devez spécifier script figurant parmi les script : ["+Object.keys(supportedScript).join(", ")+"]");
30
+ }
31
+ let cmd = null;
32
+ const script = parsedArgs.script;
33
+ /****
34
+ * 1. installer electron globallement : npm i -g electron@latest
35
+ * cmde : [cmd] start electron config=[path-to-config-relative-to-project-dir]
36
+ * splash=[path-to-splashcreen-relative-to-project-root]
37
+ * output-dir|out = [path-to-output-dir-relative-to-root-project]
38
+ * url = [url-to-start-electron-to]
39
+ * */
40
+ if(parsedArgs.electron){
41
+ if(projectRoot == dir){
42
+ throwError(`Invalid project root ${projectRoot}; project root must be different to ${dir}`);
43
+ }
44
+ const pathsJSON = path.resolve(electronDir,"paths.json");
45
+ if(!fs.existsSync(pathsJSON)){
46
+ throwError("Le fichier des chemins d'accès à l'application est innexistant, rassurez vous de tester l'application en environnement web, via la cmde <npx expo start>, avant l'exécution du script electron.");
47
+ }
48
+ const paths = require(`${pathsJSON}`);
49
+ if(typeof paths !=='object' || !paths || !paths.projectRoot){
50
+ throwError("Fichiers des chemins d'application invalide!!! merci d'exécuter l'application en environnement web|android|ios puis réessayez");
51
+ }
52
+ /**** le project root d'où a été lancé le script electron doit être le même que celui de l'application principale */
53
+ if(projectRoot !== paths.projectRoot){
54
+ throwError(`main app project root ${paths.projectRoot} must be equals to ${projectRoot} in which you want to generate electron app`);
55
+ }
56
+ const electronProjectRoot = path.resolve(projectRoot,"electron");
57
+ const isElectionInitialized = require("../electron/is-initialized")(electronProjectRoot);
58
+ process.env.isElectron = true;
59
+ process.env.isElectronScript = true;
60
+ if(!isElectionInitialized || script =='init'){
61
+ if(script !=='init'){
62
+ console.log("initializing electron application before ....");
63
+ }
64
+ return require("./init")({
65
+ projectRoot,
66
+ electronDir,
67
+ electronProjectRoot,
68
+ paths,
69
+ });
70
+ }
71
+ require("../electron/create-index-file")(electronProjectRoot);
72
+ const out = parsedArgs.out || parsedArgs["output-dir"];
73
+ const outDir = out && path.dirname(out) && path.resolve(projectRoot,path.dirname(out),"electron") || path.resolve(electronProjectRoot,"bin")
74
+ if(!createDir(outDir)){
75
+ throwError("Impossible de créer le répertoire <<"+outDir+">> du fichier binaire!!");
76
+ }
77
+ const logoPath = paths.logo || paths.$assets && path.resolve(paths.$assets,"logo.png") || paths.$images && path.resolve(paths.$images,"logo.png");
78
+ if(!logoPath || !fs.existsSync(logoPath)){
79
+ if(logoPath){
80
+ console.warn("Logo de l'application innexistant!! Vous devez spécifier le logo de votre application, fichier ["+(logoPath)+"]")
81
+ }
82
+ }
83
+ const buildOutDir = path.resolve(electronProjectRoot,"dist");
84
+ const indexFile = path.resolve(buildOutDir,"index.html");
85
+ const webBuildDir = path.resolve(projectRoot,"web-build");
86
+ const packagePath = path.resolve(projectRoot,"package.json");
87
+ const url = parsedArgs.url && parsedArgs.url.trim() || "";
88
+ const start = x=>{
89
+ return new Promise((resolve,reject)=>{
90
+ cmd = "electron "+electronProjectRoot+" url="+url;
91
+ exec({
92
+ cmd,
93
+ projectRoot : electronProjectRoot,
94
+ }).finally(()=>{
95
+ console.log("ant to exit");
96
+ })
97
+ typeof (resolve) =='function' && setTimeout(resolve,1000);
98
+ })
99
+ };
100
+ if(url){
101
+ return start().then(process.exit);
102
+ }
103
+ const promise = new Promise((resolve,reject)=>{
104
+ const next = ()=>{
105
+ if(fs.existsSync(webBuildDir)){
106
+ return copy(webBuildDir,buildOutDir).catch(reject).then(resolve);
107
+ } else {
108
+ reject("dossier web-build exporté par electron innexistant!!");
109
+ }
110
+ }
111
+ if(!url && (parsedArgs.compile || !fs.existsSync(path.resolve(webBuildDir,"index.html")))){
112
+ console.log("exporting expo web app ...");
113
+ cmd = "npx expo export:web";
114
+ return exec({cmd,projectRoot}).then(next).catch(reject);
115
+ }
116
+ next();
117
+ });
118
+ return promise.then(()=>{
119
+ if(!fs.existsSync(buildOutDir) || !fs.existsSync(indexFile)){
120
+ throwError("répertoire d'export web invalide où innexistant ["+buildOutDir+"]");
121
+ }
122
+ switch(parsedArgs.script){
123
+ case "start":
124
+ return start();
125
+ break;
126
+ case "build":
127
+ break;
128
+ case "generate-getTable" :
129
+ require("./generate-tables")();
130
+ break;
131
+ default :
132
+ if(!fs.existsSync(packagePath)){
133
+ throwError("package.json file does not exist in "+projectRoot+". please make jure that your have running package script in expo root application");
134
+ }
135
+ const packageObj = require(`${packagePath}`);
136
+ const electronPackage = require(`${path.resolve(electronProjectRoot,'package.json')}`);
137
+ electronPackage.name = packageObj.name;
138
+ electronPackage.version = packageObj.version;
139
+ //copying package json in build folder
140
+ writeFile(path.resolve(electronProjectRoot,"package.json"),JSON.stringify(electronPackage,null,"\t"));
141
+ const platform = parsedArgs.platform || process.platform;
142
+ console.log("packaing app from ",electronProjectRoot);
143
+ return require("./package")({
144
+ src : electronProjectRoot,
145
+ dist : path.resolve(outDir,platform),
146
+ platform,
147
+ arch : parsedArgs.arch || undefined,
148
+ projectRoot : electronProjectRoot,
149
+ });
150
+ break;
151
+ }
152
+ }).catch((e)=>{
153
+ console.log(e," is cathing ggg");
154
+ }).finally(()=>{
155
+ process.exit();
156
+ });
157
+ } else {
158
+ if(script ===createAppScript || script ==="init"){
159
+ return require("./create-app")(parsedArgs,{projectRoot});
160
+ }
161
+ process.exit();
162
+ }
package/bin/index.js CHANGED
@@ -6,157 +6,168 @@
6
6
  @see : https://www.npmjs.com/package/commander, for command parsing
7
7
  */
8
8
  'use strict';
9
- process.on('unhandledRejection', err => {
10
- throw err;
11
- });
12
- const createAppScript = "create-app";
13
- const supportedScript = {
14
- "init" : true, //initialize electron app
15
- "start" : true,//start electron
16
- "build" : true, //script pour faire un build,
17
- "package" : true, ///script pour le packagin de l'application
18
- "generate-getTable" : true,/// script pour la génération de la fonction getTable des tables de l'application
19
- [createAppScript] : true,//les script de création de l'application
20
- }
21
- const {createDir,electronDir,copy,exec,throwError} = require("./utils");
9
+
10
+ const { program } = require('commander');
22
11
  const path= require("path");
23
12
  const fs = require("fs");
13
+ const {createDir,electronDir,copy,exec,throwError} = require("./utils");
14
+
15
+
24
16
  const dir = path.resolve(__dirname);
25
17
  const projectRoot = path.resolve(process.cwd());
26
- const parsedArgs = require("../electron/utils/parseArgs")(null,supportedScript);
27
- parsedArgs.script = typeof parsedArgs.script =='string' && parsedArgs.script && parsedArgs.script.toLowerCase().trim() || "";
28
- if(!parsedArgs.script || !(parsedArgs.script in supportedScript)){
29
- throwError("Erreur : script invalide, vous devez spécifier script figurant parmi les script : ["+Object.keys(supportedScript).join(", ")+"]");
30
- }
31
- let cmd = null;
32
- const script = parsedArgs.script;
33
- /****
34
- * 1. installer electron globallement : npm i -g electron@latest
35
- * cmde : [cmd] start electron config=[path-to-config-relative-to-project-dir]
36
- * splash=[path-to-splashcreen-relative-to-project-root]
37
- * output-dir|out = [path-to-output-dir-relative-to-root-project]
38
- * url = [url-to-start-electron-to]
39
- * */
40
- if(parsedArgs.electron){
41
- if(projectRoot == dir){
42
- throwError(`Invalid project root ${projectRoot}; project root must be different to ${dir}`);
43
- }
44
- const pathsJSON = path.resolve(electronDir,"paths.json");
45
- if(!fs.existsSync(pathsJSON)){
46
- throwError("Le fichier des chemins d'accès à l'application est innexistant, rassurez vous de tester l'application en environnement web, via la cmde <npx expo start>, avant l'exécution du script electron.");
47
- }
48
- const paths = require(`${pathsJSON}`);
49
- if(typeof paths !=='object' || !paths || !paths.projectRoot){
50
- throwError("Fichiers des chemins d'application invalide!!! merci d'exécuter l'application en environnement web|android|ios puis réessayez");
51
- }
52
- /**** le project root d' a été lancé le script electron doit être le même que celui de l'application principale */
53
- if(projectRoot !== paths.projectRoot){
54
- throwError(`main app project root ${paths.projectRoot} must be equals to ${projectRoot} in which you want to generate electron app`);
55
- }
56
- const electronProjectRoot = path.resolve(projectRoot,"electron");
57
- const isElectionInitialized = require("../electron/is-initialized")(electronProjectRoot);
58
- process.env.isElectron = true;
59
- process.env.isElectronScript = true;
60
- if(!isElectionInitialized || script =='init'){
61
- if(script !=='init'){
62
- console.log("initializing electron application before ....");
63
- }
64
- return require("./init")({
65
- projectRoot,
66
- electronDir,
67
- electronProjectRoot,
68
- paths,
69
- });
70
- }
71
- require("../electron/create-index-file")(electronProjectRoot);
72
- const out = parsedArgs.out || parsedArgs["output-dir"];
73
- const outDir = out && path.dirname(out) && path.resolve(projectRoot,path.dirname(out),"electron") || path.resolve(electronProjectRoot,"bin")
74
- if(!createDir(outDir)){
75
- throwError("Impossible de créer le répertoire <<"+outDir+">> du fichier binaire!!");
76
- }
77
- const logoPath = paths.logo || paths.$assets && path.resolve(paths.$assets,"logo.png") || paths.$images && path.resolve(paths.$images,"logo.png");
78
- if(!logoPath || !fs.existsSync(logoPath)){
79
- if(logoPath){
80
- console.warn("Logo de l'application innexistant!! Vous devez spécifier le logo de votre application, fichier ["+(logoPath)+"]")
18
+ const packageObj = require("../package.json");
19
+ const version = packageObj.version;
20
+ const description = packageObj.description;
21
+
22
+
23
+ program
24
+ .name('@fto-consult/expo-ui')
25
+ .description('Utilitaire cli lié au framework expo-ui')
26
+ .version(version);
27
+
28
+
29
+ program.command('create-app')
30
+ .description('crèe et initialise une application expo-ui')
31
+ .argument('<appName>', 'le nom de l\'application à initialiser')
32
+ .option('-r, --project-root [dir]', 'le project root de l\'application')
33
+ .action((appName, options) => {
34
+ require("./create-app")(appName,Object.assign({},options))
35
+ });
36
+
37
+ program.command('generate-getTable')
38
+ .description('permet de générer le fichier getTable.js contenant la fonction permettant de récupérer une tableData')
39
+ .action((src, options) => {
40
+ require("./generate-tables")();
41
+ });
42
+
43
+ program.command('electron')
44
+ .description('utilitaire cli pour la plateforme electron')
45
+ .argument('<cmd>', 'la commande à exécuter (start,init,build)')
46
+ //.option('-r, --project-root [dir]', 'le project root de l\'application')
47
+ .option('-c, --config [dir]', 'le chemin (relatif au project root) du fichier de configuration de l\'application electron')
48
+ .option('-s, --splash [dir]', 'le chemin (relatif au project root) du fichier du splash screen de l\'application')
49
+ .option('-o, --out [dir]', 'le chemin (relatif au project root) du répertoire qui contiendra les fichiers build')
50
+ .option('-u, --url [url]', 'le lien url qui sera ouvert par l\'application')
51
+ .option('-i, --compile [url]', 'le lien url qui sera ouvert par l\'application')
52
+ .option('-a, --arch [architecture]', 'l\'architecture de la plateforme')
53
+ .option('-p, --platform [platform]', 'la plateforme à utiliser pour la compilation')
54
+ .action((script, options) => {
55
+ const opts = Object.assign({},typeof options.opts =='function'? options.opts() : options);
56
+ let {out,arch,url,compile,platform} = opts;
57
+ //let {projectRoot} = opts;
58
+ if(projectRoot == dir){
59
+ throwError(`Invalid project root ${projectRoot}; project root must be different to ${dir}`);
60
+ }
61
+ const pathsJSON = path.resolve(electronDir,"paths.json");
62
+ if(!fs.existsSync(pathsJSON)){
63
+ throwError("Le fichier des chemins d'accès à l'application est innexistant, rassurez vous de tester l'application en environnement web, via la cmde <npx expo start>, avant l'exécution du script electron.");
64
+ }
65
+ const paths = require(`${pathsJSON}`);
66
+ if(typeof paths !=='object' || !paths || !paths.projectRoot){
67
+ throwError("Fichiers des chemins d'application invalide!!! merci d'exécuter l'application en environnement web|android|ios puis réessayez");
81
68
  }
82
- }
83
- const buildOutDir = path.resolve(electronProjectRoot,"dist");
84
- const indexFile = path.resolve(buildOutDir,"index.html");
85
- const webBuildDir = path.resolve(projectRoot,"web-build");
86
- const packagePath = path.resolve(projectRoot,"package.json");
87
- const url = parsedArgs.url && parsedArgs.url.trim() || "";
88
- const start = x=>{
89
- return new Promise((resolve,reject)=>{
90
- cmd = "electron "+electronProjectRoot+" url="+url;
91
- exec({
92
- cmd,
93
- projectRoot : electronProjectRoot,
94
- }).finally(()=>{
95
- console.log("ant to exit");
96
- })
97
- typeof (resolve) =='function' && setTimeout(resolve,1000);
98
- })
99
- };
100
- if(url){
101
- return start().then(process.exit);
102
- }
103
- const promise = new Promise((resolve,reject)=>{
104
- const next = ()=>{
105
- if(fs.existsSync(webBuildDir)){
106
- return copy(webBuildDir,buildOutDir).catch(reject).then(resolve);
107
- } else {
108
- reject("dossier web-build exporté par electron innexistant!!");
69
+ /**** le project root d'où a été lancé le script electron doit être le même que celui de l'application principale */
70
+ if(projectRoot !== paths.projectRoot){
71
+ throwError(`main app project root ${paths.projectRoot} must be equals to ${projectRoot} in which you want to generate electron app`);
72
+ }
73
+
74
+ const electronProjectRoot = path.resolve(projectRoot,"electron");
75
+ const isElectionInitialized = require("../electron/is-initialized")(electronProjectRoot);
76
+ process.env.isElectron = true;
77
+ process.env.isElectronScript = true;
78
+ if(!isElectionInitialized || script =='init'){
79
+ if(script !=='init'){
80
+ console.log("initializing electron application before ....");
109
81
  }
82
+ return require("./init")({
83
+ projectRoot,
84
+ electronDir,
85
+ electronProjectRoot,
86
+ paths,
87
+ });
88
+ }
89
+ require("../electron/create-index-file")(electronProjectRoot);
90
+ const outDir = out && path.dirname(out) && path.resolve(path.dirname(out),"electron") || path.resolve(electronProjectRoot,"bin")
91
+ if(!createDir(outDir)){
92
+ throwError("Impossible de créer le répertoire <<"+outDir+">> du fichier binaire!!");
93
+ }
94
+ const logoPath = paths.logo || paths.$assets && path.resolve(paths.$assets,"logo.png") || paths.$images && path.resolve(paths.$images,"logo.png");
95
+ if(!logoPath || !fs.existsSync(logoPath)){
96
+ if(logoPath){
97
+ console.warn("Logo de l'application innexistant!! Vous devez spécifier le logo de votre application, fichier ["+(logoPath)+"]")
110
98
  }
111
- if(!url && (parsedArgs.compile || !fs.existsSync(path.resolve(webBuildDir,"index.html")))){
112
- console.log("exporting expo web app ...");
113
- cmd = "npx expo export:web";
114
- return exec({cmd,projectRoot}).then(next).catch(reject);
115
- }
116
- next();
117
- });
118
- return promise.then(()=>{
119
- if(!fs.existsSync(buildOutDir) || !fs.existsSync(indexFile)){
120
- throwError("répertoire d'export web invalide où innexistant ["+buildOutDir+"]");
121
99
  }
122
- switch(parsedArgs.script){
123
- case "start":
124
- return start();
125
- break;
126
- case "build":
127
- break;
128
- case "generate-getTable" :
129
- require("./generate-tables")();
130
- break;
131
- default :
132
- if(!fs.existsSync(packagePath)){
133
- throwError("package.json file does not exist in "+projectRoot+". please make jure that your have running package script in expo root application");
134
- }
135
- const packageObj = require(`${packagePath}`);
136
- const electronPackage = require(`${path.resolve(electronProjectRoot,'package.json')}`);
137
- electronPackage.name = packageObj.name;
138
- electronPackage.version = packageObj.version;
139
- //copying package json in build folder
140
- writeFile(path.resolve(electronProjectRoot,"package.json"),JSON.stringify(electronPackage,null,"\t"));
141
- const platform = parsedArgs.platform || process.platform;
142
- console.log("packaing app from ",electronProjectRoot);
143
- return require("./package")({
144
- src : electronProjectRoot,
145
- dist : path.resolve(outDir,platform),
146
- platform,
147
- arch : parsedArgs.arch || undefined,
148
- projectRoot : electronProjectRoot,
149
- });
150
- break;
100
+ const buildOutDir = path.resolve(electronProjectRoot,"dist");
101
+ const indexFile = path.resolve(buildOutDir,"index.html");
102
+ const webBuildDir = path.resolve(projectRoot,"web-build");
103
+ const packagePath = path.resolve(projectRoot,"package.json");
104
+ const start = x=>{
105
+ return new Promise((resolve,reject)=>{
106
+ cmd = `electron "${electronProjectRoot}"${url? ` url="${url}"`:''}`;
107
+ exec({
108
+ cmd,
109
+ projectRoot : electronProjectRoot,
110
+ }).finally(()=>{
111
+ console.log("ant to exit");
112
+ })
113
+ typeof (resolve) =='function' && setTimeout(resolve,1000);
114
+ })
115
+ };
116
+ if(url){
117
+ return start().then(process.exit);
151
118
  }
152
- }).catch((e)=>{
153
- console.log(e," is cathing ggg");
154
- }).finally(()=>{
155
- process.exit();
119
+ const promise = new Promise((resolve,reject)=>{
120
+ const next = ()=>{
121
+ if(fs.existsSync(webBuildDir)){
122
+ return copy(webBuildDir,buildOutDir).catch(reject).then(resolve);
123
+ } else {
124
+ reject("dossier web-build exporté par electron innexistant!!");
125
+ }
126
+ }
127
+ if(!url && (compile || !fs.existsSync(path.resolve(webBuildDir,"index.html")))){
128
+ console.log("exporting expo web app ...");
129
+ cmd = "npx expo export:web";
130
+ return exec({cmd,projectRoot}).then(next).catch(reject);
131
+ }
132
+ next();
133
+ });
134
+ return promise.then(()=>{
135
+ if(!fs.existsSync(buildOutDir) || !fs.existsSync(indexFile)){
136
+ throwError("répertoire d'export web invalide où innexistant ["+buildOutDir+"]");
137
+ }
138
+ switch(script){
139
+ case "start":
140
+ return start();
141
+ break;
142
+ case "build":
143
+ break;
144
+ default :
145
+ if(!fs.existsSync(packagePath)){
146
+ throwError("package.json file does not exist in "+projectRoot+". please make jure that your have running package script in expo root application");
147
+ }
148
+ const packageObj = require(`${packagePath}`);
149
+ const electronPackage = require(`${path.resolve(electronProjectRoot,'package.json')}`);
150
+ electronPackage.name = packageObj.name;
151
+ electronPackage.version = packageObj.version;
152
+ //copying package json in build folder
153
+ writeFile(path.resolve(electronProjectRoot,"package.json"),JSON.stringify(electronPackage,null,"\t"));
154
+ platform = platform || process.platform;
155
+ console.log("packaing app from ",electronProjectRoot);
156
+ return require("./package")({
157
+ src : electronProjectRoot,
158
+ dist : path.resolve(outDir,platform),
159
+ platform,
160
+ arch : arch || undefined,
161
+ projectRoot : electronProjectRoot,
162
+ });
163
+ break;
164
+ }
165
+ }).catch((e)=>{
166
+ console.log(e," is cathing ggg");
167
+ }).finally(()=>{
168
+ process.exit();
169
+ });
170
+
156
171
  });
157
- } else {
158
- if(script ===createAppScript || script ==="init"){
159
- return require("./create-app")(parsedArgs,{projectRoot});
160
- }
161
- process.exit();
162
- }
172
+
173
+ program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.3.5",
3
+ "version": "7.4.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -42,6 +42,7 @@
42
42
  "expo-fix": "npx expo install --fix",
43
43
  "update-apexchart": "node ./bin/update-appex-chart.js",
44
44
  "update-pdfmake": "node ./bin/update-pdfmake.js",
45
+ "test-bin" : "node ./bin/index.js",
45
46
  "update-appexchart": "npm run update-apexchart",
46
47
  "delete-node-modules": "rimraf ./**/node_modules",
47
48
  "dev": "npx expo start --no-dev --minify -c",
@@ -71,7 +72,7 @@
71
72
  "@expo/html-elements": "^0.5.1",
72
73
  "@expo/vector-icons": "^13.0.0",
73
74
  "@faker-js/faker": "^8.0.2",
74
- "@fto-consult/common": "^3.73.3",
75
+ "@fto-consult/common": "^3.73.6",
75
76
  "@pchmn/expo-material3-theme": "^1.3.1",
76
77
  "@react-native-async-storage/async-storage": "1.18.2",
77
78
  "@react-native-community/datetimepicker": "7.2.0",
@@ -82,6 +83,7 @@
82
83
  "@react-navigation/stack": "^6.3.20",
83
84
  "@shopify/flash-list": "1.4.3",
84
85
  "apexcharts": "^3.45.0",
86
+ "commander": "^11.1.0",
85
87
  "expo": "^49.0.21",
86
88
  "expo-camera": "~13.4.4",
87
89
  "expo-clipboard": "~4.3.1",
@@ -1 +1 @@
1
- module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.2.3","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@babel/plugin-proposal-export-namespace-from":{"version":"7.18.9","url":"https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from","license":"MIT"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.72.19","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.9","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.17","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@react-navigation/stack":{"version":"6.3.20","url":"https://reactnavigation.org/docs/stack-navigator/","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.45.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.21","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.4","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sharing":{"version":"11.5.0","url":"https://docs.expo.dev/versions/latest/sdk/sharing/","license":"MIT"},"expo-sqlite":{"version":"11.3.3","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.2.0","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"is-plain-obj":{"version":"4.1.0","license":"MIT"},"js-base64":{"version":"3.7.5","license":"BSD-3-Clause"},"pdfmake":{"version":"0.2.8","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.6","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-get-random-values":{"version":"1.9.0","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.11.4","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.20.5","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.9","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.6.2","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"2.1.0","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};
1
+ module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.3.5","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@babel/plugin-proposal-export-namespace-from":{"version":"7.18.9","url":"https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from","license":"MIT"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.73.3","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.9","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.17","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@react-navigation/stack":{"version":"6.3.20","url":"https://reactnavigation.org/docs/stack-navigator/","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.45.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.21","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.4","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sharing":{"version":"11.5.0","url":"https://docs.expo.dev/versions/latest/sdk/sharing/","license":"MIT"},"expo-sqlite":{"version":"11.3.3","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.2.0","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"is-plain-obj":{"version":"4.1.0","license":"MIT"},"js-base64":{"version":"3.7.5","license":"BSD-3-Clause"},"pdfmake":{"version":"0.2.8","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.6","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-get-random-values":{"version":"1.9.0","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.11.4","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.20.5","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.9","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.6.2","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"2.1.0","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};