diff --git a/package.json b/package.json index 5356c38..d708648 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "engines": { "node": ">=14" }, - "bin": "cli.js", + "bin": "./build/cli.js", "scripts": { "build": "tsup", "dev": "tsup --watch", diff --git a/cli.js b/src/cli.ts similarity index 85% rename from cli.js rename to src/cli.ts index a82395a..e2021ba 100644 --- a/cli.js +++ b/src/cli.ts @@ -1,6 +1,5 @@ #!/usr/bin/env node - -import { ChatGPTAPI } from './build/index.js' +import { ChatGPTAPI } from '.' const input = process.argv[2] diff --git a/tsup.config.ts b/tsup.config.ts index 79ba933..15a3436 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'tsup' export default defineConfig([ { - entry: ['src/index.ts'], + entry: ['src/index.ts', 'src/cli.ts'], outDir: 'build', target: 'node16', platform: 'node',