@fto-consult/expo-ui 8.21.0 → 8.21.2
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/{create-transpile-module-transformer.js → .other/create-transpile-module-transformer.js} +1 -1
- package/babel.config.js +0 -1
- package/{app.json → bin/create-app/app.json} +22 -22
- package/bin/create-app.js +1 -1
- package/package.json +2 -3
- package/edit-json-file.js +0 -41
- package/env.js +0 -11
- package/expo-ui-root-path.old.js +0 -16
- package/main.js +0 -4
- package/parse-env.js +0 -47
- package/update-app-version.js +0 -19
- /package/{.env.readMe.txt → .other/.env.readMe.txt} +0 -0
- /package/{GettingStarted with expo-ui.txt → .other/GettingStarted with expo-ui.txt} +0 -0
- /package/{appConfig.txt → .other/appConfig.txt} +0 -0
- /package/{delete-node-modules.txt → .other/delete-node-modules.txt} +0 -0
- /package/{docs.tools.txt → .other/docs.tools.txt} +0 -0
- /package/{metro-exotic-transformer.js → .other/metro-exotic-transformer.js} +0 -0
- /package/{normalize-countries.js → .other/normalize-countries.js} +0 -0
- /package/{readChart.txt → .other/readChart.txt} +0 -0
- /package/{readMe.babel.config.alias.txt → .other/readMe.babel.config.alias.txt} +0 -0
- /package/{setup-android-ndk.txt → .other/setup-android-ndk.txt} +0 -0
- /package/{eas.json → bin/create-app/eas.json} +0 -0
- /package/{find-licenses.js → bin/find-licenses.js} +0 -0
package/babel.config.js
CHANGED
@@ -2,7 +2,6 @@ const path = require("path");
|
|
2
2
|
const fs = require("fs");
|
3
3
|
|
4
4
|
module.exports = function(api,opts) {
|
5
|
-
api.cache(true);
|
6
5
|
opts = typeof opts =='object' && opts ? opts : {};
|
7
6
|
const inlineDovOptions = { unsafe: true};
|
8
7
|
const platform = api.caller(caller => caller && caller.platform);
|
@@ -1,22 +1,22 @@
|
|
1
|
-
{
|
2
|
-
"expo": {
|
3
|
-
"name": "expo-ui",
|
4
|
-
"slug": "fto-consult-expo-ui",
|
5
|
-
"scheme": "fto-consult-expo-ui",
|
6
|
-
"version": "1.0.0",
|
7
|
-
"orientation": "portrait",
|
8
|
-
"expoSdkVersion" : "50",
|
9
|
-
"web": {
|
10
|
-
"bundler": "webpack"
|
11
|
-
},
|
12
|
-
"android": {
|
13
|
-
"package": "com.borispipo.ftoconsultexpoui"
|
14
|
-
},
|
15
|
-
"extra": {
|
16
|
-
"eas": {
|
17
|
-
"projectId": "b895ce11-4941-4ea9-80da-b24d5abb4483"
|
18
|
-
}
|
19
|
-
}
|
20
|
-
},
|
21
|
-
"userInterfaceStyle": "automatic"
|
22
|
-
}
|
1
|
+
{
|
2
|
+
"expo": {
|
3
|
+
"name": "expo-ui",
|
4
|
+
"slug": "fto-consult-expo-ui",
|
5
|
+
"scheme": "fto-consult-expo-ui",
|
6
|
+
"version": "1.0.0",
|
7
|
+
"orientation": "portrait",
|
8
|
+
"expoSdkVersion" : "50",
|
9
|
+
"web": {
|
10
|
+
"bundler": "webpack"
|
11
|
+
},
|
12
|
+
"android": {
|
13
|
+
"package": "com.borispipo.ftoconsultexpoui"
|
14
|
+
},
|
15
|
+
"extra": {
|
16
|
+
"eas": {
|
17
|
+
"projectId": "b895ce11-4941-4ea9-80da-b24d5abb4483"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"userInterfaceStyle": "automatic"
|
22
|
+
}
|
package/bin/create-app.js
CHANGED
@@ -207,7 +207,7 @@ const createAPPJSONFile = (projectRoot,{name,version})=>{
|
|
207
207
|
appJSONManager.save();
|
208
208
|
}
|
209
209
|
const eas = path.resolve(projectRoot,"eas.json");
|
210
|
-
const cEas = path.resolve(__dirname,"
|
210
|
+
const cEas = path.resolve(__dirname,"create-app","eas.json");
|
211
211
|
if(!fs.existsSync(eas) && fs.existsSync(cEas)){
|
212
212
|
try {
|
213
213
|
copy(cEas,eas,{overwrite:false})
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.21.
|
3
|
+
"version": "8.21.2",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -37,8 +37,7 @@
|
|
37
37
|
"logcat-export": "adb -d logcat com.ftc.apps.salite1 *:S > logcat.txt",
|
38
38
|
"electron-c": "npm run compile-electron && npm run electron",
|
39
39
|
"electron-p": "npm run compile-electron-p && npm run electron",
|
40
|
-
"
|
41
|
-
"find-licenses": "node ./find-licenses.js",
|
40
|
+
"find-licenses": "node ./bin/find-licenses.js",
|
42
41
|
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
43
42
|
"expo-fix": "npx expo install --fix",
|
44
43
|
"update-apexchart": "node ./bin/update-appex-chart.js",
|
package/edit-json-file.js
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
/*** met à jour dynamiquement la version de l'application */
|
2
|
-
const jsonfile = require('jsonfile');
|
3
|
-
const fs = require('fs')
|
4
|
-
|
5
|
-
function recursiveUpdate(initial, update,recursiveArray){
|
6
|
-
initial = initial && typeof initial == 'object'? initial : {};
|
7
|
-
for(prop in update){
|
8
|
-
if({}.hasOwnProperty.call(update, prop)){
|
9
|
-
if(update[prop] && typeof update[prop] === 'object'){
|
10
|
-
if(Array.isArray(update[prop]) && recursiveArray !==false){
|
11
|
-
initial[prop] = update[prop];
|
12
|
-
} else {
|
13
|
-
recursiveUpdate(initial[prop], update[prop],recursiveArray);
|
14
|
-
}
|
15
|
-
} else if(typeof update[prop] == 'string' && update[prop] ) {
|
16
|
-
initial[prop] = update[prop].toString().replace(/\+/g, ' ');
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
return initial;
|
21
|
-
}
|
22
|
-
|
23
|
-
function editJsonFile(packagePath,config){
|
24
|
-
if(!fs.existsSync(packagePath)) return;
|
25
|
-
try {
|
26
|
-
let packaged = jsonfile.readFileSync(packagePath);
|
27
|
-
if(!config || typeof config != 'object') return false;
|
28
|
-
recursiveUpdate(packaged,config);
|
29
|
-
jsonfile.writeFileSync(packagePath, packaged, {spaces: 4})
|
30
|
-
return true;
|
31
|
-
}
|
32
|
-
catch (e) {
|
33
|
-
process.stdout.write('An exception occurred:\n')
|
34
|
-
process.stdout.write(' ' + e.message)
|
35
|
-
process.stdout.write('\n')
|
36
|
-
process.exit(1)
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
|
41
|
-
module.exports = editJsonFile;
|
package/env.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
|
2
|
-
//permet de retourner le contenu de la variable d'environnement .env de l'application//
|
3
|
-
module.exports = function(){
|
4
|
-
const fs = require("fs");
|
5
|
-
const path = require("path");
|
6
|
-
try {
|
7
|
-
const envPath = path.resolve(process.cwd(),".env");
|
8
|
-
return fs.existsSync(envPath)? require("./parse-env")(fs.readFileSync(envPath,'utf8')) : {};
|
9
|
-
} catch{}
|
10
|
-
return {};
|
11
|
-
}
|
package/expo-ui-root-path.old.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
if(isDevEnv){
|
2
|
-
const rootPath = process.cwd();
|
3
|
-
const src = path.resolve(rootPath,"src");
|
4
|
-
try {
|
5
|
-
const envObj = require("./parse-env")();
|
6
|
-
const euPathm = typeof envObj.EXPO_UI_ROOT_PATH =="string" && envObj.EXPO_UI_ROOT_PATH && path.resolve(envObj.EXPO_UI_ROOT_PATH)||'';
|
7
|
-
const eu = euPathm && fs.existsSync(euPathm)? euPathm : null;
|
8
|
-
if(eu && fs.existsSync(path.resolve(eu,"src")) && fs.existsSync(path.resolve(eu,"webpack.config.js"))){
|
9
|
-
return path.resolve(eu,suffix).replace(sep,(sep+sep));
|
10
|
-
}
|
11
|
-
} catch{}
|
12
|
-
const expoUi = path.resolve(rootPath,"expo-ui");
|
13
|
-
if(fs.existsSync(src) && fs.existsSync(expoUi) && fs.existsSync(path.resolve(expoUi,"webpack.config.js"))){
|
14
|
-
return path.resolve(expoUi,suffix).replace(sep,(sep+sep));
|
15
|
-
}
|
16
|
-
}
|
package/main.js
DELETED
package/parse-env.js
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg
|
2
|
-
const fs = require("fs");
|
3
|
-
const path = require("path");
|
4
|
-
// Parser src into an Object
|
5
|
-
module.exports = function parse (src) {
|
6
|
-
if(typeof src !=='string' || !src.trim()){
|
7
|
-
try {
|
8
|
-
const envPath = path.resolve(process.cwd(),".env");
|
9
|
-
src = fs.existsSync(envPath)? fs.readFileSync(envPath,'utf8') :"";
|
10
|
-
} catch{}
|
11
|
-
}
|
12
|
-
if(typeof src !=='string' || !src) return {};
|
13
|
-
const obj = {}
|
14
|
-
// Convert buffer to string
|
15
|
-
let lines = src.toString()
|
16
|
-
|
17
|
-
// Convert line breaks to same format
|
18
|
-
lines = lines.replace(/\r\n?/mg, '\n')
|
19
|
-
|
20
|
-
let match
|
21
|
-
while ((match = LINE.exec(lines)) != null) {
|
22
|
-
const key = match[1]
|
23
|
-
|
24
|
-
// Default undefined or null to empty string
|
25
|
-
let value = (match[2] || '')
|
26
|
-
|
27
|
-
// Remove whitespace
|
28
|
-
value = value.trim()
|
29
|
-
|
30
|
-
// Check if double quoted
|
31
|
-
const maybeQuote = value[0]
|
32
|
-
|
33
|
-
// Remove surrounding quotes
|
34
|
-
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2')
|
35
|
-
|
36
|
-
// Expand newlines if double quoted
|
37
|
-
if (maybeQuote === '"') {
|
38
|
-
value = value.replace(/\\n/g, '\n')
|
39
|
-
value = value.replace(/\\r/g, '\r')
|
40
|
-
}
|
41
|
-
|
42
|
-
// Add to object
|
43
|
-
obj[key] = value
|
44
|
-
}
|
45
|
-
|
46
|
-
return obj
|
47
|
-
}
|
package/update-app-version.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
const editJsonFile = require("./edit-json-file.js");
|
2
|
-
const fs = require("fs");
|
3
|
-
/***** le fichier de configuration doit être stocké dans le repertoire /src/config.js où src est le repertoire source du projet parent qui a installé l'application */
|
4
|
-
const run = () => {
|
5
|
-
const parentPackage = require("./parent-package");
|
6
|
-
if(!parentPackage) return;
|
7
|
-
console.log("before updating parent package version ",parentPackage)
|
8
|
-
const srcParent = path.dirname(parentPackage,"src","config.js");
|
9
|
-
if(fs.existsSync(srcParent)){
|
10
|
-
const appConfig = require(srcParent);
|
11
|
-
if(appConfig && typeof appConfig =='object'){
|
12
|
-
console.log("updating parent package version ",parentPackage)
|
13
|
-
let config = {version:appConfig.version};
|
14
|
-
editJsonFile(parentPackage,config);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
run();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|