UNPKG

@apideck/portman

Version:

Port OpenAPI Spec to Postman Collection, with contract & variation tests included

28 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clearTmpDirectory = void 0; var tslib_1 = require("tslib"); var Option = tslib_1.__importStar(require("fp-ts/lib/Option")); var fs_extra_1 = tslib_1.__importDefault(require("fs-extra")); var clearTmpDirectory = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () { var error_1; return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: _a.trys.push([0, 3, , 4]); return [4, fs_extra_1.default.emptyDir("".concat(__dirname, "/../../tmp/working"))]; case 1: _a.sent(); return [4, fs_extra_1.default.rmdir("".concat(__dirname, "/../../tmp/working"))]; case 2: _a.sent(); return [3, 4]; case 3: error_1 = _a.sent(); return [2, Option.some(error_1.toString())]; case 4: return [2, Option.none]; } }); }); }; exports.clearTmpDirectory = clearTmpDirectory; //# sourceMappingURL=clearTmpDirectory.js.map