@fto-consult/expo-ui 5.6.5 → 5.6.7

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/copy-env-file.js CHANGED
@@ -6,8 +6,9 @@ const writeFile = require("./electron/utils/writeFile");
6
6
  */
7
7
  module.exports = (projectRoot,forceCreate)=>{
8
8
  projectRoot = projectRoot && typeof projectRoot =="string" && fs.existsSync(projectRoot) && projectRoot || process.cwd();
9
- const environmentPath = path.resolve(projectRoot,".env");
10
- const localEnv = path.resolve(__dirname,".env");
9
+ const environmentPath = path.resolve(projectRoot,"./.env");
10
+ const localEnv = path.resolve(__dirname,"./.env");
11
+ console.log(localEnv,environmentPath," is local and tooo")
11
12
  if(environmentPath && fs.existsSync(environmentPath)){
12
13
  // File ".env" will be created or overwritten by default.
13
14
  try {
@@ -1,7 +1,14 @@
1
1
  const fs = require("fs");
2
+ const p = require("path");
2
3
  module.exports = function writeFile(path, contents, cb) {
3
- if(require("./createDir")(path)){
4
- return fs.writeFileSync(path, contents, cb);
4
+ if(typeof path =='string' && path){
5
+ const fileName = p.basename(path);
6
+ if(fileName){
7
+ const pp = p.dirname(path);
8
+ if(require("./createDir")(pp)){
9
+ return fs.writeFileSync(p.join(pp,fileName), contents, cb);
10
+ }
11
+ }
5
12
  }
6
13
  throw {message : 'impossible de créer le repertoire associé au fichier'+path};
7
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "5.6.5",
3
+ "version": "5.6.7",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {