samba-client
Advanced tools
Comparing version
@@ -8,7 +8,7 @@ module.exports = { | ||
}, | ||
extends: ["standard", "prettier"], | ||
extends: ["standard", "prettier", "plugin:n/recommended"], | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
ecmaVersion: 2020, | ||
}, | ||
rules: {}, | ||
}; |
17
index.js
@@ -14,4 +14,9 @@ "use strict"; | ||
const getCleanedSmbClientArgs = (args) => | ||
args.map((arg) => `"${arg.replace(singleSlash, "\\")}"`).join(" "); | ||
const getCleanedSmbClientArgs = (args) => { | ||
if (Array.isArray(args)) { | ||
return args.map((arg) => `"${arg.replace(singleSlash, "\\")}"`).join(" "); | ||
} else { | ||
return `"${args.replace(singleSlash, "\\")}"`; | ||
} | ||
}; | ||
@@ -33,3 +38,7 @@ class SambaClient { | ||
async getFile(path, destination, workingDir) { | ||
return await this.execute("get", [path, destination], workingDir); | ||
return await this.execute( | ||
"get", | ||
`${getCleanedSmbClientArgs(path)} "${destination}"`, | ||
workingDir | ||
); | ||
} | ||
@@ -105,3 +114,3 @@ | ||
for (const content of remoteDirContents.matchAll( | ||
/\s*(.+?)\s{6,}(.)\s+([0-9]+)\s{2}(.+)/g | ||
/\s*(.+?)\s{6,}([A-Z0-9]{1,2})\s+([0-9]+)\s{2}(.+)/g | ||
)) { | ||
@@ -108,0 +117,0 @@ remoteDirList.push({ |
{ | ||
"name": "samba-client", | ||
"version": "6.0.0", | ||
"version": "7.1.2", | ||
"description": "wrapper for smbclient", | ||
@@ -29,14 +29,17 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@types/node": "^18.11.7", | ||
"eslint": "^8.8.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"@types/node": "^18.15.3", | ||
"eslint": "^8.36.0", | ||
"eslint-config-prettier": "^8.7.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-n": "^15.6.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"prettier": "^2.2.1" | ||
"prettier": "^2.8.4" | ||
}, | ||
"dependencies": { | ||
"execa": "^5.1.1" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11328
2.2%264
3.53%1
Infinity%