From 93a089887116ff5c20b7c1f208fec3db3b92bd04 Mon Sep 17 00:00:00 2001 From: SamKirkland Date: Mon, 31 Jan 2022 00:11:43 -0600 Subject: [PATCH] rolling back nested exclude path --- dist/index.js | 13 ++----------- package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0fca4bd..ecc6103 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3316,7 +3316,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.applyExcludeFilter = exports.applyFolderFiltersToSubItems = exports.getDefaultSettings = exports.Timer = exports.Timings = exports.retryRequest = exports.formatNumber = exports.pluralize = exports.Logger = void 0; +exports.applyExcludeFilter = exports.getDefaultSettings = exports.Timer = exports.Timings = exports.retryRequest = exports.formatNumber = exports.pluralize = exports.Logger = void 0; const pretty_ms_1 = __importDefault(__nccwpck_require__(1127)); const module_1 = __nccwpck_require__(8347); const types_1 = __nccwpck_require__(6703); @@ -3463,21 +3463,12 @@ function getDefaultSettings(withoutDefaults) { "state-name": (_e = withoutDefaults["state-name"]) !== null && _e !== void 0 ? _e : ".ftp-deploy-sync-state.json", "dry-run": (_f = withoutDefaults["dry-run"]) !== null && _f !== void 0 ? _f : false, "dangerous-clean-slate": (_g = withoutDefaults["dangerous-clean-slate"]) !== null && _g !== void 0 ? _g : false, - "exclude": applyFolderFiltersToSubItems((_h = withoutDefaults.exclude) !== null && _h !== void 0 ? _h : module_1.excludeDefaults), + "exclude": (_h = withoutDefaults.exclude) !== null && _h !== void 0 ? _h : module_1.excludeDefaults, "log-level": (_j = withoutDefaults["log-level"]) !== null && _j !== void 0 ? _j : "standard", "security": (_k = withoutDefaults.security) !== null && _k !== void 0 ? _k : "loose", }; } exports.getDefaultSettings = getDefaultSettings; -/** - * automatically exclude all sub-files/sub-folders if we exclude a folder. - * For example "test/" should also exclude "test/file.txt" - * to do this we add "**" to all folder paths - */ -function applyFolderFiltersToSubItems(excludeFilters) { - return excludeFilters.map(filter => filter.endsWith("/") ? `${filter}**` : filter); -} -exports.applyFolderFiltersToSubItems = applyFolderFiltersToSubItems; function applyExcludeFilter(stat, excludeFilters) { // match exclude, return immediatley if (excludeFilters.length > 0) { diff --git a/package-lock.json b/package-lock.json index 084cc94..4fd4b17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -712,9 +712,9 @@ } }, "@samkirkland/ftp-deploy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.0.tgz", - "integrity": "sha512-i5z1FGI9746BRc232x82YcI6pdwjWPiSMOhCdltGMLb7K66gxpXV1CB/WxXcs5kvdoMPu3BSdhAAS3o5g/CX+w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.1.tgz", + "integrity": "sha512-1Oosu9jN1BDze1cM9jx+vGb04tvGhBaiBL0F1y8kknTqDH7nc889mMBIbAFyhuFefU88oE72J2iCnkqqNNQ/jg==", "requires": { "basic-ftp": "^4.6.6", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 96f354a..1588c0d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.6.0", - "@samkirkland/ftp-deploy": "^1.2.0", + "@samkirkland/ftp-deploy": "^1.2.1", "@types/jest": "^27.0.2", "jest": "^27.2.5", "ts-jest": "^27.0.5",