Skip to content

Commit 79ea304

Browse files
committed
Merge branch 'main' into image-upload
2 parents c5daeaf + aa5e1ec commit 79ea304

File tree

338 files changed

+13323
-5551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+13323
-5551
lines changed

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
# TODO: Enable lint job after applying lint fixes and setting appropriate warning limits
10+
# Will be handled in follow-up PR to avoid blocking CI setup / bloating this PR
11+
# lint:
12+
# name: Lint
13+
# runs-on: ubuntu-latest
14+
15+
# steps:
16+
# - uses: actions/checkout@v4
17+
18+
# - uses: oven-sh/setup-bun@v1
19+
# with:
20+
# bun-version: latest
21+
22+
# - name: Cache dependencies
23+
# uses: actions/cache@v4
24+
# with:
25+
# path: |
26+
# ~/.bun/install/cache
27+
# key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
28+
29+
# - name: Install dependencies
30+
# run: bun install --frozen
31+
32+
# - name: Run linter
33+
# run: bun lint
34+
35+
typecheck:
36+
name: Typecheck
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- uses: oven-sh/setup-bun@v1
43+
with:
44+
bun-version: latest
45+
46+
- name: Cache dependencies
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.bun/install/cache
51+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
52+
53+
- name: Install dependencies
54+
run: bun install --frozen
55+
56+
- name: Run type checking
57+
run: bun typecheck
58+
59+
test:
60+
name: Unit Test
61+
runs-on: ubuntu-latest
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- uses: oven-sh/setup-bun@v1
67+
with:
68+
bun-version: latest
69+
70+
- name: Cache dependencies
71+
uses: actions/cache@v4
72+
with:
73+
path: |
74+
~/.bun/install/cache
75+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
76+
77+
- name: Install dependencies
78+
run: bun install --frozen
79+
80+
- name: Run tests
81+
run: bun test --timeout 30000 --coverage

.github/workflows/unit-test.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env sh
2-
bun run format && git add .
2+
# bun run format && git add .
33
# bun run lint && bun run format:write && git add .

.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

apps/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"peerDependencies": {
1919
"typescript": "^5.0.0"
2020
}
21-
}
21+
}

apps/web/client/.env.example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
# Supabase - Enables our backend such as database and auth
44
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
55
NEXT_PUBLIC_SUPABASE_ANON_KEY="<Fill in from content after running supabase start>"
6-
7-
# Drizzle - Our ORM for accessing the database
86
SUPABASE_DATABASE_URL=postgresql://postgres:[email protected]:54322/postgres
7+
SUPABASE_SERVICE_ROLE_KEY="<Your Supabase service role key>"
98

109
# OpenRouter - Enables AI chat. Other providers are optional below
1110
OPENROUTER_API_KEY="<Your api key from https://openrouter.ai/settings/keys>"
1211

1312
# Codesandbox - Used to host user apps. Other providers may be supported in the future. May be optional in the future.
1413
CSB_API_KEY="<Your api key from https://codesandbox.io/t/api>"
15-
1614
# ------------- Optional Keys -------------
1715

1816
# Fast apply model providers to reliably resolve code changes if search replace does not work. We will attempt to use one or the other.

apps/web/client/.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

apps/web/client/eslint.config.js

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,14 @@
1-
import { FlatCompat } from '@eslint/eslintrc';
2-
import tseslint from 'typescript-eslint';
1+
import baseConfig from "@onlook/eslint/base";
2+
import nextjsConfig, { restrictEnvAccess } from "@onlook/eslint/nextjs";
3+
import reactConfig from "@onlook/eslint/react";
34

4-
const compat = new FlatCompat({
5-
baseDirectory: import.meta.dirname,
6-
});
7-
8-
export default tseslint.config(
9-
{
10-
ignores: ['.next'],
11-
},
12-
...compat.extends('next/core-web-vitals'),
13-
{
14-
files: ['**/*.ts', '**/*.tsx'],
15-
extends: [
16-
...tseslint.configs.recommended,
17-
...tseslint.configs.recommendedTypeChecked,
18-
...tseslint.configs.stylisticTypeChecked,
19-
],
20-
rules: {
21-
'@typescript-eslint/array-type': 'off',
22-
'@typescript-eslint/consistent-type-definitions': 'off',
23-
'@typescript-eslint/consistent-type-imports': [
24-
'warn',
25-
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
26-
],
27-
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
28-
'@typescript-eslint/require-await': 'off',
29-
'@typescript-eslint/no-misused-promises': 'warn'
30-
},
31-
},
32-
{
33-
linterOptions: {
34-
reportUnusedDisableDirectives: true,
35-
},
36-
languageOptions: {
37-
parserOptions: {
38-
projectService: true,
39-
},
40-
},
41-
},
42-
);
5+
/** @type {import('typescript-eslint').Config} */
6+
export default [
7+
{
8+
ignores: [".next/**"],
9+
},
10+
...baseConfig,
11+
...reactConfig,
12+
...nextjsConfig,
13+
...restrictEnvAccess,
14+
];

apps/web/client/messages/en.d.json.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ declare const messages: {
4545
"showInExplorer": "Show in Explorer",
4646
"renameProject": "Rename Project",
4747
"deleteProject": "Delete Project",
48+
"cloneProject": "Clone Project",
4849
"cancel": "Cancel",
4950
"delete": "Delete",
5051
"rename": "Rename",
52+
"clone": "Clone",
5153
"goToAllProjects": "Go to all Projects",
5254
"newProject": "New Project",
5355
"blankProject": "Blank Project",
@@ -71,6 +73,12 @@ declare const messages: {
7173
"title": "Rename Project",
7274
"label": "Project Name",
7375
"error": "Project name can't be empty"
76+
},
77+
"clone": {
78+
"title": "Clone Project",
79+
"label": "Project Name",
80+
"placeholder": "Enter name for cloned project",
81+
"error": "Project name can't be empty"
7482
}
7583
},
7684
"prompt": {

apps/web/client/messages/en.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@
4242
"showInExplorer": "Show in Explorer",
4343
"renameProject": "Rename Project",
4444
"deleteProject": "Delete Project",
45+
"cloneProject": "Clone Project",
4546
"cancel": "Cancel",
4647
"delete": "Delete",
4748
"rename": "Rename",
49+
"clone": "Clone",
4850
"goToAllProjects": "Go to all Projects",
4951
"newProject": "New Project",
5052
"blankProject": "Blank Project",
@@ -68,6 +70,12 @@
6870
"title": "Rename Project",
6971
"label": "Project Name",
7072
"error": "Project name can't be empty"
73+
},
74+
"clone": {
75+
"title": "Clone Project",
76+
"label": "Project Name",
77+
"placeholder": "Enter name for cloned project",
78+
"error": "Project name can't be empty"
7179
}
7280
},
7381
"prompt": {

0 commit comments

Comments
 (0)