UNPKG

@jasondark/proompt

Version:

CLI tool for running AI prompts with structure and repeatability

25 lines โ€ข 999 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logTempFileLocation = exports.generateTempXmlPath = void 0; const crypto_1 = require("crypto"); const os_1 = require("os"); const path_1 = require("path"); /** * Generate a unique temporary file path for repository XML output */ const generateTempXmlPath = (prefix = 'proompt-repo') => { const timestamp = Date.now(); const randomSuffix = (0, crypto_1.randomBytes)(8).toString('hex'); const filename = `${prefix}-${timestamp}-${randomSuffix}.xml`; return (0, path_1.join)((0, os_1.tmpdir)(), filename); }; exports.generateTempXmlPath = generateTempXmlPath; /** * Log temporary file location for manual cleanup */ const logTempFileLocation = (filepath) => { console.log(`๐Ÿ“ Temporary XML file created: ${filepath}`); console.log(`๐Ÿงน Note: Clean up manually when finished: rm "${filepath}"`); }; exports.logTempFileLocation = logTempFileLocation; //# sourceMappingURL=temp-file.js.map