Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

chore: root monorepo configs

Gener9385b74bcc18
diff --git a/.gitignore b/.gitignore
index 134bc8f28..06c2d1488 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,203 +1,12 @@
-.impeccable.md
-.agents
-.claude
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-lerna-debug.log*
-
-# Diagnostic reports (https://nodejs.org/api/report.html)
-report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-*.lcov
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# Bower dependency directory (https://bower.io/)
-bower_components
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (https://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
node_modules/
-jspm_packages/
-
-# Snowpack dependency directory (https://snowpack.dev/)
-web_modules/
-
-# TypeScript cache
-*.tsbuildinfo
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Optional stylelint cache
-.stylelintcache
-
-# Optional REPL history
-.node_repl_history
-
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variable files
+dist/
+.turbo/
+.wrangler/
.env
.env.*
!.env.example
-
-# parcel-bundler cache (https://parceljs.org/)
-.cache
-.parcel-cache
-
-# Next.js build output
-.next
-out
-
-# Nuxt.js build / generate output
-.nuxt
-dist
-.output
-
-# Gatsby files
-.cache/
-# Comment in the public line in if your project uses Gatsby and not Next.js
-# https://nextjs.org/blog/next-9-1#public-directory-support
-# public
-
-# vuepress build output
-.vuepress/dist
-
-# vuepress v2.x temp and cache directory
-.temp
-.cache
-
-# Sveltekit cache directory
-.svelte-kit/
-
-# vitepress build output
-**/.vitepress/dist
-
-# vitepress cache directory
-**/.vitepress/cache
-
-# Docusaurus cache and generated files
-.docusaurus
-
-# Serverless directories
-.serverless/
-
-# FuseBox cache
-.fusebox/
-
-# DynamoDB Local files
-.dynamodb/
-
-# Firebase cache directory
-.firebase/
-
-# TernJS port file
-.tern-port
-
-# Stores VSCode versions used for testing VSCode extensions
-.vscode-test
-
-# pnpm
-.pnpm-store
-
-# yarn v3
-.pnp.*
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/sdks
-!.yarn/versions
-
-# Vite files
-vite.config.js.timestamp-*
-vite.config.ts.timestamp-*
-.vite/
-
-# If you prefer the allow list template instead of the deny list, see community template:
-# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
-#
-# Binaries for programs and plugins
-*.exe
-*.exe~
-*.dll
-*.so
-*.dylib
-
-# Test binary, built with `go test -c`
-*.test
-
-# Code coverage profiles and other test artifacts
-*.out
-coverage.*
-*.coverprofile
-profile.cov
-
-# Dependency directories (remove the comment below to include it)
-# vendor/
-
-# Go workspace file
-go.work
-go.work.sum
-
-# env file
-.env
-
-# Editor/IDE
-# .idea/
-# .vscode/
-
-# Next.js
.next/
-out/
-
-# OS
+.open-next/
+temp/
.DS_Store
-Thumbs.db
-
-# IDE
-.idea/
-.vscode/
-
-# Environment
-.env
-.env.*
-!.env.example
-
-# Plans (local only)
plans/
-
-# Temp
-temp/
diff --git a/package.json b/package.json
index 7cc4b5f6d..29fdd5bfb 100644
--- a/package.json
+++ b/package.json
@@ -3,12 +3,36 @@
"private": true,
"packageManager": "[email protected]",
"scripts": {
- "test": "vitest run",
- "typecheck": "tsc --noEmit -p src/web/tsconfig.json && tsc --noEmit -p src/cli/tsconfig.json"
+ "build": "turbo run build",
+ "test": "turbo run test",
+ "dev": "turbo run dev --filter='!@alook/cli'",
+ "clean": "rm -rf node_modules src/*/node_modules src/*/dist src/*/.turbo .turbo src/web/.next src/web/.open-next src/*/.wrangler",
+ "clean:builds": "rm -rf src/*/dist src/web/.next src/web/.open-next .turbo src/*/.turbo",
+ "reinstall": "pnpm run clean && pnpm install",
+ "typecheck": "turbo run typecheck",
+ "dev:web": "pnpm --filter @alook/web dev",
+ "dev:cli": "pnpm --filter @alook/cli dev",
+ "dev:email": "pnpm --filter @alook/email-worker dev",
+ "dev:send": "node -e \"const a=process.argv.slice(1);const[f,t,s='Test',b='Hello from dev']=a;if(!f||!t){console.error('Usage: pnpm dev:send <from> <to> [subject] [body]');process.exit(1)}fetch('http://localhost:8788/simulate',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({from:f,to:t,subject:s,body:b})}).then(r=>r.json()).then(console.log).catch(e=>console.error('Email worker not running?',e.message))\"",
+ "test:shared": "pnpm --filter @alook/shared test",
+ "test:cli": "pnpm --filter @alook/cli test",
+ "test:web": "pnpm --filter @alook/web test",
+ "db:migrate": "pnpm --filter @alook/web exec wrangler d1 migrations apply alook-app --local",
+ "db:reset": "rm -rf src/web/.wrangler/state && pnpm run db:migrate",
+ "test:all": "vitest run"
},
"devDependencies": {
- "typescript": "^5.0.0",
- "vitest": "^3.0.0",
- "zod": "^3.25.76"
+ "turbo": "latest",
+ "typescript": "latest",
+ "vitest": "^4.1.3"
+ },
+ "pnpm": {
+ "onlyBuiltDependencies": [
+ "esbuild",
+ "msw",
+ "sharp",
+ "unrs-resolver",
+ "workerd"
+ ]
}
-}
+}
\ No newline at end of file
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 2ddfbd36a..fa1850d25 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,2 +1,6 @@
packages:
- - "src/*"
+ - "src/shared"
+ - "src/cli"
+ - "src/web"
+ - "src/email-worker"
+ - "src/ws-do"
diff --git a/turbo.json b/turbo.json
new file mode 100644
index 000000000..8bdd2d281
--- /dev/null
+++ b/turbo.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://turbo.build/schema.json",
+ "tasks": {
+ "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
+ "test": { "dependsOn": ["^build"] },
+ "typecheck": { "dependsOn": ["^build"] },
+ "dev": { "cache": false, "persistent": true }
+ }
+}
diff --git a/vitest.config.ts b/vitest.config.ts
index 2c4010bb2..02898f513 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -1,16 +1,7 @@
-import { defineConfig } from "vitest/config";
-import path from "path";
+import { defineConfig } from "vitest/config"
export default defineConfig({
test: {
- globals: true,
- environment: "node",
- include: ["src/**/*.test.ts", "src/**/*.spec.ts"],
- exclude: ["**/node_modules/**", "**/*.integration.test.ts"],
+ projects: ["src/shared", "src/web", "src/email-worker"],
},
- resolve: {
- alias: {
- "@": path.resolve(__dirname, "src/web"),
- },
- },
-});
+})
diff --git a/vitest.shared.ts b/vitest.shared.ts
new file mode 100644
index 000000000..d0479bed3
--- /dev/null
+++ b/vitest.shared.ts
@@ -0,0 +1,8 @@
+import { defineConfig } from "vitest/config"
+
+export default defineConfig({
+ test: {
+ globals: true,
+ environment: "node",
+ },
+})