This commit is contained in:
2025-05-12 05:38:44 +09:00
parent dced21c3f8
commit 6d78bfa46e
8120 changed files with 1161564 additions and 0 deletions

20
book/node_modules/honkit/lib/fs/tmpdir.js generated vendored Normal file
View File

@ -0,0 +1,20 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTmpDirWithRealPath = void 0;
const path_1 = __importDefault(require("path"));
const os_1 = __importDefault(require("os"));
const fs_1 = __importDefault(require("fs"));
/**
* Create a temporary directory with a real path
* ebook-convert requires a real path to work
* https://github.com/honkit/honkit/issues/394
* @param prefix "honkit-"
*/
const createTmpDirWithRealPath = (prefix = "honkit-") => {
const tmpDir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), prefix));
return fs_1.default.realpathSync(tmpDir);
};
exports.createTmpDirWithRealPath = createTmpDirWithRealPath;