@altimateai/altimate-code 0.1.4 → 0.1.9

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/altimate-code CHANGED
@@ -17,7 +17,7 @@ function run(target) {
17
17
  process.exit(code)
18
18
  }
19
19
 
20
- const envPath = process.env.ALTIMATE_CLI_BIN_PATH
20
+ const envPath = process.env.OPENCODE_BIN_PATH
21
21
  if (envPath) {
22
22
  run(envPath)
23
23
  }
@@ -26,7 +26,7 @@ const scriptPath = fs.realpathSync(__filename)
26
26
  const scriptDir = path.dirname(scriptPath)
27
27
 
28
28
  //
29
- const cached = path.join(scriptDir, ".altimate-code")
29
+ const cached = path.join(scriptDir, ".opencode")
30
30
  if (fs.existsSync(cached)) {
31
31
  run(cached)
32
32
  }
@@ -50,8 +50,8 @@ let arch = archMap[os.arch()]
50
50
  if (!arch) {
51
51
  arch = os.arch()
52
52
  }
53
- const base = "@altimateai/altimate-code-" + platform + "-" + arch
54
- const binary = platform === "windows" ? "altimate-code.exe" : "altimate-code"
53
+ const base = "opencode-" + platform + "-" + arch
54
+ const binary = platform === "windows" ? "opencode.exe" : "opencode"
55
55
 
56
56
  function supportsAvx2() {
57
57
  if (arch !== "x64") return false
@@ -169,7 +169,7 @@ function findBinary(startDir) {
169
169
  const resolved = findBinary(scriptDir)
170
170
  if (!resolved) {
171
171
  console.error(
172
- "It seems that your package manager failed to install the right version of the altimate-code CLI for your platform. You can try manually installing " +
172
+ "It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing " +
173
173
  names.map((n) => `\"${n}\"`).join(" or ") +
174
174
  " package",
175
175
  )
package/package.json CHANGED
@@ -6,19 +6,19 @@
6
6
  "scripts": {
7
7
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
8
8
  },
9
- "version": "0.1.4",
9
+ "version": "v0.1.9",
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@altimateai/altimate-code-linux-x64": "0.1.4",
13
- "@altimateai/altimate-code-linux-arm64-musl": "0.1.4",
14
- "@altimateai/altimate-code-darwin-x64": "0.1.4",
15
- "@altimateai/altimate-code-windows-x64": "0.1.4",
16
- "@altimateai/altimate-code-linux-x64-musl": "0.1.4",
17
- "@altimateai/altimate-code-darwin-x64-baseline": "0.1.4",
18
- "@altimateai/altimate-code-linux-x64-baseline-musl": "0.1.4",
19
- "@altimateai/altimate-code-linux-x64-baseline": "0.1.4",
20
- "@altimateai/altimate-code-linux-arm64": "0.1.4",
21
- "@altimateai/altimate-code-darwin-arm64": "0.1.4",
22
- "@altimateai/altimate-code-windows-x64-baseline": "0.1.4"
12
+ "@altimateai/altimate-code-linux-x64": "v0.1.9",
13
+ "@altimateai/altimate-code-linux-arm64-musl": "v0.1.9",
14
+ "@altimateai/altimate-code-darwin-x64": "v0.1.9",
15
+ "@altimateai/altimate-code-windows-x64": "v0.1.9",
16
+ "@altimateai/altimate-code-linux-x64-musl": "v0.1.9",
17
+ "@altimateai/altimate-code-darwin-x64-baseline": "v0.1.9",
18
+ "@altimateai/altimate-code-linux-x64-baseline-musl": "v0.1.9",
19
+ "@altimateai/altimate-code-linux-x64-baseline": "v0.1.9",
20
+ "@altimateai/altimate-code-linux-arm64": "v0.1.9",
21
+ "@altimateai/altimate-code-darwin-arm64": "v0.1.9",
22
+ "@altimateai/altimate-code-windows-x64-baseline": "v0.1.9"
23
23
  }
24
24
  }
package/postinstall.mjs CHANGED
@@ -49,8 +49,8 @@ function detectPlatformAndArch() {
49
49
 
50
50
  function findBinary() {
51
51
  const { platform, arch } = detectPlatformAndArch()
52
- const packageName = `@altimateai/altimate-code-${platform}-${arch}`
53
- const binaryName = platform === "windows" ? "altimate-code.exe" : "altimate-code"
52
+ const packageName = `opencode-${platform}-${arch}`
53
+ const binaryName = platform === "windows" ? "opencode.exe" : "opencode"
54
54
 
55
55
  try {
56
56
  // Use require.resolve to find the package
@@ -89,7 +89,7 @@ function symlinkBinary(sourcePath, binaryName) {
89
89
  const { targetPath } = prepareBinDirectory(binaryName)
90
90
 
91
91
  fs.symlinkSync(sourcePath, targetPath)
92
- console.log(`altimate-code binary symlinked: ${targetPath} -> ${sourcePath}`)
92
+ console.log(`opencode binary symlinked: ${targetPath} -> ${sourcePath}`)
93
93
 
94
94
  // Verify the file exists after operation
95
95
  if (!fs.existsSync(targetPath)) {
@@ -109,7 +109,7 @@ async function main() {
109
109
  // On non-Windows platforms, just verify the binary package exists
110
110
  // Don't replace the wrapper script - it handles binary execution
111
111
  const { binaryPath } = findBinary()
112
- const target = path.join(__dirname, "bin", ".altimate-code")
112
+ const target = path.join(__dirname, "bin", ".opencode")
113
113
  if (fs.existsSync(target)) fs.unlinkSync(target)
114
114
  try {
115
115
  fs.linkSync(binaryPath, target)
@@ -118,7 +118,7 @@ async function main() {
118
118
  }
119
119
  fs.chmodSync(target, 0o755)
120
120
  } catch (error) {
121
- console.error("Failed to setup altimate-code binary:", error.message)
121
+ console.error("Failed to setup opencode binary:", error.message)
122
122
  process.exit(1)
123
123
  }
124
124
  }