Skip to content

Commit

Permalink
chore: 更新多个package.json文件以优化清理脚本并升级依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Nov 26, 2024
1 parent bc95eb4 commit 634bc66
Show file tree
Hide file tree
Showing 12 changed files with 178 additions and 161 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deploy Worker
on:
push:
pull_request:
repository_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: test
steps:
- uses: actions/checkout@v2
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@antfu/eslint-config": "^3.9.2",
"@rollup/plugin-node-resolve": "^15.3.0",
"@types/node": "^22.9.3",
"@types/node": "^22.10.0",
"eslint": "^9.15.0",
"eslint-plugin-format": "^0.1.2",
"rollup-plugin-cleanup": "^3.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/interpolate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist",
"clean": "rm -rf dist && rm -rf node_modules",
"dev": "pnpm vite"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/apps/local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"scripts": {
"build": "pnpm vite build",
"start": "pnpm tsx src/index.ts",
"clean": "rm -rf dist"
"clean": "rm -rf dist && rm -rf node_modules"
},
"dependencies": {
"@chatgpt-telegram-workers/core": "workspace:*",
"@chatgpt-telegram-workers/next": "workspace:*",
"cloudflare-worker-adapter": "^1.3.3"
"cloudflare-worker-adapter": "^1.3.4"
},
"devDependencies": {
"@types/react": "^18.3.12"
Expand Down
8 changes: 4 additions & 4 deletions packages/apps/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist"
"clean": "rm -rf dist && rm -rf node_modules"
},
"dependencies": {
"@chatgpt-telegram-workers/core": "workspace:*",
"@chatgpt-telegram-workers/next": "workspace:*",
"cloudflare-worker-adapter": "^1.3.3"
"cloudflare-worker-adapter": "^1.3.4"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@vercel/node": "^3.2.24",
"openai": "^4.72.0",
"@vercel/node": "^3.2.26",
"openai": "^4.73.1",
"react-dom": "^18.3.1"
}
}
2 changes: 1 addition & 1 deletion packages/apps/workers-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist",
"clean": "rm -rf dist && rm -rf node_modules",
"deploy": "wrangler deploy --config ${TOML_PATH}"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist",
"clean": "rm -rf dist && rm -rf node_modules",
"deploy": "wrangler deploy --config ${TOML_PATH}"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist"
"clean": "rm -rf dist && rm -rf node_modules"
},
"dependencies": {
"@chatgpt-telegram-workers/plugins": "workspace:*"
Expand Down
20 changes: 10 additions & 10 deletions packages/lib/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist"
"clean": "rm -rf dist && rm -rf node_modules"
},
"dependencies": {
"@ai-sdk/anthropic": "^0.0.56",
"@ai-sdk/azure": "^0.0.52",
"@ai-sdk/cohere": "^0.0.28",
"@ai-sdk/google": "^0.0.55",
"@ai-sdk/mistral": "^0.0.46",
"@ai-sdk/openai": "^0.0.72",
"@ai-sdk/provider": "^0.0.26",
"@ai-sdk/anthropic": "^1.0.2",
"@ai-sdk/azure": "^1.0.5",
"@ai-sdk/cohere": "^1.0.3",
"@ai-sdk/google": "^1.0.3",
"@ai-sdk/mistral": "^1.0.3",
"@ai-sdk/openai": "^1.0.4",
"@ai-sdk/provider": "^1.0.1",
"@chatgpt-telegram-workers/core": "workspace:*",
"ai": "^3.4.33"
"ai": "^4.0.4"
},
"devDependencies": {
"@types/react": "^18.3.12",
"openai": "^4.72.0",
"openai": "^4.73.1",
"react-dom": "^18.3.1"
}
}
2 changes: 1 addition & 1 deletion packages/lib/next/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { generateText, streamText } from 'ai';

export async function requestChatCompletionsV2(params: { model: LanguageModelV1; prompt?: string; messages: HistoryItem[] }, onStream: ChatStreamTextHandler | null): Promise<ChatAgentResponse> {
if (onStream !== null) {
const stream = await streamText({
const stream = streamText({
model: params.model,
prompt: params.prompt,
messages: params.messages as Array<CoreMessage>,
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "pnpm vite build",
"clean": "rm -rf dist"
"clean": "rm -rf dist && rm -rf node_modules"
}
}
Loading

0 comments on commit 634bc66

Please sign in to comment.