spice-js 2.6.49 → 2.6.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/nova/Ai.js +5 -1
package/package.json
CHANGED
package/src/nova/Ai.js
CHANGED
|
@@ -39,8 +39,12 @@ export default class AI {
|
|
|
39
39
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
const timestamp = new Date().toISOString().replace(/[:.-]/g, "");
|
|
43
|
+
const randomString = crypto.randomBytes(4).toString("hex");
|
|
44
|
+
const uniqueDirName = `file_${timestamp}_${randomString}`;
|
|
45
|
+
|
|
42
46
|
// Create a temporary file to store the input
|
|
43
|
-
const tempFilePath = path.join(outputDir,
|
|
47
|
+
const tempFilePath = path.join(outputDir, uniqueDirName);
|
|
44
48
|
|
|
45
49
|
// Check if fileData is a buffer or a stream
|
|
46
50
|
if (Buffer.isBuffer(fileData)) {
|