Skip to content

Commit 7dece5a

Browse files
feat: output token_file path from meshstack-auth action
1 parent 917a196 commit 7dece5a

File tree

4 files changed

+274
-5268
lines changed

4 files changed

+274
-5268
lines changed

dist/cleanup/index.js

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25663,42 +25663,31 @@ var __importStar = (this && this.__importStar) || function (mod) {
2566325663
__setModuleDefault(result, mod);
2566425664
return result;
2566525665
};
25666-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
25667-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
25668-
return new (P || (P = Promise))(function (resolve, reject) {
25669-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25670-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25671-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
25672-
step((generator = generator.apply(thisArg, _arguments || [])).next());
25673-
});
25674-
};
2567525666
Object.defineProperty(exports, "__esModule", ({ value: true }));
2567625667
const core = __importStar(__nccwpck_require__(2186));
2567725668
const fs = __importStar(__nccwpck_require__(7147));
2567825669
const path = __importStar(__nccwpck_require__(1017));
2567925670
const os = __importStar(__nccwpck_require__(2037));
25680-
function cleanup() {
25681-
return __awaiter(this, void 0, void 0, function* () {
25682-
try {
25683-
const tempDir = process.env.RUNNER_TEMP || os.tmpdir();
25684-
const tokenFilePath = path.join(tempDir, 'meshstack_token.json');
25685-
if (fs.existsSync(tokenFilePath)) {
25686-
fs.unlinkSync(tokenFilePath);
25687-
core.info(`Deleted token file: ${tokenFilePath}`);
25688-
}
25689-
else {
25690-
core.info(`Token file does not exist: ${tokenFilePath}`);
25691-
}
25671+
async function cleanup() {
25672+
try {
25673+
const tempDir = process.env.RUNNER_TEMP || os.tmpdir();
25674+
const tokenFilePath = path.join(tempDir, 'meshstack_token.json');
25675+
if (fs.existsSync(tokenFilePath)) {
25676+
fs.unlinkSync(tokenFilePath);
25677+
core.info(`Deleted token file: ${tokenFilePath}`);
2569225678
}
25693-
catch (error) {
25694-
if (error instanceof Error) {
25695-
core.setFailed(error.message);
25696-
}
25697-
else {
25698-
core.setFailed('An unknown error occurred during cleanup');
25699-
}
25679+
else {
25680+
core.info(`Token file does not exist: ${tokenFilePath}`);
2570025681
}
25701-
});
25682+
}
25683+
catch (error) {
25684+
if (error instanceof Error) {
25685+
core.setFailed(error.message);
25686+
}
25687+
else {
25688+
core.setFailed('An unknown error occurred during cleanup');
25689+
}
25690+
}
2570225691
}
2570325692
cleanup();
2570425693

0 commit comments

Comments
 (0)