This commit is contained in:
Sam Kirkland 2025-08-26 00:32:26 -05:00 committed by GitHub
parent 8e83cea867
commit 8811b92347
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 7 deletions

12
dist/index.js vendored
View File

@ -3626,7 +3626,7 @@ class FTPSyncProvider {
} }
catch (e) { catch (e) {
// this error is common when a file was deleted on the server directly // this error is common when a file was deleted on the server directly
if (e.code === types_1.ErrorCode.FileNotFoundOrNoAccess) { if ((e === null || e === void 0 ? void 0 : e.code) === types_1.ErrorCode.FileNotFoundOrNoAccess) {
this.logger.standard("File not found or you don't have access to the file - skipping..."); this.logger.standard("File not found or you don't have access to the file - skipping...");
} }
else { else {
@ -3643,8 +3643,18 @@ class FTPSyncProvider {
const absoluteFolderPath = "/" + (this.serverPath.startsWith("./") ? this.serverPath.replace("./", "") : this.serverPath) + folderPath; const absoluteFolderPath = "/" + (this.serverPath.startsWith("./") ? this.serverPath.replace("./", "") : this.serverPath) + folderPath;
this.logger.all(`removing folder "${absoluteFolderPath}"`); this.logger.all(`removing folder "${absoluteFolderPath}"`);
if (this.dryRun === false) { if (this.dryRun === false) {
try {
yield (0, utilities_1.retryRequest)(this.logger, () => __awaiter(this, void 0, void 0, function* () { return yield this.client.removeDir(absoluteFolderPath); })); yield (0, utilities_1.retryRequest)(this.logger, () => __awaiter(this, void 0, void 0, function* () { return yield this.client.removeDir(absoluteFolderPath); }));
} }
catch (e) {
if ((e === null || e === void 0 ? void 0 : e.code) === types_1.ErrorCode.FileNotFoundOrNoAccess) {
this.logger.standard("Directory not found or you don't have access to the file - skipping...");
}
else {
throw e;
}
}
}
this.logger.verbose(` completed`); this.logger.verbose(` completed`);
}); });
} }

9
package-lock.json generated
View File

@ -10,7 +10,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.9.1", "@actions/core": "^1.9.1",
"@samkirkland/ftp-deploy": "^1.2.4", "@samkirkland/ftp-deploy": "^1.2.5",
"@types/jest": "^29.4.1", "@types/jest": "^29.4.1",
"jest": "^29.5.0", "jest": "^29.5.0",
"ts-jest": "^29.0.5", "ts-jest": "^29.0.5",
@ -1097,9 +1097,10 @@
} }
}, },
"node_modules/@samkirkland/ftp-deploy": { "node_modules/@samkirkland/ftp-deploy": {
"version": "1.2.4", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.4.tgz", "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.5.tgz",
"integrity": "sha512-MF5BoP1mQS3HBdx2pTMX/sIxSt9S4IgdL6ttrcGpUWC9U/IIPcUnyVEQiiBQJePLXpHI93dT9b8VDoS+cUknNg==", "integrity": "sha512-UZJKpb46FOGLmjgLiQDmzU/3zZUP1ckCaJG6xaHQ1igAGydLm6ctYmQO9gupJYs3HzEYkLXzU5AZGOb4RuHTjw==",
"license": "MIT",
"dependencies": { "dependencies": {
"basic-ftp": "^5.0.5", "basic-ftp": "^5.0.5",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View File

@ -23,7 +23,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.9.1", "@actions/core": "^1.9.1",
"@samkirkland/ftp-deploy": "^1.2.4", "@samkirkland/ftp-deploy": "^1.2.5",
"@types/jest": "^29.4.1", "@types/jest": "^29.4.1",
"jest": "^29.5.0", "jest": "^29.5.0",
"ts-jest": "^29.0.5", "ts-jest": "^29.0.5",