rename package
publish / publish (push) Has been cancelled

This commit is contained in:
Dax Raad
2025-06-18 14:57:51 -04:00
parent f97eacfbeb
commit fe862ac2c7
6 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.0.0",
"name": "opencode",
"name": "opencode.ai",
"type": "module",
"private": true,
"scripts": {
+1 -1
View File
@@ -68,7 +68,7 @@ await $`cp ./script/postinstall.mjs ./dist/${pkg.name}/postinstall.mjs`
await Bun.file(`./dist/${pkg.name}/package.json`).write(
JSON.stringify(
{
name: pkg.name + "-ai",
name: pkg.name,
bin: {
[pkg.name]: `./bin/${pkg.name}`,
},
+6 -4
View File
@@ -74,7 +74,7 @@ export namespace Installation {
for (const check of checks) {
const output = await check.command()
if (output.includes("opencode-ai")) {
if (output.includes("opencode-ai") || output.includes("opencode.ai")) {
return check.name
}
}
@@ -95,11 +95,13 @@ export namespace Installation {
case "curl":
return $`curl -fsSL https://opencode.ai/install | bash`
case "npm":
return $`npm install -g opencode-ai@${target}`
return $`npm remove -g opencode-ai && npm install -g opencode.ai@${target}`
case "pnpm":
return $`pnpm install -g opencode-ai@${target}`
return $`pnpm remove -g opencode-ai && pnpm install -g opencode.ai@${target}`
case "bun":
return $`bun install -g opencode-ai@${target}`
return $`bun remove -g opencode-ai && bun install -g opencode.ai@${target}`
case "yarn":
return $`yarn remove -g opencode-ai && yarn add -g opencode.ai@${target}`
default:
throw new Error(`Unknown method: ${method}`)
}