Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build and publish
name: Build, test, and publish nightly

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
Expand All @@ -15,7 +17,10 @@ jobs:
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Build
- name: Build framework
run: bun run build:deps
- name: Run unit tests
run: bun run test
working-directory: packages/framework
- name: Publish nightly
run: bunx pkg-pr-new publish './packages/framework' './packages/orpc'
run: bunx pkg-pr-new publish './packages/framework'
1 change: 1 addition & 0 deletions apps/playground/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
local.db

.oxide
.output

# output
out
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"drizzle-kit": "^0.31.6",
"nitro": "^3.0.1-alpha.1",
"typescript": "^5.9",
"vite": "^7.1.11"
"vite": "7.2.6"
},
"dependencies": {
"@libsql/client": "^0.15.15",
Expand Down
3 changes: 2 additions & 1 deletion apps/playground/src/app/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ export const router = {
.input(type<{ name: string; content: string }>())
.handler(async ({ input, context, errors }) => {
if (!context.user) return errors.UNAUTHORIZED();
const [newNote] = await db.insert(note).values({
const result = await db.insert(note).values({
name: input.name,
content: input.content,
userId: context.user?.id,
});
return result;
}),
};
1 change: 0 additions & 1 deletion apps/playground/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default {
if (orpcResult.matched) {
return orpcResult.response;
}
console.log(">>>REQ", request);
const authResult = await auth.handler(request);
if (authResult.ok) {
return authResult;
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export default defineConfig({
ssr: { build: { rollupOptions: { input: "./src/server.ts" } } },
},
plugins: [
oxide(),
tailwindcss(),
svelte({ compilerOptions: { experimental: { async: true } } }),
nitro(),
oxide(),
],
});
2 changes: 1 addition & 1 deletion apps/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"svelte": "^5.39.9",
"tailwindcss": "^4.1.14",
"typescript": "^5.9",
"vite": "^7.1.11"
"vite": "7.2.6"
},
"dependencies": {
"@oxidejs/framework": "workspace:*"
Expand Down
16 changes: 11 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/framework/bunup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ export default defineConfig([
clean: true,
plugins: [copy(["src/components"])],
},
{
entry: "src/client.ts",
format: "esm",
target: "browser",
outDir: "dist",
outFile: "client.js",
},
]);
9 changes: 7 additions & 2 deletions packages/framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./client": {
"import": "./dist/client.js",
"types": "./dist/client.d.ts"
},
"./virtual": {
"types": "./dist/virtual.d.ts"
},
Expand All @@ -26,12 +30,13 @@
"dist"
],
"scripts": {
"build": "bunup"
"build": "bunup",
"test": "bun test"
},
"devDependencies": {
"@types/bun": "latest",
"bunup": "^0.14.20",
"vite": "7.1.11"
"vite": "7.2.6"
},
"peerDependencies": {
"svelte": "^5.39",
Expand Down
17 changes: 17 additions & 0 deletions packages/framework/src/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Browser-safe exports for client-side use
// This module contains only what's needed in the browser to avoid Node.js dependencies

export {
ROUTER_CONTEXT_KEY,
useRouter,
useRoute,
href,
setRouterContext,
} from "./shared/router-utils.js";
export type {
Location,
RouteParams,
Router as RouterInterface,
Route,
RouterContext,
} from "./shared/router-utils.js";
Loading
Loading