dimcode 0.3.22-beta.0 → 0.3.22
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/dim.mjs +4 -9
- package/package.json +6 -6
package/bin/dim.mjs
CHANGED
|
@@ -22,17 +22,12 @@ try {
|
|
|
22
22
|
}
|
|
23
23
|
catch {}
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
//
|
|
25
|
+
// Inner binary file name shipped inside each platform sub-package's bin/.
|
|
26
|
+
// Only needed when the binary basename differs from the wrapper package name.
|
|
27
27
|
const BINARY_BASENAMES = {
|
|
28
|
-
'dimagent': 'dimcode',
|
|
29
28
|
'goatchain-cli': 'goatchain',
|
|
30
29
|
}
|
|
31
30
|
const binaryBasename = BINARY_BASENAMES[wrapperName] || wrapperName
|
|
32
|
-
const PLATFORM_PACKAGE_PREFIXES = {
|
|
33
|
-
'dimagent': 'dimcode',
|
|
34
|
-
}
|
|
35
|
-
const platformPackagePrefix = PLATFORM_PACKAGE_PREFIXES[wrapperName] || wrapperName
|
|
36
31
|
|
|
37
32
|
const wrapperDir = path.join(__dirname, '..').replace(/\\/g, '/').toLowerCase()
|
|
38
33
|
const wrapperPm
|
|
@@ -67,7 +62,7 @@ async function runOpentui(restArgs) {
|
|
|
67
62
|
const archMap = { x64: 'x64', arm64: 'arm64' }
|
|
68
63
|
const platform = platformMap[os.platform()] || os.platform()
|
|
69
64
|
const arch = archMap[os.arch()] || os.arch()
|
|
70
|
-
const base =
|
|
65
|
+
const base = wrapperName + '-' + platform + '-' + arch
|
|
71
66
|
const binary = platform === 'windows' ? binaryBasename + '.exe' : binaryBasename
|
|
72
67
|
|
|
73
68
|
if (process.env.DIMCODE_DEBUG) {
|
|
@@ -117,7 +112,7 @@ async function ensureCachedBinary(base, binary, version) {
|
|
|
117
112
|
}
|
|
118
113
|
|
|
119
114
|
const home = os.homedir()
|
|
120
|
-
const cacheDir = path.join(home, '.dimcode', 'binaries', base, version)
|
|
115
|
+
const cacheDir = path.join(home, wrapperName === 'dimagent' ? '.dim' : '.dimcode', 'binaries', base, version)
|
|
121
116
|
const cachedBin = path.join(cacheDir, 'bin', binary)
|
|
122
117
|
if (fs.existsSync(cachedBin)) {
|
|
123
118
|
if (process.env.DIMCODE_DEBUG)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dimcode",
|
|
3
|
-
"version": "0.3.22
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"description": "AI coding agent CLI and terminal coding assistant with an interactive TUI (beta channel)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"README.zh.md"
|
|
13
13
|
],
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"dimcode-darwin-arm64": "0.3.22
|
|
16
|
-
"dimcode-darwin-x64": "0.3.22
|
|
17
|
-
"dimcode-linux-arm64": "0.3.22
|
|
18
|
-
"dimcode-linux-x64": "0.3.22
|
|
19
|
-
"dimcode-windows-x64": "0.3.22
|
|
15
|
+
"dimcode-darwin-arm64": "0.3.22",
|
|
16
|
+
"dimcode-darwin-x64": "0.3.22",
|
|
17
|
+
"dimcode-linux-arm64": "0.3.22",
|
|
18
|
+
"dimcode-linux-x64": "0.3.22",
|
|
19
|
+
"dimcode-windows-x64": "0.3.22"
|
|
20
20
|
}
|
|
21
21
|
}
|