Skip to content

Commit

Permalink
rolling back nested exclude path
Browse files Browse the repository at this point in the history
  • Loading branch information
SamKirkland committed Jan 31, 2022
1 parent 1d31526 commit 93a0898
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 93a0898

Please sign in to comment.