@catladder/pipeline 1.168.3 → 1.168.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,12 +49,18 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
49
49
|
}
|
|
50
50
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
51
51
|
};
|
|
52
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
53
|
+
return mod && mod.__esModule ? mod : {
|
|
54
|
+
"default": mod
|
|
55
|
+
};
|
|
56
|
+
};
|
|
52
57
|
Object.defineProperty(exports, "__esModule", {
|
|
53
58
|
value: true
|
|
54
59
|
});
|
|
55
60
|
exports.createJobCacheFromConfig = exports.createJobCacheFromCacheConfigs = void 0;
|
|
56
61
|
var path_1 = require("path");
|
|
57
62
|
var getAllCacheConfigsFromConfig_1 = require("./getAllCacheConfigsFromConfig");
|
|
63
|
+
var slugify_1 = __importDefault(require("slugify"));
|
|
58
64
|
var createJobCacheFromCacheConfigs = function (context, caches) {
|
|
59
65
|
if (caches.length === 0) return undefined;
|
|
60
66
|
var simpleCacheDefs = caches.filter(function (c) {
|
|
@@ -86,7 +92,7 @@ var createJobCacheFromCacheConfigs = function (context, caches) {
|
|
|
86
92
|
rest = __rest(_a, ["key", "paths", "policy", "scope", "pathMode", "buildDir"]);
|
|
87
93
|
var baseDir = pathMode === "absolute" ? "" : buildDir !== null && buildDir !== void 0 ? buildDir : context.build.dir;
|
|
88
94
|
var transformedKey = scope === "global" ? key : typeof key === "string" ? (scope === "buildDir" // really edge case...
|
|
89
|
-
? baseDir : context.name) + "-" + key : __assign(__assign({}, key), {
|
|
95
|
+
? (0, slugify_1.default)(baseDir) : context.name) + "-" + key : __assign(__assign({}, key), {
|
|
90
96
|
files: (_b = key.files) === null || _b === void 0 ? void 0 : _b.map(function (f) {
|
|
91
97
|
return pathMode === "absolute" ? f : (0, path_1.join)(baseDir, f);
|
|
92
98
|
})
|