dfcode 2.4.2 → 3.0.1-beta.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/bin/{dfcode → dfcode.js} +21 -18
- package/package.json +20 -9
package/bin/{dfcode → dfcode.js}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import childProcess from "child_process"
|
|
4
|
+
import fs from "fs"
|
|
5
|
+
import path from "path"
|
|
6
|
+
import os from "os"
|
|
7
|
+
import { fileURLToPath } from "url"
|
|
7
8
|
|
|
8
9
|
function run(target) {
|
|
9
10
|
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
@@ -20,19 +21,21 @@ function run(target) {
|
|
|
20
21
|
|
|
21
22
|
function resetTerminal() {
|
|
22
23
|
if (!process.stdout.isTTY && process.env.DFCODE_FORCE_TERMINAL_RESET !== "1") return
|
|
23
|
-
process.stdout.write(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
process.stdout.write(
|
|
25
|
+
[
|
|
26
|
+
"\x1b[0m",
|
|
27
|
+
"\x1b[?25h",
|
|
28
|
+
"\x1b[?1000l",
|
|
29
|
+
"\x1b[?1002l",
|
|
30
|
+
"\x1b[?1003l",
|
|
31
|
+
"\x1b[?1004l",
|
|
32
|
+
"\x1b[?1005l",
|
|
33
|
+
"\x1b[?1006l",
|
|
34
|
+
"\x1b[?1015l",
|
|
35
|
+
"\x1b[?2004l",
|
|
36
|
+
"\x1b[?1049l",
|
|
37
|
+
].join(""),
|
|
38
|
+
)
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
const envPath = process.env.DFCODE_BIN_PATH
|
|
@@ -40,7 +43,7 @@ if (envPath) {
|
|
|
40
43
|
run(envPath)
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
const scriptPath = fs.realpathSync(
|
|
46
|
+
const scriptPath = fs.realpathSync(fileURLToPath(import.meta.url))
|
|
44
47
|
const scriptDir = path.dirname(scriptPath)
|
|
45
48
|
|
|
46
49
|
const platformMap = {
|
package/package.json
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfcode",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1-beta.1",
|
|
4
4
|
"description": "AI-powered coding assistant - TUI interface",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"bin": {
|
|
6
|
-
"dfcode": "./bin/dfcode"
|
|
7
|
+
"dfcode": "./bin/dfcode.js"
|
|
7
8
|
},
|
|
8
9
|
"scripts": {
|
|
9
10
|
"postinstall": "node ./postinstall.mjs"
|
|
10
11
|
},
|
|
11
12
|
"optionalDependencies": {
|
|
12
|
-
"dfcode-darwin-arm64": "
|
|
13
|
-
"dfcode-darwin-x64": "
|
|
14
|
-
"dfcode-linux-x64": "
|
|
15
|
-
"dfcode-linux-arm64": "
|
|
16
|
-
"dfcode-windows-x64": "
|
|
13
|
+
"dfcode-darwin-arm64": "3.0.1-beta.1",
|
|
14
|
+
"dfcode-darwin-x64": "3.0.1-beta.1",
|
|
15
|
+
"dfcode-linux-x64": "3.0.1-beta.1",
|
|
16
|
+
"dfcode-linux-arm64": "3.0.1-beta.1",
|
|
17
|
+
"dfcode-windows-x64": "3.0.1-beta.1"
|
|
17
18
|
},
|
|
18
19
|
"license": "MIT",
|
|
19
|
-
"keywords": [
|
|
20
|
-
|
|
20
|
+
"keywords": [
|
|
21
|
+
"ai",
|
|
22
|
+
"coding",
|
|
23
|
+
"assistant",
|
|
24
|
+
"cli",
|
|
25
|
+
"tui",
|
|
26
|
+
"llm",
|
|
27
|
+
"claude",
|
|
28
|
+
"openai",
|
|
29
|
+
"gpt"
|
|
30
|
+
]
|
|
31
|
+
}
|