@globules-io/ogx.js
Advanced tools
Comparing version 1.8.7 to 1.8.8
@@ -1,25 +0,30 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
const copy = require('recursive-copy'); | ||
const src_ogx = path.normalize(__dirname+'/ogx'); | ||
const src_www = path.normalize(__dirname+'/www'); | ||
const src_lib = path.normalize(__dirname+'/www/js/lib'); | ||
const dest_www = path.normalize(__dirname+'./../../../www'); | ||
const src_ogx = path.normalize(__dirname+'/ogx'); | ||
const dest_ogx = path.normalize(__dirname+'./../../../ogx'); | ||
let index_exists = fs.existsSync(dest_www+'/index.html'); | ||
let app_exists = fs.existsSync(dest_www+'/app.json'); | ||
if(index_exists){ | ||
fs.renameSync(dest_www+'/index.html', dest_www+'/index.bak'); | ||
} | ||
if(app_exists){ | ||
fs.renameSync(dest_www+'/app.json', dest_www+'/app.bak'); | ||
} | ||
copy(src_www, dest_www, {overwrite:true}); | ||
const dest_lib = path.normalize(__dirname+'./../../js/lib'); | ||
//copy ogx folder | ||
copy(src_ogx, dest_ogx, {overwrite:true}); | ||
if(index_exists){ | ||
fs.unlinkSync(dest_www+'/index.html'); | ||
fs.renameSync(dest_www+'/index.bak', dest_www+'/index.html'); | ||
//if no www, copy the whole folder | ||
if(!fs.existsSync(dest_www)){ | ||
copy(src_www, dest_www); | ||
}else{ | ||
//if www, check if js and js/lib already there | ||
if(!fs.existsSync(dest_lib)){ | ||
copy(src_lib, dest_lib); | ||
}else{ | ||
//copy cryto, globules, howler, jquery, moment, mongogx | ||
let lib_folders = ['cryto', 'globules', 'howler', 'jquery', 'moment', 'mongogx']; | ||
let lib_folders_src; | ||
let lib_folders_dest; | ||
for(let i = 0; i < lib_folders.length; i++){ | ||
lib_folders_src = path.normalize(__dirname+'/www/js/lib/'+lib_folders[i]); | ||
lib_folders_dest = path.normalize(__dirname+'./../../js/lib/'+lib_folders[i]); | ||
copy(lib_folders_src, lib_folders_dest, {overwrite:true}); | ||
} | ||
} | ||
} | ||
if(app_exists){ | ||
fs.unlinkSync(dest_www+'/app.json'); | ||
fs.renameSync(dest_www+'/app.bak', dest_www+'/app.json'); | ||
} |
{ | ||
"name": "@globules-io/ogx.js", | ||
"version": "1.8.7", | ||
"version": "1.8.8", | ||
"description": "Javascript framework for webviews", | ||
"dependencies": { | ||
"fs": "^0.0.1-security", | ||
"fs-extra": "^10.0.0", | ||
"path": "latest", | ||
@@ -8,0 +8,0 @@ "recursive-copy": "^2.0.13" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
757087
264
+ Addedfs-extra@^10.0.0
+ Addedfs-extra@10.1.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removedfs@^0.0.1-security
- Removedfs@0.0.1-security(transitive)