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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/nova/Ai.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spice-js",
3
- "version": "2.6.49",
3
+ "version": "2.6.50",
4
4
  "description": "spice",
5
5
  "main": "build/index.js",
6
6
  "repository": {
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, "temp_input");
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)) {