mirror of
https://github.com/actions/cache.git
synced 2024-11-15 18:13:52 +08:00
test
This commit is contained in:
parent
ab0e7714ce
commit
af1210e2a3
133
dist/restore-only/index.js
vendored
133
dist/restore-only/index.js
vendored
@ -34,7 +34,7 @@ module.exports =
|
||||
/******/ // the startup function
|
||||
/******/ function startup() {
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(396);
|
||||
/******/ return __webpack_require__(501);
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // run startup
|
||||
@ -36715,70 +36715,7 @@ exports.ProxyTracerProvider = ProxyTracerProvider;
|
||||
|
||||
/***/ }),
|
||||
/* 395 */,
|
||||
/* 396 */
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : 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 __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) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
const constants_1 = __webpack_require__(694);
|
||||
const restore_1 = __importDefault(__webpack_require__(778));
|
||||
function runRestoreAction() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (core.getInput(constants_1.Inputs.SaveOnAnyFailure) != "") {
|
||||
core.warning(`${constants_1.Inputs.SaveOnAnyFailure} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`);
|
||||
}
|
||||
if (core.getInput(constants_1.Inputs.UploadChunkSize) != "") {
|
||||
core.warning(`${constants_1.Inputs.UploadChunkSize} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`);
|
||||
}
|
||||
core.info("before run");
|
||||
yield (0, restore_1.default)();
|
||||
core.info("after run");
|
||||
});
|
||||
}
|
||||
core.info("before runRestoreAction");
|
||||
runRestoreAction();
|
||||
core.info("after runRestoreAction");
|
||||
core.info("after export default runRestoreAction");
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 396 */,
|
||||
/* 397 */,
|
||||
/* 398 */
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
@ -41355,7 +41292,70 @@ function defer(fn)
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 501 */,
|
||||
/* 501 */
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : 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 __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) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
const constants_1 = __webpack_require__(694);
|
||||
const restore_1 = __importDefault(__webpack_require__(778));
|
||||
function runRestoreAction() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (core.getInput(constants_1.Inputs.SaveOnAnyFailure) != "") {
|
||||
core.warning(`${constants_1.Inputs.SaveOnAnyFailure} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`);
|
||||
}
|
||||
if (core.getInput(constants_1.Inputs.UploadChunkSize) != "") {
|
||||
core.warning(`${constants_1.Inputs.UploadChunkSize} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`);
|
||||
}
|
||||
core.info("before run");
|
||||
yield (0, restore_1.default)();
|
||||
core.info("after run");
|
||||
});
|
||||
}
|
||||
core.info("before runRestoreAction");
|
||||
runRestoreAction();
|
||||
core.info("after runRestoreAction");
|
||||
core.info("after export default runRestoreAction");
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 502 */,
|
||||
/* 503 */,
|
||||
/* 504 */,
|
||||
@ -49108,7 +49108,6 @@ function run() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// run();
|
||||
exports.default = run;
|
||||
|
||||
|
||||
|
32
dist/restore/index.js
vendored
32
dist/restore/index.js
vendored
@ -34,7 +34,7 @@ module.exports =
|
||||
/******/ // the startup function
|
||||
/******/ function startup() {
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(778);
|
||||
/******/ return __webpack_require__(156);
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // run startup
|
||||
@ -4612,7 +4612,34 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
|
||||
/* 153 */,
|
||||
/* 154 */,
|
||||
/* 155 */,
|
||||
/* 156 */,
|
||||
/* 156 */
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
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) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const restore_1 = __importDefault(__webpack_require__(778));
|
||||
function runRestoreStep() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield (0, restore_1.default)();
|
||||
});
|
||||
}
|
||||
runRestoreStep();
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 157 */
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
@ -49045,7 +49072,6 @@ function run() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// run();
|
||||
exports.default = run;
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
"description": "Cache dependencies and build outputs",
|
||||
"main": "dist/restore/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && ncc build -o dist/restore src/restore.ts && ncc build -o dist/save src/save.ts && ncc build -o dist/restore-only src/restore-only.ts",
|
||||
"build": "tsc && ncc build -o dist/restore src/restore-step.ts && ncc build -o dist/save src/save.ts && ncc build -o dist/restore-only src/restore/restore-only.ts",
|
||||
"test": "tsc --noEmit && jest --coverage",
|
||||
"lint": "eslint **/*.ts --cache",
|
||||
"format": "prettier --write **/*.ts",
|
||||
|
7
src/restore-step.ts
Normal file
7
src/restore-step.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import restore from "./restore";
|
||||
|
||||
async function runRestoreStep(): Promise<void> {
|
||||
await restore();
|
||||
}
|
||||
|
||||
runRestoreStep();
|
@ -76,6 +76,4 @@ async function run(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// run();
|
||||
|
||||
export default run;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as core from "@actions/core";
|
||||
|
||||
import { Inputs } from "./constants";
|
||||
import restore from "./restore";
|
||||
import { Inputs } from "../constants";
|
||||
import restore from "../restore";
|
||||
|
||||
async function runRestoreAction(): Promise<void> {
|
||||
if (core.getInput(Inputs.SaveOnAnyFailure) != "") {
|
Loading…
Reference in New Issue
Block a user