Skip to content

Commit

Permalink
rewrite as a monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed Jul 31, 2024
1 parent 17d0037 commit 70c9596
Show file tree
Hide file tree
Showing 32 changed files with 5,503 additions and 91 deletions.
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
"updateInternalDependencies": "patch",
"ignore": ["@cloudflare/example-*"]
}
5 changes: 5 additions & 0 deletions .changeset/lucky-laws-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"workers-ai-provider": patch
---

rewrite as a monorepo
3 changes: 0 additions & 3 deletions .github/changeset-publish.ts

This file was deleted.

9 changes: 0 additions & 9 deletions .github/changeset-version.ts

This file was deleted.

2 changes: 1 addition & 1 deletion .github/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["bun"]
"types": ["node"]
}
}
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
with:
fetch-depth: 1

- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v4

- run: bun install
- run: npm run install

- run: bun run build
- run: npm run build

- id: changesets
uses: changesets/action@v1
with:
version: bun .github/changeset-version.ts
publish: bun ./.github/changeset-publish.ts
version: npx changeset version && npm install
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.WORKERS_AI_PROVIDER_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Binary file removed bun.lockb
Binary file not shown.
Binary file removed example/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion example/package.json → examples/ai-chat/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@cloudflare/example-ai-chat",
"private": true,
"scripts": {
"start": "wrangler dev",
Expand All @@ -13,7 +14,6 @@
"@cloudflare/workers-types": "^4.20240725.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"esbuild": "^0.23.0",
"wrangler": "3.67.1"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.base.json",
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"lib": ["DOM", "ESNext"]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { convertToCoreMessages, streamText } from "ai";
import { createWorkersAI } from "../../../src";
import { createWorkersAI } from "workers-ai-provider/src";

export interface Env {
AI: Ai;
Expand All @@ -24,6 +24,6 @@ export default {
return result.toDataStreamResponse();
}

return new Response("Not Found", { status: 404 });
return new Response("Not Found!!", { status: 404 });
},
} satisfies ExportedHandler<Env>;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.base.json",
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"types": ["@cloudflare/workers-types"]
}
Expand Down
2 changes: 1 addition & 1 deletion example/wrangler.toml → examples/ai-chat/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "workers-ai-chat"
main = "src/server/index.ts"
compatibility_date = "2024-07-31"

assets = 'public'
legacy_assets = 'public'

[ai]
binding = "AI"
Expand Down
Loading

0 comments on commit 70c9596

Please sign in to comment.