diff --git a/.gitignore b/.gitignore index 6668107..1ba63d0 100644 --- a/.gitignore +++ b/.gitignore @@ -109,4 +109,5 @@ dist *.txt *.jsonl -.yarn \ No newline at end of file +.yarn +lib \ No newline at end of file diff --git a/package.json b/package.json index 6c5ac6a..5d029c9 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,16 @@ { "name": "terminalgpt", - "version": "1.6.4", - "main": "index.ts", + "version": "1.6.9", + "main": "lib/index.js", "description": "Get GPT like chatGPT on your terminal", "scripts": { - "tgpt": "ts-node src/index.ts", + "tgpt": "node lib/index.js", "test": "jest --ci --coverage --verbose", "dev": "ts-node src/index.ts chat --engine gpt-4 --temperature 0.7", "dev:markdown": "ts-node src/index.js chat --engine gpt-4 --temperature 0.7 --markdown", "tunne": "ts-node src/index.js chat --engine gpt-4 --temperature 0.7 --finetunning true --limit 1", - "dev:delete": "ts-node src/index.js delete" + "dev:delete": "ts-node src/index.js delete", + "postinstall": "tsc" }, "homepage": "https://github.com/jucasoliveira/terminalGPT#readme", "repository": { @@ -23,7 +24,7 @@ "url": "https://github.com/jucasoliveira/terminalGPT/issues" }, "bin": { - "tgpt": "src/index.ts" + "tgpt": "lib/index.js" }, "jest": { "transform": { @@ -35,7 +36,6 @@ "clipboardy": "2.3.0", "commander": "^9.5.0", "compromise": "^14.8.1", - "crypto": "^1.0.1", "gradient-string": "^2.0.2", "lowdb": "^5.1.0", "markdown": "^0.5.0", @@ -44,19 +44,20 @@ "openai": "^3.2.0", "ora": "^5.4.1", "prompts": "^2.4.2", - "typesync": "^0.11.1" + "typesync": "^0.11.1", + "@types/node": "^16.0.0", + "@types/prompts": "^2.0.10", + "@types/gradient-string": "^1.1.2", + "@types/marked": "^4.3.1", + "@types/marked-terminal": "^3.1.3" }, "devDependencies": { "@types/chai": "^4.3.5", "@types/chalk": "^2.2.0", "@types/clipboardy": "2.0.1", "@types/eslint": "^8.44.2", - "@types/gradient-string": "^1.1.2", "@types/jest": "^29.5.4", - "@types/marked": "^4.3.1", - "@types/marked-terminal": "^3.1.3", "@types/ora": "^3.2.0", - "@types/prompts": "^2.4.4", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", "chai": "^4.3.7", diff --git a/tsconfig.json b/tsconfig.json index f1024e5..07a6958 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,19 @@ { "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - "target": "es2016", + "target": "ES2020", "module": "commonjs", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, "moduleResolution": "node", - "outDir": "./out" + "outDir": "./lib" }, "include": [ "src/*.ts" ], "exclude": [ - "node_modules" + "node_modules", + "lib" ] } diff --git a/yarn.lock b/yarn.lock index 15ef86d..442626d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -831,10 +831,10 @@ "resolved" "https://registry.npmjs.org/@types/marked/-/marked-4.3.1.tgz" "version" "4.3.1" -"@types/node@*": - "integrity" "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" - "resolved" "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz" - "version" "18.11.18" +"@types/node@*", "@types/node@^16.0.0": + "integrity" "sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==" + "resolved" "https://registry.npmjs.org/@types/node/-/node-16.18.48.tgz" + "version" "16.18.48" "@types/ora@^3.2.0": "integrity" "sha512-jll99xUKpiFbIFZSQcxm4numfsLaOWBzWNaRk3PvTSE7BPqTzzOCFmS0mQ7m8qkTfmYhuYbehTGsxkvRLPC++w==" @@ -843,7 +843,7 @@ dependencies: "ora" "*" -"@types/prompts@^2.4.4": +"@types/prompts@^2.0.10": "integrity" "sha512-p5N9uoTH76lLvSAaYSZtBCdEXzpOOufsRjnhjVSrZGXikVGHX9+cc9ERtHRV4hvBKHyZb1bg4K+56Bd2TqUn4A==" "resolved" "https://registry.npmjs.org/@types/prompts/-/prompts-2.4.4.tgz" "version" "2.4.4" @@ -1555,11 +1555,6 @@ "shebang-command" "^2.0.0" "which" "^2.0.1" -"crypto@^1.0.1": - "integrity" "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==" - "resolved" "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz" - "version" "1.0.1" - "debug@^4.1.0", "debug@^4.1.1", "debug@^4.3.2", "debug@^4.3.3", "debug@^4.3.4", "debug@4": "integrity" "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==" "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"