dimcode 0.3.22 → 0.3.25
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 +9 -4
- package/package.json +6 -6
package/bin/dim.mjs
CHANGED
|
@@ -22,12 +22,17 @@ try {
|
|
|
22
22
|
}
|
|
23
23
|
catch {}
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
//
|
|
25
|
+
// Platform package and binary aliases let multiple wrapper names consume one
|
|
26
|
+
// immutable payload. dimagent shares dimcode's packages; goatchain is separate.
|
|
27
27
|
const BINARY_BASENAMES = {
|
|
28
|
+
'dimagent': 'dimcode',
|
|
28
29
|
'goatchain-cli': 'goatchain',
|
|
29
30
|
}
|
|
30
31
|
const binaryBasename = BINARY_BASENAMES[wrapperName] || wrapperName
|
|
32
|
+
const PLATFORM_PACKAGE_PREFIXES = {
|
|
33
|
+
'dimagent': 'dimcode',
|
|
34
|
+
}
|
|
35
|
+
const platformPackagePrefix = PLATFORM_PACKAGE_PREFIXES[wrapperName] || wrapperName
|
|
31
36
|
|
|
32
37
|
const wrapperDir = path.join(__dirname, '..').replace(/\\/g, '/').toLowerCase()
|
|
33
38
|
const wrapperPm
|
|
@@ -62,7 +67,7 @@ async function runOpentui(restArgs) {
|
|
|
62
67
|
const archMap = { x64: 'x64', arm64: 'arm64' }
|
|
63
68
|
const platform = platformMap[os.platform()] || os.platform()
|
|
64
69
|
const arch = archMap[os.arch()] || os.arch()
|
|
65
|
-
const base =
|
|
70
|
+
const base = platformPackagePrefix + '-' + platform + '-' + arch
|
|
66
71
|
const binary = platform === 'windows' ? binaryBasename + '.exe' : binaryBasename
|
|
67
72
|
|
|
68
73
|
if (process.env.DIMCODE_DEBUG) {
|
|
@@ -112,7 +117,7 @@ async function ensureCachedBinary(base, binary, version) {
|
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
const home = os.homedir()
|
|
115
|
-
const cacheDir = path.join(home,
|
|
120
|
+
const cacheDir = path.join(home, '.dimcode', 'binaries', base, version)
|
|
116
121
|
const cachedBin = path.join(cacheDir, 'bin', binary)
|
|
117
122
|
if (fs.existsSync(cachedBin)) {
|
|
118
123
|
if (process.env.DIMCODE_DEBUG)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dimcode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
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.
|
|
16
|
-
"dimcode-darwin-x64": "0.3.
|
|
17
|
-
"dimcode-linux-arm64": "0.3.
|
|
18
|
-
"dimcode-linux-x64": "0.3.
|
|
19
|
-
"dimcode-windows-x64": "0.3.
|
|
15
|
+
"dimcode-darwin-arm64": "0.3.25",
|
|
16
|
+
"dimcode-darwin-x64": "0.3.25",
|
|
17
|
+
"dimcode-linux-arm64": "0.3.25",
|
|
18
|
+
"dimcode-linux-x64": "0.3.25",
|
|
19
|
+
"dimcode-windows-x64": "0.3.25"
|
|
20
20
|
}
|
|
21
21
|
}
|