BREAKING CHANGE: update to use nodeJS v16

Since it's used in Github environment it should not have any impact in usage.
Just in case major version updated.

Fixes #82
This commit is contained in:
Dragan Filipovic committed 2022-10-28 03:44:28 +02:00
1 parent c711f2c339
commit 12adb9b839
7 files changed
+2532 -814

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [14.x]
node-version: [16.x]
steps:
- name: Checkout
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 14.x ]
node-version: [ 16.x ]
steps:
- name: Checkout
uses: actions/checkout@v2
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 14.x ]
node-version: [ 16.x ]
steps:
- name: Checkout
+1 -1
View File
@@ -35,7 +35,7 @@ outputs:
status:
description: "Status"
runs:
using: "node12"
using: "node16"
main: "dist/index.js"
branding:
color: "green"
+1 -1
View File
@@ -1,2 +1,2 @@
#!/usr/bin/env node
(()=>{var e={569:(e,r,t)=>{e.exports=t(325)},325:(e,r,t)=>{"use strict";var n=t(129).exec;var s=t(129).execSync;var o=t(747);var c=t(622);var i=o.access;var a=o.accessSync;var u=o.constants||o;var l=process.platform=="win32";var fileNotExists=function(e,r){i(e,u.F_OK,(function(e){r(!e)}))};var fileNotExistsSync=function(e){try{a(e,u.F_OK);return false}catch(e){return true}};var localExecutable=function(e,r){i(e,u.F_OK|u.X_OK,(function(e){r(null,!e)}))};var localExecutableSync=function(e){try{a(e,u.F_OK|u.X_OK);return true}catch(e){return false}};var commandExistsUnix=function(e,r,t){fileNotExists(e,(function(s){if(!s){var o=n("command -v "+r+" 2>/dev/null"+" && { echo >&1 "+r+"; exit 0; }",(function(e,r,n){t(null,!!r)}));return}localExecutable(e,t)}))};var commandExistsWindows=function(e,r,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){t(null,false);return}var s=n("where "+r,(function(e){if(e!==null){t(null,false)}else{t(null,true)}}))};var commandExistsUnixSync=function(e,r){if(fileNotExistsSync(e)){try{var t=s("command -v "+r+" 2>/dev/null"+" && { echo >&1 "+r+"; exit 0; }");return!!t}catch(e){return false}}return localExecutableSync(e)};var commandExistsWindowsSync=function(e,r,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){return false}try{var n=s("where "+r,{stdio:[]});return!!n}catch(e){return false}};var cleanInput=function(e){if(/[^A-Za-z0-9_\/:=-]/.test(e)){e="'"+e.replace(/'/g,"'\\''")+"'";e=e.replace(/^(?:'')+/g,"").replace(/\\'''/g,"\\'")}return e};if(l){cleanInput=function(e){var r=/[\\]/.test(e);if(r){var t='"'+c.dirname(e)+'"';var n='"'+c.basename(e)+'"';return t+":"+n}return'"'+e+'"'}}e.exports=function commandExists(e,r){var t=cleanInput(e);if(!r&&typeof Promise!=="undefined"){return new Promise((function(r,t){commandExists(e,(function(n,s){if(s){r(e)}else{t(n)}}))}))}if(l){commandExistsWindows(e,t,r)}else{commandExistsUnix(e,t,r)}};e.exports.sync=function(e){var r=cleanInput(e);if(l){return commandExistsWindowsSync(e,r)}else{return commandExistsUnixSync(e,r)}}},748:(e,r,t)=>{const{exec:n,execSync:s}=t(129);const o={run:runCommand,runSync:runSync,get:runCommand};function runCommand(e,r){return n(e,function(){return function(e,t,n){if(!r)return;r(e,t,n)}}(r))}function runSync(e){try{return{data:s(e).toString(),err:null,stderr:null}}catch(e){return{data:null,err:e.stderr.toString(),stderr:e.stderr.toString()}}}e.exports=o},898:(e,r,t)=>{"use strict";var n=t(129).spawn;var s=t(669);var escapeSpaces=function(e){if(typeof e==="string"){return e.replace(/\b\s/g,"\\ ")}else{return e}};var escapeSpacesInOptions=function(e){["src","dest","include","exclude","excludeFirst"].forEach((function(r){var t=e[r];if(typeof t==="string"){e[r]=escapeSpaces(t)}else if(Array.isArray(t)===true){e[r]=t.map(escapeSpaces)}}));return e};e.exports=function(e,r){e=e||{};e=s._extend({},e);e=escapeSpacesInOptions(e);var t=e.platform||process.platform;var o=t==="win32";if(typeof e.src==="undefined"){throw new Error("'src' directory is missing from options")}if(typeof e.dest==="undefined"){throw new Error("'dest' directory is missing from options")}var c=e.dest;if(typeof e.host!=="undefined"){c=e.host+":"+e.dest}if(!Array.isArray(e.src)){e.src=[e.src]}var i=[].concat(e.src);i.push(c);var a=(e.args||[]).find((function(e){return e.match(/--chmod=/)}));if(o&&!a){i.push("--chmod=ugo=rwX")}if(typeof e.host!=="undefined"||e.ssh){i.push("--rsh");var u="ssh";if(typeof e.port!=="undefined"){u+=" -p "+e.port}if(typeof e.privateKey!=="undefined"){u+=" -i "+e.privateKey}if(typeof e.sshCmdArgs!=="undefined"){u+=" "+e.sshCmdArgs.join(" ")}i.push(u)}if(e.recursive===true){i.push("--recursive")}if(e.times===true){i.push("--times")}if(e.syncDest===true||e.deleteAll===true){i.push("--delete");i.push("--delete-excluded")}if(e.syncDestIgnoreExcl===true||e.delete===true){i.push("--delete")}if(e.dryRun===true){i.push("--dry-run");i.push("--verbose")}if(typeof e.excludeFirst!=="undefined"&&s.isArray(e.excludeFirst)){e.excludeFirst.forEach((function(e,r){i.push("--exclude="+e)}))}if(typeof e.include!=="undefined"&&s.isArray(e.include)){e.include.forEach((function(e,r){i.push("--include="+e)}))}if(typeof e.exclude!=="undefined"&&s.isArray(e.exclude)){e.exclude.forEach((function(e,r){i.push("--exclude="+e)}))}switch(e.compareMode){case"sizeOnly":i.push("--size-only");break;case"checksum":i.push("--checksum");break}if(typeof e.args!=="undefined"&&s.isArray(e.args)){i=[...new Set([...i,...e.args])]}i=[...new Set(i)];var noop=function(){};var l=e.onStdout||noop;var d=e.onStderr||noop;var f="rsync ";i.forEach((function(e){if(e.substr(0,4)==="ssh "){e='"'+e+'"'}f+=e+" "}));f=f.trim();if(e.noExec){r(null,null,null,f);return}try{var p="";var y="";var v;if(o){v=n("cmd.exe",["/s","/c",'"'+f+'"'],{windowsVerbatimArguments:true,stdio:[process.stdin,"pipe","pipe"]})}else{v=n("/bin/sh",["-c",f])}v.stdout.on("data",(function(e){l(e);p+=e}));v.stderr.oLine truncated
(()=>{var e={569:(e,r,t)=>{e.exports=t(325)},325:(e,r,t)=>{"use strict";var n=t(81).exec;var s=t(81).execSync;var o=t(147);var c=t(17);var i=o.access;var a=o.accessSync;var u=o.constants||o;var l=process.platform=="win32";var fileNotExists=function(e,r){i(e,u.F_OK,(function(e){r(!e)}))};var fileNotExistsSync=function(e){try{a(e,u.F_OK);return false}catch(e){return true}};var localExecutable=function(e,r){i(e,u.F_OK|u.X_OK,(function(e){r(null,!e)}))};var localExecutableSync=function(e){try{a(e,u.F_OK|u.X_OK);return true}catch(e){return false}};var commandExistsUnix=function(e,r,t){fileNotExists(e,(function(s){if(!s){var o=n("command -v "+r+" 2>/dev/null"+" && { echo >&1 "+r+"; exit 0; }",(function(e,r,n){t(null,!!r)}));return}localExecutable(e,t)}))};var commandExistsWindows=function(e,r,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){t(null,false);return}var s=n("where "+r,(function(e){if(e!==null){t(null,false)}else{t(null,true)}}))};var commandExistsUnixSync=function(e,r){if(fileNotExistsSync(e)){try{var t=s("command -v "+r+" 2>/dev/null"+" && { echo >&1 "+r+"; exit 0; }");return!!t}catch(e){return false}}return localExecutableSync(e)};var commandExistsWindowsSync=function(e,r,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){return false}try{var n=s("where "+r,{stdio:[]});return!!n}catch(e){return false}};var cleanInput=function(e){if(/[^A-Za-z0-9_\/:=-]/.test(e)){e="'"+e.replace(/'/g,"'\\''")+"'";e=e.replace(/^(?:'')+/g,"").replace(/\\'''/g,"\\'")}return e};if(l){cleanInput=function(e){var r=/[\\]/.test(e);if(r){var t='"'+c.dirname(e)+'"';var n='"'+c.basename(e)+'"';return t+":"+n}return'"'+e+'"'}}e.exports=function commandExists(e,r){var t=cleanInput(e);if(!r&&typeof Promise!=="undefined"){return new Promise((function(r,t){commandExists(e,(function(n,s){if(s){r(e)}else{t(n)}}))}))}if(l){commandExistsWindows(e,t,r)}else{commandExistsUnix(e,t,r)}};e.exports.sync=function(e){var r=cleanInput(e);if(l){return commandExistsWindowsSync(e,r)}else{return commandExistsUnixSync(e,r)}}},748:(e,r,t)=>{const{exec:n,execSync:s}=t(81);const o={run:runCommand,runSync:runSync};function runCommand(e,r){return n(e,function(){return function(e,t,n){if(!r)return;r(e,t,n)}}(r))}function runSync(e){try{return{data:s(e).toString(),err:null,stderr:null}}catch(e){return{data:null,err:e.stderr.toString(),stderr:e.stderr.toString()}}}e.exports=o},898:(e,r,t)=>{"use strict";var n=t(81).spawn;var s=t(837);var escapeSpaces=function(e){if(typeof e==="string"){return e.replace(/\b\s/g,"\\ ")}else{return e}};var escapeSpacesInOptions=function(e){["src","dest","include","exclude","excludeFirst"].forEach((function(r){var t=e[r];if(typeof t==="string"){e[r]=escapeSpaces(t)}else if(Array.isArray(t)===true){e[r]=t.map(escapeSpaces)}}));return e};e.exports=function(e,r){e=e||{};e=s._extend({},e);e=escapeSpacesInOptions(e);var t=e.platform||process.platform;var o=t==="win32";if(typeof e.src==="undefined"){throw new Error("'src' directory is missing from options")}if(typeof e.dest==="undefined"){throw new Error("'dest' directory is missing from options")}var c=e.dest;if(typeof e.host!=="undefined"){c=e.host+":"+e.dest}if(!Array.isArray(e.src)){e.src=[e.src]}var i=[].concat(e.src);i.push(c);var a=(e.args||[]).find((function(e){return e.match(/--chmod=/)}));if(o&&!a){i.push("--chmod=ugo=rwX")}if(typeof e.host!=="undefined"||e.ssh){i.push("--rsh");var u="ssh";if(typeof e.port!=="undefined"){u+=" -p "+e.port}if(typeof e.privateKey!=="undefined"){u+=" -i "+e.privateKey}if(typeof e.sshCmdArgs!=="undefined"){u+=" "+e.sshCmdArgs.join(" ")}i.push(u)}if(e.recursive===true){i.push("--recursive")}if(e.times===true){i.push("--times")}if(e.syncDest===true||e.deleteAll===true){i.push("--delete");i.push("--delete-excluded")}if(e.syncDestIgnoreExcl===true||e.delete===true){i.push("--delete")}if(e.dryRun===true){i.push("--dry-run");i.push("--verbose")}if(typeof e.excludeFirst!=="undefined"&&s.isArray(e.excludeFirst)){e.excludeFirst.forEach((function(e,r){i.push("--exclude="+e)}))}if(typeof e.include!=="undefined"&&s.isArray(e.include)){e.include.forEach((function(e,r){i.push("--include="+e)}))}if(typeof e.exclude!=="undefined"&&s.isArray(e.exclude)){e.exclude.forEach((function(e,r){i.push("--exclude="+e)}))}switch(e.compareMode){case"sizeOnly":i.push("--size-only");break;case"checksum":i.push("--checksum");break}if(typeof e.args!=="undefined"&&s.isArray(e.args)){i=[...new Set([...i,...e.args])]}i=[...new Set(i)];var noop=function(){};var l=e.onStdout||noop;var d=e.onStderr||noop;var f="rsync ";i.forEach((function(e){if(e.substr(0,4)==="ssh "){e='"'+e+'"'}f+=e+" "}));f=f.trim();if(e.noExec){r(null,null,null,f);return}try{var p="";var y="";var v;if(o){v=n("cmd.exe",["/s","/c",'"'+f+'"'],{windowsVerbatimArguments:true,stdio:[process.stdin,"pipe","pipe"]})}else{v=n("/bin/sh",["-c",f])}v.stdout.on("data",(function(e){l(e);p+=e}));v.stderr.on("data",(function(eLine truncated
+2517 -799
View File
File diff suppressed because it is too large. Load diff
+10 -10
View File
@@ -10,15 +10,9 @@
"LICENSE"
],
"dependencies": {
"command-exists": "1.2.9",
"node-cmd": "4.0.0",
"rsyncwrapper": "3.0.1"
},
"devDependencies": {
"@vercel/ncc": "^0.28.6",
"eslint": "^7.27.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.23.3"
"command-exists": "^1.2.9",
"node-cmd": "^5.0.0",
"rsyncwrapper": "^3.0.1"
},
"scripts": {
"build": "npm run lint && ncc build ./src/index.js -o dist -m",
@@ -39,5 +33,11 @@
"bugs": {
"url": "https://github.com/easingthemes/ssh-deploy/issues"
},
"homepage": "https://github.com/easingthemes/ssh-deploy#readme"
"homepage": "https://github.com/easingthemes/ssh-deploy#readme",
"devDependencies": {
"@vercel/ncc": "^0.34.0",
"eslint": "^8.26.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0"
}
}