sfdx-git-delta
Advanced tools
Comparing version 0.8.5 to 0.8.6
'use strict'; | ||
const path = require('path') | ||
const fs = require('fs') | ||
const fse = require('fs-extra') | ||
const child_process = require('child_process'); | ||
const metadata = require('./metadata/v46.json').reduce((p,c)=>{p[c.directoryName]=c; return p},{}); | ||
const fileUtils = require('./utils/fileUtils'); | ||
const METAFILE_SUFFIX = '-meta.xml'; | ||
@@ -63,8 +63,8 @@ | ||
.forEach(src => { | ||
fileUtils.copyFileSync(path.normalize(`${srcPath}/${src}`),path.normalize(`${targetPath}/${src}`)) | ||
fse.copySync(path.normalize(`${srcPath}/${src}`),path.normalize(`${targetPath}/${src}`)) | ||
}) | ||
} else { | ||
fileUtils.copyFileSync(source, target); | ||
fse.copySync(source, target); | ||
if(metadata[xmlType].metaFile === true) { | ||
fileUtils.copyFileSync(`${source}${METAFILE_SUFFIX}`, `${target}${METAFILE_SUFFIX}`) | ||
fse.copySync(`${source}${METAFILE_SUFFIX}`, `${target}${METAFILE_SUFFIX}`) | ||
} | ||
@@ -71,0 +71,0 @@ } |
@@ -18,12 +18,2 @@ 'use strict'; | ||
} | ||
static copyFileSync(src,dst) { | ||
if(!fs.existsSync(src) || !fs.lstatSync(src).isFile()){ | ||
return; | ||
} | ||
const dstFolder = path.parse(dst).dir; | ||
if (!fs.existsSync(dstFolder)){ | ||
fs.mkdirSync(dstFolder,{ recursive: true }) | ||
} | ||
fs.copyFileSync(src,dst) | ||
} | ||
}; |
{ | ||
"name": "sfdx-git-delta", | ||
"version": "0.8.5", | ||
"version": "0.8.6", | ||
"description": "Generate the sfdx content in source format and destructive change from two git commits", | ||
@@ -25,2 +25,3 @@ "keyword": [ | ||
"commander": "^2.20.0", | ||
"fs-extra": "^8.1.0", | ||
"xmlbuilder": "^13.0.2" | ||
@@ -27,0 +28,0 @@ }, |
@@ -61,2 +61,3 @@ # sfdx-git-delta | ||
* [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) - An XML builder for node.js similar to java-xmlbuilder. | ||
* [fs-extra](https://github.com/jprichardson/node-fs-extra) - Node.js: extra methods for the fs object like copy(), remove(), mkdirs(). | ||
@@ -63,0 +64,0 @@ ## Versioning |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
74
39480
3
10
996
3
+ Addedfs-extra@^8.1.0
+ Addedfs-extra@8.1.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addeduniversalify@0.1.2(transitive)