rename package
This commit is contained in:
parent
d4157d9a96
commit
2239228062
6 changed files with 12 additions and 14 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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}`,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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}`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue