@globules-io/ogx.js
Advanced tools
Comparing version 1.8.6 to 1.8.7-b
@@ -0,1 +1,2 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
@@ -7,3 +8,35 @@ const copy = require('recursive-copy'); | ||
const dest_ogx = path.normalize(__dirname+'./../../../ogx'); | ||
const dest_cli = path.normalize(__dirname+'/cli.json'); | ||
const dest_index = path.normalize(__dirname+'./../../../www/index.html'); | ||
const dest_index_bak = path.normalize(__dirname+'./../../../www/index.bak'); | ||
const dest_app = path.normalize(__dirname+'./../../../www/app.json'); | ||
const dest_app_bak = path.normalize(__dirname+'./../../../www/app.bak'); | ||
//if cli.json exists, check if we still use index.html | ||
//if we dont, don't copy | ||
//if index.html exits already, dont copy | ||
let app_exists = fs.existsSync(dest_app); | ||
let index_exists = fs.existsSync(dest_index); | ||
let copy_index = !index_exists; | ||
if(fs.existsSync(dest_cli)){ | ||
let cli_config = fs.readFileSync(dest_cli, 'utf-8'); | ||
if(cli_config.index !== 'index.html'){ | ||
copy_index = false; | ||
} | ||
} | ||
//if we're not copying, make a back up | ||
if(!copy_index){ | ||
fs.renameSync(dest_index, dest_index_bak); | ||
} | ||
if(app_exists){ | ||
fs.renameSync(dest_app, dest_app_bak); | ||
} | ||
copy(src_www, dest_www, {overwrite:true}); | ||
copy(src_ogx, dest_ogx, {overwrite:true}); | ||
copy(src_ogx, dest_ogx, {overwrite:true}); | ||
if(!copy_index){ | ||
fs.unlinkSync(dest_index); | ||
fs.renameSync(dest_index_bak, dest_index); | ||
} | ||
if(app_exists){ | ||
fs.unlinkSync(dest_app); | ||
fs.renameSync(dest_app_bak, dest_app); | ||
} |
{ | ||
"name": "@globules-io/ogx.js", | ||
"version": "1.8.6", | ||
"version": "1.8.7b", | ||
"description": "Javascript framework for webviews", | ||
"dependencies": { | ||
"fs": "^0.0.1-security", | ||
"path": "latest", | ||
@@ -7,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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
757342
274
3
1
6
2
35
+ Addedfs@^0.0.1-security
+ Addedfs@0.0.1-security(transitive)