mirror of
				https://code.forgejo.org/actions/cache.git
				synced 2025-10-28 19:39:23 +00:00 
			
		
		
		
	update to node24
This commit is contained in:
		
							parent
							
								
									640a1c2554
								
							
						
					
					
						commit
						94b8944262
					
				
					 11 changed files with 5531 additions and 9133 deletions
				
			
		
							
								
								
									
										104
									
								
								dist/save/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										104
									
								
								dist/save/index.js
									
										
									
									
										vendored
									
									
								
							|  | @ -64912,24 +64912,24 @@ var Inputs; | |||
|     Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; | ||||
|     Inputs["FailOnCacheMiss"] = "fail-on-cache-miss"; | ||||
|     Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
 | ||||
| })(Inputs = exports.Inputs || (exports.Inputs = {})); | ||||
| })(Inputs || (exports.Inputs = Inputs = {})); | ||||
| var Outputs; | ||||
| (function (Outputs) { | ||||
|     Outputs["CacheHit"] = "cache-hit"; | ||||
|     Outputs["CachePrimaryKey"] = "cache-primary-key"; | ||||
|     Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action
 | ||||
| })(Outputs = exports.Outputs || (exports.Outputs = {})); | ||||
| })(Outputs || (exports.Outputs = Outputs = {})); | ||||
| var State; | ||||
| (function (State) { | ||||
|     State["CachePrimaryKey"] = "CACHE_KEY"; | ||||
|     State["CacheMatchedKey"] = "CACHE_RESULT"; | ||||
| })(State = exports.State || (exports.State = {})); | ||||
| })(State || (exports.State = State = {})); | ||||
| var Events; | ||||
| (function (Events) { | ||||
|     Events["Key"] = "GITHUB_EVENT_NAME"; | ||||
|     Events["Push"] = "push"; | ||||
|     Events["PullRequest"] = "pull_request"; | ||||
| })(Events = exports.Events || (exports.Events = {})); | ||||
| })(Events || (exports.Events = Events = {})); | ||||
| exports.RefKey = "GITHUB_REF"; | ||||
| 
 | ||||
| 
 | ||||
|  | @ -64956,13 +64956,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( | |||
| }) : function(o, v) { | ||||
|     o["default"] = v; | ||||
| }); | ||||
| var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     if (mod && mod.__esModule) return mod; | ||||
|     var result = {}; | ||||
|     if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||
|     __setModuleDefault(result, mod); | ||||
|     return result; | ||||
| }; | ||||
| var __importStar = (this && this.__importStar) || (function () { | ||||
|     var ownKeys = function(o) { | ||||
|         ownKeys = Object.getOwnPropertyNames || function (o) { | ||||
|             var ar = []; | ||||
|             for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||||
|             return ar; | ||||
|         }; | ||||
|         return ownKeys(o); | ||||
|     }; | ||||
|     return function (mod) { | ||||
|         if (mod && mod.__esModule) return mod; | ||||
|         var result = {}; | ||||
|         if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||||
|         __setModuleDefault(result, mod); | ||||
|         return result; | ||||
|     }; | ||||
| })(); | ||||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||||
|     function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||||
|     return new (P || (P = Promise))(function (resolve, reject) { | ||||
|  | @ -64973,7 +64983,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||
|     }); | ||||
| }; | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| exports.saveRun = exports.saveOnlyRun = exports.saveImpl = void 0; | ||||
| exports.saveImpl = saveImpl; | ||||
| exports.saveOnlyRun = saveOnlyRun; | ||||
| exports.saveRun = saveRun; | ||||
| const cache = __importStar(__nccwpck_require__(5116)); | ||||
| const core = __importStar(__nccwpck_require__(7484)); | ||||
| const constants_1 = __nccwpck_require__(7242); | ||||
|  | @ -65024,7 +65036,6 @@ function saveImpl(stateProvider) { | |||
|         return cacheId; | ||||
|     }); | ||||
| } | ||||
| exports.saveImpl = saveImpl; | ||||
| function saveOnlyRun(earlyExit) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         try { | ||||
|  | @ -65049,7 +65060,6 @@ function saveOnlyRun(earlyExit) { | |||
|         } | ||||
|     }); | ||||
| } | ||||
| exports.saveOnlyRun = saveOnlyRun; | ||||
| function saveRun(earlyExit) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         try { | ||||
|  | @ -65071,7 +65081,6 @@ function saveRun(earlyExit) { | |||
|         } | ||||
|     }); | ||||
| } | ||||
| exports.saveRun = saveRun; | ||||
| 
 | ||||
| 
 | ||||
| /***/ }), | ||||
|  | @ -65097,13 +65106,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( | |||
| }) : function(o, v) { | ||||
|     o["default"] = v; | ||||
| }); | ||||
| var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     if (mod && mod.__esModule) return mod; | ||||
|     var result = {}; | ||||
|     if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||
|     __setModuleDefault(result, mod); | ||||
|     return result; | ||||
| }; | ||||
| var __importStar = (this && this.__importStar) || (function () { | ||||
|     var ownKeys = function(o) { | ||||
|         ownKeys = Object.getOwnPropertyNames || function (o) { | ||||
|             var ar = []; | ||||
|             for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||||
|             return ar; | ||||
|         }; | ||||
|         return ownKeys(o); | ||||
|     }; | ||||
|     return function (mod) { | ||||
|         if (mod && mod.__esModule) return mod; | ||||
|         var result = {}; | ||||
|         if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||||
|         __setModuleDefault(result, mod); | ||||
|         return result; | ||||
|     }; | ||||
| })(); | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| exports.NullStateProvider = exports.StateProvider = void 0; | ||||
| const core = __importStar(__nccwpck_require__(7484)); | ||||
|  | @ -65172,15 +65191,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( | |||
| }) : function(o, v) { | ||||
|     o["default"] = v; | ||||
| }); | ||||
| var __importStar = (this && this.__importStar) || function (mod) { | ||||
|     if (mod && mod.__esModule) return mod; | ||||
|     var result = {}; | ||||
|     if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||||
|     __setModuleDefault(result, mod); | ||||
|     return result; | ||||
| }; | ||||
| var __importStar = (this && this.__importStar) || (function () { | ||||
|     var ownKeys = function(o) { | ||||
|         ownKeys = Object.getOwnPropertyNames || function (o) { | ||||
|             var ar = []; | ||||
|             for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||||
|             return ar; | ||||
|         }; | ||||
|         return ownKeys(o); | ||||
|     }; | ||||
|     return function (mod) { | ||||
|         if (mod && mod.__esModule) return mod; | ||||
|         var result = {}; | ||||
|         if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||||
|         __setModuleDefault(result, mod); | ||||
|         return result; | ||||
|     }; | ||||
| })(); | ||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||
| exports.isCacheFeatureAvailable = exports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.isExactKeyMatch = exports.isGhes = void 0; | ||||
| exports.isGhes = isGhes; | ||||
| exports.isExactKeyMatch = isExactKeyMatch; | ||||
| exports.logWarning = logWarning; | ||||
| exports.isValidEvent = isValidEvent; | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| exports.getInputAsInt = getInputAsInt; | ||||
| exports.getInputAsBool = getInputAsBool; | ||||
| exports.isCacheFeatureAvailable = isCacheFeatureAvailable; | ||||
| const cache = __importStar(__nccwpck_require__(5116)); | ||||
| const core = __importStar(__nccwpck_require__(7484)); | ||||
| const constants_1 = __nccwpck_require__(7242); | ||||
|  | @ -65192,25 +65228,21 @@ function isGhes() { | |||
|     const isLocalHost = hostname.endsWith(".LOCALHOST"); | ||||
|     return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; | ||||
| } | ||||
| exports.isGhes = isGhes; | ||||
| function isExactKeyMatch(key, cacheKey) { | ||||
|     return !!(cacheKey && | ||||
|         cacheKey.localeCompare(key, undefined, { | ||||
|             sensitivity: "accent" | ||||
|         }) === 0); | ||||
| } | ||||
| exports.isExactKeyMatch = isExactKeyMatch; | ||||
| function logWarning(message) { | ||||
|     const warningPrefix = "[warning]"; | ||||
|     core.info(`${warningPrefix}${message}`); | ||||
| } | ||||
| exports.logWarning = logWarning; | ||||
| // Cache token authorized for all events that are tied to a ref
 | ||||
| // See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
 | ||||
| function isValidEvent() { | ||||
|     return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]); | ||||
| } | ||||
| exports.isValidEvent = isValidEvent; | ||||
| function getInputAsArray(name, options) { | ||||
|     return core | ||||
|         .getInput(name, options) | ||||
|  | @ -65218,7 +65250,6 @@ function getInputAsArray(name, options) { | |||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== ""); | ||||
| } | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| function getInputAsInt(name, options) { | ||||
|     const value = parseInt(core.getInput(name, options)); | ||||
|     if (isNaN(value) || value < 0) { | ||||
|  | @ -65226,12 +65257,10 @@ function getInputAsInt(name, options) { | |||
|     } | ||||
|     return value; | ||||
| } | ||||
| exports.getInputAsInt = getInputAsInt; | ||||
| function getInputAsBool(name, options) { | ||||
|     const result = core.getInput(name, options); | ||||
|     return result.toLowerCase() === "true"; | ||||
| } | ||||
| exports.getInputAsBool = getInputAsBool; | ||||
| function isCacheFeatureAvailable() { | ||||
|     if (cache.isFeatureAvailable()) { | ||||
|         return true; | ||||
|  | @ -65244,7 +65273,6 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github | |||
|     logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); | ||||
|     return false; | ||||
| } | ||||
| exports.isCacheFeatureAvailable = isCacheFeatureAvailable; | ||||
| 
 | ||||
| 
 | ||||
| /***/ }), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue