@@ -89595,11 +89595,13 @@ exports.getCacheDistributor = exports.PackageManagers = void 0;
8959589595const pip_cache_1 = __importDefault(__nccwpck_require__(5546));
8959689596const pipenv_cache_1 = __importDefault(__nccwpck_require__(238));
8959789597const poetry_cache_1 = __importDefault(__nccwpck_require__(1993));
89598+ const uv_cache_1 = __importDefault(__nccwpck_require__(8795));
8959889599var PackageManagers;
8959989600(function (PackageManagers) {
8960089601 PackageManagers["Pip"] = "pip";
8960189602 PackageManagers["Pipenv"] = "pipenv";
8960289603 PackageManagers["Poetry"] = "poetry";
89604+ PackageManagers["Uv"] = "uv";
8960389605})(PackageManagers || (exports.PackageManagers = PackageManagers = {}));
8960489606function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath) {
8960589607 switch (packageManager) {
@@ -89609,6 +89611,8 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath)
8960989611 return new pipenv_cache_1.default(pythonVersion, cacheDependencyPath);
8961089612 case PackageManagers.Poetry:
8961189613 return new poetry_cache_1.default(pythonVersion, cacheDependencyPath);
89614+ case PackageManagers.Uv:
89615+ return new uv_cache_1.default(pythonVersion, cacheDependencyPath);
8961289616 default:
8961389617 throw new Error(`Caching for '${packageManager}' is not supported`);
8961489618 }
@@ -89983,6 +89987,88 @@ class PoetryCache extends cache_distributor_1.default {
8998389987exports["default"] = PoetryCache;
8998489988
8998589989
89990+ /***/ }),
89991+
89992+ /***/ 8795:
89993+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
89994+
89995+ "use strict";
89996+
89997+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
89998+ if (k2 === undefined) k2 = k;
89999+ var desc = Object.getOwnPropertyDescriptor(m, k);
90000+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
90001+ desc = { enumerable: true, get: function() { return m[k]; } };
90002+ }
90003+ Object.defineProperty(o, k2, desc);
90004+ }) : (function(o, m, k, k2) {
90005+ if (k2 === undefined) k2 = k;
90006+ o[k2] = m[k];
90007+ }));
90008+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
90009+ Object.defineProperty(o, "default", { enumerable: true, value: v });
90010+ }) : function(o, v) {
90011+ o["default"] = v;
90012+ });
90013+ var __importStar = (this && this.__importStar) || function (mod) {
90014+ if (mod && mod.__esModule) return mod;
90015+ var result = {};
90016+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
90017+ __setModuleDefault(result, mod);
90018+ return result;
90019+ };
90020+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
90021+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
90022+ return new (P || (P = Promise))(function (resolve, reject) {
90023+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
90024+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
90025+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
90026+ step((generator = generator.apply(thisArg, _arguments || [])).next());
90027+ });
90028+ };
90029+ var __importDefault = (this && this.__importDefault) || function (mod) {
90030+ return (mod && mod.__esModule) ? mod : { "default": mod };
90031+ };
90032+ Object.defineProperty(exports, "__esModule", ({ value: true }));
90033+ const glob = __importStar(__nccwpck_require__(8090));
90034+ const os = __importStar(__nccwpck_require__(2037));
90035+ const path = __importStar(__nccwpck_require__(1017));
90036+ const cache_distributor_1 = __importDefault(__nccwpck_require__(8953));
90037+ class UvCache extends cache_distributor_1.default {
90038+ constructor(pythonVersion, patterns = '**/requirements.txt') {
90039+ super('uv', patterns);
90040+ this.pythonVersion = pythonVersion;
90041+ this.patterns = patterns;
90042+ }
90043+ getCacheGlobalDirectories() {
90044+ var _a;
90045+ return __awaiter(this, void 0, void 0, function* () {
90046+ if (process.platform === 'win32') {
90047+ // `LOCALAPPDATA` should always be defined,
90048+ // but we can't just join `undefined`
90049+ // into the path in case it's not.
90050+ return [
90051+ path.join((_a = process.env['LOCALAPPDATA']) !== null && _a !== void 0 ? _a : os.homedir(), 'uv', 'cache')
90052+ ];
90053+ }
90054+ return [path.join(os.homedir(), '.cache/uv')];
90055+ });
90056+ }
90057+ computeKeys() {
90058+ return __awaiter(this, void 0, void 0, function* () {
90059+ const hash = yield glob.hashFiles(this.patterns);
90060+ const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
90061+ const restoreKey = undefined;
90062+ return {
90063+ primaryKey,
90064+ restoreKey
90065+ };
90066+ });
90067+ }
90068+ }
90069+ exports["default"] = UvCache;
90070+
90071+
8998690072/***/ }),
8998790073
8998890074/***/ 8040:
0 commit comments