editprompt 1.4.0 → 1.4.1
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/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { promisify } from "node:util";
|
|
|
7
7
|
import Conf from "conf";
|
|
8
8
|
import clipboardy from "clipboardy";
|
|
9
9
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
10
|
+
import { randomBytes } from "node:crypto";
|
|
10
11
|
import { tmpdir } from "node:os";
|
|
11
12
|
import { join } from "node:path";
|
|
12
13
|
|
|
@@ -71,7 +72,7 @@ function setupLogger(options = {}) {
|
|
|
71
72
|
|
|
72
73
|
//#endregion
|
|
73
74
|
//#region package.json
|
|
74
|
-
var version = "1.4.
|
|
75
|
+
var version = "1.4.1";
|
|
75
76
|
|
|
76
77
|
//#endregion
|
|
77
78
|
//#region src/modules/tmux.ts
|
|
@@ -888,7 +889,7 @@ function getFormattedDateTime() {
|
|
|
888
889
|
async function createTempFile() {
|
|
889
890
|
const tempDir = join(tmpdir(), "editprompt-prompts");
|
|
890
891
|
await mkdir(tempDir, { recursive: true });
|
|
891
|
-
const filePath = join(tempDir, `${TEMP_FILE_PREFIX}${getFormattedDateTime()}${TEMP_FILE_EXTENSION}`);
|
|
892
|
+
const filePath = join(tempDir, `${TEMP_FILE_PREFIX}${getFormattedDateTime()}-${randomBytes(4).toString("hex")}${TEMP_FILE_EXTENSION}`);
|
|
892
893
|
await writeFile(filePath, "", "utf-8");
|
|
893
894
|
return filePath;
|
|
894
895
|
}
|