@fto-consult/expo-ui 1.1.14 → 1.1.16

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/babel.config.js CHANGED
@@ -1,9 +1,4 @@
1
1
  module.exports = function(api,opts) {
2
- const script = require("./expo-ui-current-script")(__filename);
3
- if(script){
4
- console.log("found local babel.config.js on expo-ui dev path at ",script);
5
- return require(script)(api,opts);
6
- }
7
2
  opts = typeof opts =='object' && opts ? opts : {};
8
3
  ///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
9
4
  let environmentPath = opts.environmentPath || opts.envPath;
package/expo-ui-path.js CHANGED
@@ -25,12 +25,5 @@ const lookupForExpoUIPath = ()=>{
25
25
  }
26
26
  ///retourne le chemin vers le package @expo-ui
27
27
  module.exports = (()=>{
28
- const isDevFile = path.resolve(dir,"expo-ui-production-path.js");
29
- const expoUIPath = lookupForExpoUIPath();
30
- try {
31
- var writeStream = fs.createWriteStream(isDevFile);
32
- writeStream.write("module.exports=\""+(expoUIPath||"@fto-consult/expo-ui")+"\";");
33
- writeStream.end();
34
- } catch{}
35
- return expoUIPath;
28
+ return lookupForExpoUIPath() || "@fto-consult/expo-ui";
36
29
  })();
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { registerRootComponent } from 'expo';
2
-
2
+ import appConfig from "$capp/config";
3
3
 
4
4
  /**** initialise l'application expoUI avec les paramètres de configuration
5
5
  * les options sont de la forme :
@@ -8,13 +8,6 @@ import { registerRootComponent } from 'expo';
8
8
  * }
9
9
  */
10
10
  export default function ExpoUIApp (options){
11
- const expoUIPath = require("./expo-ui-production-path");
12
- if(expoUIPath && !expoUIPath.includes("@fto-consult/")){
13
- const path = (expoUIPath+"/").replace("//","/")+"src/index";
14
- console.log("found local expo-ui dev index path at ",expoUIPath," is expo ui path heinn and path is ",path);
15
- return require(`${path}`)(options);
16
- }
17
- const appConfig = require("$capp/config").default;
18
11
  options = options && typeof options =='object' && !Array.isArray(options)? options : {};
19
12
  const config = defaultObj(options.config);
20
13
  appConfig.current = config;
package/metro.config.js CHANGED
@@ -1,4 +1,50 @@
1
+ const { getDefaultConfig } = require('@expo/metro-config');
1
2
  const path = require("path");
2
- module.exports = require("./expo.metro.config")({
3
- dir : path.resolve(__dirname)
4
- });
3
+ const isCaseSensitive = require("./is-os-case-sensitive");
4
+ module.exports = (opts)=>{
5
+ opts = opts && typeof opts =='object'? opts : {};
6
+ let {dir,nodeModulesPaths,assetExts,sourceExts} = opts;
7
+ nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
8
+ assetExts = Array.isArray(assetExts)? assetExts: [];
9
+ sourceExts= Array.isArray(sourceExts)?sourceExts : [];
10
+ dir = dir || path.resolve(__dirname);
11
+ const projectRoot = path.resolve(dir);
12
+ const localDir = path.resolve(__dirname);
13
+ const config = getDefaultConfig(projectRoot);
14
+ config.watchFolders = [projectRoot];
15
+ if(projectRoot !== localDir){
16
+ config.watchFolders.push(localDir);
17
+ }
18
+ config.resolver.assetExts = [
19
+ ...config.resolver.assetExts,
20
+ ...assetExts,
21
+ "db",
22
+ "txt"
23
+ ];
24
+ config.resolver.sourceExts = [
25
+ ...config.resolver.sourceExts,
26
+ ...sourceExts,"txt",
27
+ 'jsx', 'js','tsx',
28
+ ]
29
+ const allNodePaths = [
30
+ path.resolve(projectRoot, 'node_modules'),
31
+ path.resolve(localDir, 'node_modules'),
32
+ ...nodeModulesPaths,
33
+ ];
34
+ const existingNodesPath= {},nPaths = [];
35
+ allNodePaths.map(p=>{
36
+ if(!p || typeof p !='string') return;
37
+ if(isCaseSensitive){
38
+ p = p.toLocaleLowerCase();
39
+ }
40
+ if(!existingNodesPath[p]){
41
+ existingNodesPath[p] = true;
42
+ nPaths.push(p);
43
+ }
44
+ });
45
+
46
+ config.resolver.nodeModulesPaths = nPaths;
47
+ // 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
48
+ config.resolver.disableHierarchicalLookup = true;
49
+ return config;
50
+ }
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
- {
2
- "name": "@fto-consult/expo-ui",
3
- "version": "1.1.14",
4
- "description": "Bibliothèque de composants UI Expo,react-native",
5
- "main": "index.js",
6
- "scripts": {
7
- "publish": "npm publish --access=public",
8
- "unpublish": "npm -f unpublish @fto-consult/expo-ui",
9
- "build-web": "",
10
- "dev": "npx expo start -c --no-minify",
11
- "start": "npx expo start --dev --no-minify",
12
- "start-d": "npx expo start -c --no-dev --no-minify",
13
- "start-p": "npm run start-d",
14
- "expo-start-client": "npx expo start --dev --no-minify --dev-client",
15
- "start-m": "npx expo start - c--dev--no -minify",
16
- "android": "npx expo start --android -c",
17
- "ios": "npx expo start --ios",
18
- "web": "npx expo start --web",
19
- "web-c": "npx expo start --web -c",
20
- "eject": "expo eject",
21
- "emulator": "npm run android-emulator",
22
- "web-server": "npx serve web-build",
23
- "build-android": "eas build --clear-cache -p android --profile preview",
24
- "build-android-local": "eas build --platform android --local",
25
- "build-android-dist": "eas build --clear-cache -p android",
26
- "build-ios": "eas build --clear-cache -p ios --profile preview",
27
- "build-ios-dist": "eas build --clear-cache -p ios",
28
- "install-apk": "adb -s emulator-5554 install myapp.apk",
29
- "android-emulator": "emulator -avd EMULATOR",
30
- "flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
31
- "build-electron": "electron-webpack && electron-builder --dir -c.compression=store",
32
- "test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
33
- "compile-electron": "webpack --config ./electron/webpack.config.js",
34
- "compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
35
- "electron": "electron ./electron",
36
- "logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
37
- "logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
38
- "electron-c": "npm run compile-electron && npm run electron",
39
- "electron-p": "npm run compile-electron-p && npm run electron",
40
- "update-app-version": "node ./update-app-version.js",
41
- "find-licenses": "node ./find-licenses.js",
42
- "fix-dependencies": "expo doctor --fix-dependencies"
43
- },
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://github.com/borispipo/expo-ui.git"
47
- },
48
- "keywords": [
49
- "Expo",
50
- "React-Native"
51
- ],
52
- "author": "Boris Fouomene",
53
- "license": "ISC",
54
- "bugs": {
55
- "url": "https://github.com/borispipo/expo-ui/issues"
56
- },
57
- "homepage": "https://github.com/borispipo/expo-ui#readme",
58
- "dependencies": {
59
- "@babel/preset-react": "^7.18.6",
60
- "@emotion/native": "^11.10.0",
61
- "@expo/html-elements": "^0.2.0",
62
- "@expo/metro-config": "^0.4.0",
63
- "@expo/webpack-config": "^0.17.2",
64
- "@fto-consult/common": "^1.1.28",
65
- "@gorhom/portal": "^1.0.14",
66
- "@react-native-async-storage/async-storage": "~1.17.3",
67
- "@react-native-community/datetimepicker": "6.2.0",
68
- "@react-native-community/netinfo": "9.3.0",
69
- "@react-navigation/native": "^6.0.13",
70
- "@react-navigation/native-stack": "^6.9.1",
71
- "@shopify/flash-list": "1.1.0",
72
- "babel-plugin-inline-dotenv": "^1.7.0",
73
- "babel-plugin-module-resolver": "^4.1.0",
74
- "babel-plugin-transform-inline-environment-variables": "^0.4.4",
75
- "expo": "^46.0.15",
76
- "expo-camera": "~12.3.0",
77
- "expo-linking": "~3.2.2",
78
- "expo-sqlite": "~10.3.0",
79
- "expo-status-bar": "~1.4.0",
80
- "expo-system-ui": "~1.3.0",
81
- "expo-web-browser": "~11.0.0",
82
- "google-libphonenumber": "^3.2.31",
83
- "htmlparser2-without-node-native": "^3.9.2",
84
- "parent-package-json": "^2.0.1",
85
- "prop-types": "^15.8.1",
86
- "react-apexcharts": "^1.4.0",
87
- "react-content-loader": "^6.2.0",
88
- "react-dom": "18.0.0",
89
- "react-native": "0.69.6",
90
- "react-native-big-list": "^1.5.5",
91
- "react-native-gesture-handler": "~2.5.0",
92
- "react-native-paper": "^4.12.5",
93
- "react-native-paper-dates": "^0.9.2",
94
- "react-native-reanimated": "~2.9.1",
95
- "react-native-safe-area-context": "4.3.1",
96
- "react-native-svg": "12.3.0",
97
- "react-native-web": "~0.18.7",
98
- "react-native-webview": "11.23.0",
99
- "sharp-cli": "^2.1.0",
100
- "tippy.js": "^6.3.7"
101
- }
102
- }
1
+ {
2
+ "name": "@fto-consult/expo-ui",
3
+ "version": "1.1.16",
4
+ "description": "Bibliothèque de composants UI Expo,react-native",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "publish": "npm publish --access=public",
8
+ "unpublish": "npm -f unpublish @fto-consult/expo-ui",
9
+ "build-web": "",
10
+ "dev": "npx expo start -c --no-minify",
11
+ "start": "npx expo start --dev --no-minify",
12
+ "start-d": "npx expo start -c --no-dev --no-minify",
13
+ "start-p": "npm run start-d",
14
+ "expo-start-client": "npx expo start --dev --no-minify --dev-client",
15
+ "start-m": "npx expo start - c--dev--no -minify",
16
+ "android": "npx expo start --android -c",
17
+ "ios": "npx expo start --ios",
18
+ "web": "npx expo start --web",
19
+ "web-c": "npx expo start --web -c",
20
+ "eject": "expo eject",
21
+ "emulator": "npm run android-emulator",
22
+ "web-server": "npx serve web-build",
23
+ "build-android": "eas build --clear-cache -p android --profile preview",
24
+ "build-android-local": "eas build --platform android --local",
25
+ "build-android-dist": "eas build --clear-cache -p android",
26
+ "build-ios": "eas build --clear-cache -p ios --profile preview",
27
+ "build-ios-dist": "eas build --clear-cache -p ios",
28
+ "install-apk": "adb -s emulator-5554 install myapp.apk",
29
+ "android-emulator": "emulator -avd EMULATOR",
30
+ "flipper": "npx cross-env METRO_SERVER_PORT=19000 E:\\Studies\\react-native\\debugger\\Flipper-win\\Flipper.exe",
31
+ "build-electron": "electron-webpack && electron-builder --dir -c.compression=store",
32
+ "test:build": "electron-webpack && electron-builder --dir -c.compression=store -c.mac.identity=null",
33
+ "compile-electron": "webpack --config ./electron/webpack.config.js",
34
+ "compile-electron-p": "webpack --config ./electron/webpack.config.js --mode=production",
35
+ "electron": "electron ./electron",
36
+ "logcat": "adb -d logcat com.ftc.apps.salite1:E > errors.txt",
37
+ "logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
38
+ "electron-c": "npm run compile-electron && npm run electron",
39
+ "electron-p": "npm run compile-electron-p && npm run electron",
40
+ "update-app-version": "node ./update-app-version.js",
41
+ "find-licenses": "node ./find-licenses.js",
42
+ "fix-dependencies": "expo doctor --fix-dependencies"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/borispipo/expo-ui.git"
47
+ },
48
+ "keywords": [
49
+ "Expo",
50
+ "React-Native"
51
+ ],
52
+ "author": "Boris Fouomene",
53
+ "license": "ISC",
54
+ "bugs": {
55
+ "url": "https://github.com/borispipo/expo-ui/issues"
56
+ },
57
+ "homepage": "https://github.com/borispipo/expo-ui#readme",
58
+ "dependencies": {
59
+ "@babel/preset-react": "^7.18.6",
60
+ "@emotion/native": "^11.10.0",
61
+ "@expo/html-elements": "^0.2.0",
62
+ "@expo/metro-config": "^0.4.0",
63
+ "@expo/webpack-config": "^0.17.2",
64
+ "@fto-consult/common": "^1.1.28",
65
+ "@gorhom/portal": "^1.0.14",
66
+ "@react-native-async-storage/async-storage": "~1.17.3",
67
+ "@react-native-community/datetimepicker": "6.2.0",
68
+ "@react-native-community/netinfo": "9.3.0",
69
+ "@react-navigation/native": "^6.0.13",
70
+ "@react-navigation/native-stack": "^6.9.1",
71
+ "@shopify/flash-list": "1.1.0",
72
+ "babel-plugin-inline-dotenv": "^1.7.0",
73
+ "babel-plugin-module-resolver": "^4.1.0",
74
+ "babel-plugin-transform-inline-environment-variables": "^0.4.4",
75
+ "expo": "^46.0.15",
76
+ "expo-camera": "~12.3.0",
77
+ "expo-linking": "~3.2.2",
78
+ "expo-sqlite": "~10.3.0",
79
+ "expo-status-bar": "~1.4.0",
80
+ "expo-system-ui": "~1.3.0",
81
+ "expo-web-browser": "~11.0.0",
82
+ "google-libphonenumber": "^3.2.31",
83
+ "htmlparser2-without-node-native": "^3.9.2",
84
+ "parent-package-json": "^2.0.1",
85
+ "prop-types": "^15.8.1",
86
+ "react-apexcharts": "^1.4.0",
87
+ "react-content-loader": "^6.2.0",
88
+ "react-dom": "18.0.0",
89
+ "react-native": "0.69.6",
90
+ "react-native-big-list": "^1.5.5",
91
+ "react-native-gesture-handler": "~2.5.0",
92
+ "react-native-paper": "^4.12.5",
93
+ "react-native-paper-dates": "^0.9.2",
94
+ "react-native-reanimated": "~2.9.1",
95
+ "react-native-safe-area-context": "4.3.1",
96
+ "react-native-svg": "12.3.0",
97
+ "react-native-web": "~0.18.7",
98
+ "react-native-webview": "11.23.0",
99
+ "sharp-cli": "^2.1.0",
100
+ "tippy.js": "^6.3.7"
101
+ }
102
+ }
package/webpack.config.js CHANGED
@@ -2,11 +2,6 @@
2
2
  const createExpoWebpackConfigAsync = require('@expo/webpack-config')
3
3
  // Expo CLI will await this method so you can optionally return a promise.
4
4
  module.exports = async function(env, argv,opts) {
5
- const script = require("./expo-ui-current-script")(__filename);
6
- if(script){
7
- console.log("found local webpack.config.js on expo-ui dev path at ",script);
8
- return require(script)(env, argv,opts);
9
- }
10
5
  const path = require("path");
11
6
  const dir = path.resolve(__dirname);
12
7
  const fs = require("fs");
@@ -1,55 +0,0 @@
1
- const { getDefaultConfig } = require('@expo/metro-config');
2
- const path = require("path");
3
- const isCaseSensitive = require("./is-os-case-sensitive");
4
- module.exports = (opts)=>{
5
- const script = require("./expo-ui-current-script")(__filename);
6
- if(script){
7
- console.log("found local metro-config dev file path at ",script);
8
- return require(script)(opts);
9
- }
10
- opts = opts && typeof opts =='object'? opts : {};
11
- let {dir,nodeModulesPaths,assetExts,sourceExts} = opts;
12
- nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
13
- assetExts = Array.isArray(assetExts)? assetExts: [];
14
- sourceExts= Array.isArray(sourceExts)?sourceExts : [];
15
- dir = dir || path.resolve(__dirname);
16
- const projectRoot = path.resolve(dir);
17
- const localDir = path.resolve(__dirname);
18
- const config = getDefaultConfig(projectRoot);
19
- config.watchFolders = [projectRoot];
20
- if(projectRoot !== localDir){
21
- config.watchFolders.push(localDir);
22
- }
23
- config.resolver.assetExts = [
24
- ...config.resolver.assetExts,
25
- ...assetExts,
26
- "db",
27
- "txt"
28
- ];
29
- config.resolver.sourceExts = [
30
- ...config.resolver.sourceExts,
31
- ...sourceExts,"txt",
32
- 'jsx', 'js','tsx',
33
- ]
34
- const allNodePaths = [
35
- path.resolve(projectRoot, 'node_modules'),
36
- path.resolve(localDir, 'node_modules'),
37
- ...nodeModulesPaths,
38
- ];
39
- const existingNodesPath= {},nPaths = [];
40
- allNodePaths.map(p=>{
41
- if(!p || typeof p !='string') return;
42
- if(isCaseSensitive){
43
- p = p.toLocaleLowerCase();
44
- }
45
- if(!existingNodesPath[p]){
46
- existingNodesPath[p] = true;
47
- nPaths.push(p);
48
- }
49
- });
50
-
51
- config.resolver.nodeModulesPaths = nPaths;
52
- // 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
53
- config.resolver.disableHierarchicalLookup = true;
54
- return config;
55
- }