@@ -90291,11 +90291,13 @@ exports.getCacheDistributor = exports.PackageManagers = void 0;
9029190291const pip_cache_1 = __importDefault(__nccwpck_require__(5546));
9029290292const pipenv_cache_1 = __importDefault(__nccwpck_require__(238));
9029390293const poetry_cache_1 = __importDefault(__nccwpck_require__(1993));
90294+ const uv_cache_1 = __importDefault(__nccwpck_require__(8795));
9029490295var PackageManagers;
9029590296(function (PackageManagers) {
9029690297 PackageManagers["Pip"] = "pip";
9029790298 PackageManagers["Pipenv"] = "pipenv";
9029890299 PackageManagers["Poetry"] = "poetry";
90300+ PackageManagers["Uv"] = "uv";
9029990301})(PackageManagers || (exports.PackageManagers = PackageManagers = {}));
9030090302function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath) {
9030190303 switch (packageManager) {
@@ -90305,6 +90307,8 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath)
9030590307 return new pipenv_cache_1.default(pythonVersion, cacheDependencyPath);
9030690308 case PackageManagers.Poetry:
9030790309 return new poetry_cache_1.default(pythonVersion, cacheDependencyPath);
90310+ case PackageManagers.Uv:
90311+ return new uv_cache_1.default(pythonVersion, cacheDependencyPath);
9030890312 default:
9030990313 throw new Error(`Caching for '${packageManager}' is not supported`);
9031090314 }
@@ -90679,6 +90683,88 @@ class PoetryCache extends cache_distributor_1.default {
9067990683exports["default"] = PoetryCache;
9068090684
9068190685
90686+ /***/ }),
90687+
90688+ /***/ 8795:
90689+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
90690+
90691+ "use strict";
90692+
90693+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
90694+ if (k2 === undefined) k2 = k;
90695+ var desc = Object.getOwnPropertyDescriptor(m, k);
90696+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
90697+ desc = { enumerable: true, get: function() { return m[k]; } };
90698+ }
90699+ Object.defineProperty(o, k2, desc);
90700+ }) : (function(o, m, k, k2) {
90701+ if (k2 === undefined) k2 = k;
90702+ o[k2] = m[k];
90703+ }));
90704+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
90705+ Object.defineProperty(o, "default", { enumerable: true, value: v });
90706+ }) : function(o, v) {
90707+ o["default"] = v;
90708+ });
90709+ var __importStar = (this && this.__importStar) || function (mod) {
90710+ if (mod && mod.__esModule) return mod;
90711+ var result = {};
90712+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
90713+ __setModuleDefault(result, mod);
90714+ return result;
90715+ };
90716+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
90717+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
90718+ return new (P || (P = Promise))(function (resolve, reject) {
90719+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
90720+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
90721+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
90722+ step((generator = generator.apply(thisArg, _arguments || [])).next());
90723+ });
90724+ };
90725+ var __importDefault = (this && this.__importDefault) || function (mod) {
90726+ return (mod && mod.__esModule) ? mod : { "default": mod };
90727+ };
90728+ Object.defineProperty(exports, "__esModule", ({ value: true }));
90729+ const glob = __importStar(__nccwpck_require__(8090));
90730+ const os = __importStar(__nccwpck_require__(2037));
90731+ const path = __importStar(__nccwpck_require__(1017));
90732+ const cache_distributor_1 = __importDefault(__nccwpck_require__(8953));
90733+ class UvCache extends cache_distributor_1.default {
90734+ constructor(pythonVersion, patterns = '**/requirements.txt') {
90735+ super('uv', patterns);
90736+ this.pythonVersion = pythonVersion;
90737+ this.patterns = patterns;
90738+ }
90739+ getCacheGlobalDirectories() {
90740+ return __awaiter(this, void 0, void 0, function* () {
90741+ var _a;
90742+ if (process.platform === 'win32') {
90743+ // `LOCALAPPDATA` should always be defined,
90744+ // but we can't just join `undefined`
90745+ // into the path in case it's not.
90746+ return [
90747+ path.join((_a = process.env['LOCALAPPDATA']) !== null && _a !== void 0 ? _a : os.homedir(), 'uv', 'cache')
90748+ ];
90749+ }
90750+ return [path.join(os.homedir(), '.cache/uv')];
90751+ });
90752+ }
90753+ computeKeys() {
90754+ return __awaiter(this, void 0, void 0, function* () {
90755+ const hash = yield glob.hashFiles(this.patterns);
90756+ const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
90757+ const restoreKey = undefined;
90758+ return {
90759+ primaryKey,
90760+ restoreKey
90761+ };
90762+ });
90763+ }
90764+ }
90765+ exports["default"] = UvCache;
90766+
90767+
9068290768/***/ }),
9068390769
9068490770/***/ 8040:
0 commit comments