mirror of
				https://github.com/SamKirkland/FTP-Deploy-Action.git
				synced 2025-10-31 23:43:58 +00:00 
			
		
		
		
	import fix, pacakge updates
This commit is contained in:
		
							parent
							
								
									afd59edb41
								
							
						
					
					
						commit
						fc9de49cd2
					
				
							
								
								
									
										58
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										58
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -6774,33 +6774,49 @@ module.exports = __webpack_require__(669); | ||||
| 
 | ||||
| "use strict"; | ||||
| 
 | ||||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||||
|     return (mod && mod.__esModule) ? mod : { "default": mod }; | ||||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||||
|     if (k2 === undefined) k2 = k; | ||||
|     Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||||
| }) : (function(o, m, k, k2) { | ||||
|     if (k2 === undefined) k2 = k; | ||||
|     o[k2] = m[k]; | ||||
| })); | ||||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||||
|     Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||||
| }) : function(o, v) { | ||||
|     o["default"] = v; | ||||
| }); | ||||
| var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     if (mod && mod.__esModule) return mod; | ||||
|     var result = {}; | ||||
|     if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||
|     __setModuleDefault(result, mod); | ||||
|     return result; | ||||
| }; | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| const core_1 = __importDefault(__webpack_require__(186)); | ||||
| const core = __importStar(__webpack_require__(186)); | ||||
| const ftp_deploy_1 = __webpack_require__(589); | ||||
| async function runDeployment() { | ||||
|     const args = { | ||||
|         server: core_1.default.getInput("server", { required: true }), | ||||
|         username: core_1.default.getInput("username", { required: true }), | ||||
|         password: core_1.default.getInput("password", { required: true }), | ||||
|         protocol: optionalProtocol("protocol", core_1.default.getInput("protocol")), | ||||
|         port: optionalInt("port", core_1.default.getInput("port")), | ||||
|         "local-dir": core_1.default.getInput("local-dir"), | ||||
|         "server-dir": core_1.default.getInput("server-dir"), | ||||
|         "state-name": core_1.default.getInput("state-name"), | ||||
|         "dry-run": optionalBoolean("dry-run", core_1.default.getInput("dry-run")), | ||||
|         "dangerous-clean-slate": optionalBoolean("dangerous-clean-slate", core_1.default.getInput("dangerous-clean-slate")), | ||||
|         "include": optionalStringArray("include", core_1.default.getInput("include")), | ||||
|         "exclude": optionalStringArray("exclude", core_1.default.getInput("exclude")), | ||||
|         "log-level": optionalLogLevel("log-level", core_1.default.getInput("log-level")) | ||||
|         server: core.getInput("server", { required: true }), | ||||
|         username: core.getInput("username", { required: true }), | ||||
|         password: core.getInput("password", { required: true }), | ||||
|         protocol: optionalProtocol("protocol", core.getInput("protocol")), | ||||
|         port: optionalInt("port", core.getInput("port")), | ||||
|         "local-dir": core.getInput("local-dir"), | ||||
|         "server-dir": core.getInput("server-dir"), | ||||
|         "state-name": core.getInput("state-name"), | ||||
|         "dry-run": optionalBoolean("dry-run", core.getInput("dry-run")), | ||||
|         "dangerous-clean-slate": optionalBoolean("dangerous-clean-slate", core.getInput("dangerous-clean-slate")), | ||||
|         "include": optionalStringArray("include", core.getInput("include")), | ||||
|         "exclude": optionalStringArray("exclude", core.getInput("exclude")), | ||||
|         "log-level": optionalLogLevel("log-level", core.getInput("log-level")) | ||||
|     }; | ||||
|     try { | ||||
|         await ftp_deploy_1.deploy(args); | ||||
|     } | ||||
|     catch (error) { | ||||
|         core_1.default.setFailed(error); | ||||
|         core.setFailed(error); | ||||
|     } | ||||
| } | ||||
| runDeployment(); | ||||
| @ -6815,7 +6831,7 @@ function optionalBoolean(argumentName, rawValue) { | ||||
|     if (cleanValue === "false") { | ||||
|         return false; | ||||
|     } | ||||
|     core_1.default.setFailed(`${argumentName}: invalid parameter - please use a boolean, you provided "${rawValue}". Try true or false instead.`); | ||||
|     core.setFailed(`${argumentName}: invalid parameter - please use a boolean, you provided "${rawValue}". Try true or false instead.`); | ||||
| } | ||||
| function optionalProtocol(argumentName, rawValue) { | ||||
|     if (rawValue === undefined) { | ||||
| @ -6831,7 +6847,7 @@ function optionalProtocol(argumentName, rawValue) { | ||||
|     if (cleanValue === "ftps-legacy") { | ||||
|         return "ftps-legacy"; | ||||
|     } | ||||
|     core_1.default.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "ftp", "ftps", or "ftps-legacy" instead.`); | ||||
|     core.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "ftp", "ftps", or "ftps-legacy" instead.`); | ||||
| } | ||||
| function optionalLogLevel(argumentName, rawValue) { | ||||
|     if (rawValue === undefined) { | ||||
| @ -6847,7 +6863,7 @@ function optionalLogLevel(argumentName, rawValue) { | ||||
|     if (cleanValue === "debug") { | ||||
|         return "debug"; | ||||
|     } | ||||
|     core_1.default.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "warn", "info", or "debug" instead.`); | ||||
|     core.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "warn", "info", or "debug" instead.`); | ||||
| } | ||||
| function optionalInt(argumentName, rawValue) { | ||||
|     if (rawValue === undefined) { | ||||
| @ -6858,7 +6874,7 @@ function optionalInt(argumentName, rawValue) { | ||||
|     if (Number.isInteger(valueAsNumber)) { | ||||
|         return valueAsNumber; | ||||
|     } | ||||
|     core_1.default.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try a whole number (no decimals) instead like 1234`); | ||||
|     core.setFailed(`${argumentName}: invalid parameter - you provided "${rawValue}". Try a whole number (no decimals) instead like 1234`); | ||||
| } | ||||
| function optionalStringArray(argumentName, rawValue) { | ||||
|     if (rawValue === undefined) { | ||||
|  | ||||
							
								
								
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "typescript-action", | ||||
|   "version": "0.0.0", | ||||
|   "name": "ftp-deploy-action", | ||||
|   "version": "1.0.0", | ||||
|   "lockfileVersion": 1, | ||||
|   "requires": true, | ||||
|   "dependencies": { | ||||
| @ -104,18 +104,24 @@ | ||||
|       } | ||||
|     }, | ||||
|     "@samkirkland/ftp-deploy": { | ||||
|       "version": "0.0.1", | ||||
|       "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-0.0.1.tgz", | ||||
|       "integrity": "sha512-A6/I64NM4AlVb7UWiwu0ICyImoihlmbrFa2ghZnAD65VeyI+GAGbZ1vMKr9jJIZpz3jsw0a0Rn2dikDCo8z9GA==", | ||||
|       "version": "0.9.1", | ||||
|       "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-0.9.1.tgz", | ||||
|       "integrity": "sha512-XXJrHc88l9E5Z08lo+ApxpEZuIrkdA80KZNbsN+TbxQUdPhprirU+ri1h++kvLj3u/MT7srwmq+P/7GCoxCd1g==", | ||||
|       "requires": { | ||||
|         "basic-ftp": "^4.6.2", | ||||
|         "fs": "^0.0.1-security", | ||||
|         "lodash": "^4.17.19", | ||||
|         "lodash": "^4.17.20", | ||||
|         "multimatch": "^4.0.0", | ||||
|         "pretty-bytes": "^5.3.0", | ||||
|         "pretty-ms": "^7.0.0", | ||||
|         "readdir-enhanced": "^6.0.4", | ||||
|         "yargs": "^15.4.1" | ||||
|       }, | ||||
|       "dependencies": { | ||||
|         "lodash": { | ||||
|           "version": "4.17.20", | ||||
|           "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", | ||||
|           "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "@types/color-name": { | ||||
| @ -215,10 +221,10 @@ | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "@zeit/ncc": { | ||||
|       "version": "0.22.3", | ||||
|       "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.22.3.tgz", | ||||
|       "integrity": "sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==", | ||||
|     "@vercel/ncc": { | ||||
|       "version": "0.24.0", | ||||
|       "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.24.0.tgz", | ||||
|       "integrity": "sha512-crqItMcIwCkvdXY/V3/TzrHJQx6nbIaRqE1cOopJhgGX6izvNov40SmD//nS5flfEvdK54YGjwVVq+zG6crjOg==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "acorn": { | ||||
| @ -783,11 +789,6 @@ | ||||
|       "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "fs": { | ||||
|       "version": "0.0.1-security", | ||||
|       "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||||
|       "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" | ||||
|     }, | ||||
|     "fs.realpath": { | ||||
|       "version": "1.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | ||||
| @ -1002,7 +1003,8 @@ | ||||
|     "lodash": { | ||||
|       "version": "4.17.19", | ||||
|       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", | ||||
|       "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" | ||||
|       "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "loud-rejection": { | ||||
|       "version": "1.6.0", | ||||
|  | ||||
| @ -23,13 +23,13 @@ | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/core": "^1.2.4", | ||||
|     "@samkirkland/ftp-deploy": "^0.0.1", | ||||
|     "@samkirkland/ftp-deploy": "^0.9.1", | ||||
|     "ts-node-dev": "^1.0.0-pre.56" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/node": "^14.0.27", | ||||
|     "@typescript-eslint/parser": "^3.8.0", | ||||
|     "@zeit/ncc": "^0.22.3", | ||||
|     "@vercel/ncc": "^0.24.0", | ||||
|     "eslint": "^7.6.0", | ||||
|     "js-yaml": "^3.14.0", | ||||
|     "typescript": "^3.9.7" | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| import core from "@actions/core"; | ||||
| import * as core from "@actions/core"; | ||||
| import { deploy } from "@samkirkland/ftp-deploy"; | ||||
| import { IFtpDeployArguments } from "@samkirkland/ftp-deploy/dist/module/types"; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user