This commit is contained in:
Dax Raad 2025-06-19 00:20:03 -04:00
parent 8619c50976
commit 3862184ccb
4 changed files with 17 additions and 6 deletions

View file

@ -5,7 +5,8 @@
"type": "module",
"packageManager": "bun@1.2.14",
"scripts": {
"typecheck": "bun run --filter='*' typecheck"
"typecheck": "bun run --filter='*' typecheck",
"postinstall": "./scripts/hooks"
},
"workspaces": {
"packages": [

View file

@ -1,5 +1,4 @@
import z from "zod"
import path from "path"
import { App } from "../app/app"
import { Config } from "../config/config"
import { mergeDeep, sortBy } from "remeda"
@ -24,7 +23,6 @@ import { ModelsDev } from "./models"
import { NamedError } from "../util/error"
import { Auth } from "../auth"
import { TaskTool } from "../tool/task"
import { Global } from "../global"
export namespace Provider {
const log = Log.create({ service: "provider" })

15
scripts/hooks Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
if [ ! -d ".git" ]; then
exit 0
fi
mkdir -p .git/hooks
cat > .git/hooks/pre-push << 'EOF'
#!/bin/sh
bun run typecheck
EOF
chmod +x .git/hooks/pre-push
echo "✅ Pre-push hook installed"

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
set -e
goreleaser build --clean --snapshot --skip validate