@@ -59387,9 +59387,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
59387
59387
});
59388
59388
};
59389
59389
Object.defineProperty(exports, "__esModule", ({ value: true }));
59390
+ exports.saveRun = exports.saveOnlyRun = exports.saveImpl = void 0;
59390
59391
const cache = __importStar(__nccwpck_require__(7799));
59391
59392
const core = __importStar(__nccwpck_require__(2186));
59392
59393
const constants_1 = __nccwpck_require__(9042);
59394
+ const stateProvider_1 = __nccwpck_require__(1527);
59393
59395
const utils = __importStar(__nccwpck_require__(6850));
59394
59396
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
59395
59397
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
@@ -59436,65 +59438,54 @@ function saveImpl(stateProvider) {
59436
59438
return cacheId;
59437
59439
});
59438
59440
}
59439
- exports["default"] = saveImpl;
59440
-
59441
-
59442
- /***/ }),
59443
-
59444
- /***/ 3160:
59445
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
59446
-
59447
- "use strict";
59448
-
59449
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
59450
- if (k2 === undefined) k2 = k;
59451
- var desc = Object.getOwnPropertyDescriptor(m, k);
59452
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
59453
- desc = { enumerable: true, get: function() { return m[k]; } };
59454
- }
59455
- Object.defineProperty(o, k2, desc);
59456
- }) : (function(o, m, k, k2) {
59457
- if (k2 === undefined) k2 = k;
59458
- o[k2] = m[k];
59459
- }));
59460
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
59461
- Object.defineProperty(o, "default", { enumerable: true, value: v });
59462
- }) : function(o, v) {
59463
- o["default"] = v;
59464
- });
59465
- var __importStar = (this && this.__importStar) || function (mod) {
59466
- if (mod && mod.__esModule) return mod;
59467
- var result = {};
59468
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
59469
- __setModuleDefault(result, mod);
59470
- return result;
59471
- };
59472
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
59473
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
59474
- return new (P || (P = Promise))(function (resolve, reject) {
59475
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
59476
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
59477
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
59478
- step((generator = generator.apply(thisArg, _arguments || [])).next());
59441
+ exports.saveImpl = saveImpl;
59442
+ function saveOnlyRun(earlyExit) {
59443
+ return __awaiter(this, void 0, void 0, function* () {
59444
+ try {
59445
+ const cacheId = yield saveImpl(new stateProvider_1.NullStateProvider());
59446
+ if (cacheId === -1) {
59447
+ core.warning(`Cache save failed.`);
59448
+ }
59449
+ }
59450
+ catch (err) {
59451
+ console.error(err);
59452
+ if (earlyExit) {
59453
+ process.exit(1);
59454
+ }
59455
+ }
59456
+ // node will stay alive if any promises are not resolved,
59457
+ // which is a possibility if HTTP requests are dangling
59458
+ // due to retries or timeouts. We know that if we got here
59459
+ // that all promises that we care about have successfully
59460
+ // resolved, so simply exit with success.
59461
+ if (earlyExit) {
59462
+ process.exit(0);
59463
+ }
59479
59464
});
59480
- };
59481
- var __importDefault = (this && this.__importDefault) || function (mod) {
59482
- return (mod && mod.__esModule) ? mod : { "default": mod };
59483
- };
59484
- Object.defineProperty(exports, "__esModule", ({ value: true }));
59485
- const core = __importStar(__nccwpck_require__(2186));
59486
- const saveImpl_1 = __importDefault(__nccwpck_require__(6589));
59487
- const stateProvider_1 = __nccwpck_require__(1527);
59488
- function run() {
59465
+ }
59466
+ exports.saveOnlyRun = saveOnlyRun;
59467
+ function saveRun(earlyExit) {
59489
59468
return __awaiter(this, void 0, void 0, function* () {
59490
- const cacheId = yield (0, saveImpl_1.default)(new stateProvider_1.NullStateProvider());
59491
- if (cacheId === -1) {
59492
- core.warning(`Cache save failed.`);
59469
+ try {
59470
+ yield saveImpl(new stateProvider_1.StateProvider());
59471
+ }
59472
+ catch (err) {
59473
+ console.error(err);
59474
+ if (earlyExit) {
59475
+ process.exit(1);
59476
+ }
59477
+ }
59478
+ // node will stay alive if any promises are not resolved,
59479
+ // which is a possibility if HTTP requests are dangling
59480
+ // due to retries or timeouts. We know that if we got here
59481
+ // that all promises that we care about have successfully
59482
+ // resolved, so simply exit with success.
59483
+ if (earlyExit) {
59484
+ process.exit(0);
59493
59485
}
59494
59486
});
59495
59487
}
59496
- run();
59497
- exports["default"] = run;
59488
+ exports.saveRun = saveRun;
59498
59489
59499
59490
59500
59491
/***/ }),
@@ -59882,12 +59873,18 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
59882
59873
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
59883
59874
/******/
59884
59875
/************************************************************************/
59885
- /******/
59886
- /******/ // startup
59887
- /******/ // Load entry module and return exports
59888
- /******/ // This entry module is referenced by other modules so it can't be inlined
59889
- /******/ var __webpack_exports__ = __nccwpck_require__(3160);
59890
- /******/ module.exports = __webpack_exports__;
59891
- /******/
59876
+ var __webpack_exports__ = {};
59877
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
59878
+ (() => {
59879
+ "use strict";
59880
+ var exports = __webpack_exports__;
59881
+
59882
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
59883
+ const saveImpl_1 = __nccwpck_require__(6589);
59884
+ (0, saveImpl_1.saveOnlyRun)(true);
59885
+
59886
+ })();
59887
+
59888
+ module.exports = __webpack_exports__;
59892
59889
/******/ })()
59893
59890
;
0 commit comments