Skip to content

Commit 5926ed6

Browse files
committed
Initial Commit
1 parent 68b0d70 commit 5926ed6

Some content is hidden

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

99 files changed

+6425
-2006
lines changed

.github/renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended", ":disableDependencyDashboard"]
4+
}

.github/workflows/backend.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Backend Build and Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v6
16+
17+
- name: cd to backend
18+
run: cd apps/backend
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: clippy, rustfmt
24+
25+
- name: Rust Cache
26+
uses: Swatinem/rust-cache@v2
27+
28+
- name: Check formatting
29+
run: cargo fmt -- --check
30+
31+
- name: Run clippy
32+
run: cargo clippy -- -D warnings
33+
34+
- name: Run tests
35+
run: cargo test

.github/workflows/biome.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Biome Checks
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
biome:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
steps:
12+
- name: Setup Bun
13+
uses: oven-sh/setup-bun@v2
14+
with:
15+
bun-version: latest
16+
- name: Checkout
17+
uses: actions/checkout@v6
18+
with:
19+
persist-credentials: false
20+
- name: Setup Biome
21+
uses: biomejs/setup-biome@v2
22+
with:
23+
version: latest
24+
- name: Run Biome
25+
run: biome ci .

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-start:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
- uses: oven-sh/setup-bun@v2
15+
with:
16+
bun-version: latest
17+
- uses: actions/cache@v5
18+
with:
19+
key: bun-install-${{ runner.os }}-${{ hashFiles('bun.lock') }}
20+
path: ~/.bun/install/cache
21+
- run: bun install
22+
- run: bun run build
23+
24+
typecheck:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: oven-sh/setup-bun@v2
29+
with:
30+
bun-version: latest
31+
- uses: actions/cache@v5
32+
with:
33+
key: bun-install-${{ runner.os }}-${{ hashFiles('bun.lock') }}
34+
path: ~/.bun/install/cache
35+
- run: bun install
36+
- run: bun turbo run typecheck

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: latest
18+
- run: bun install
19+
- run: bun test

.gitignore

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
31
# Dependencies
42
node_modules
5-
.pnp
6-
.pnp.js
73

84
# Local env files
95
.env
106
.env.local
11-
.env.development.local
12-
.env.test.local
13-
.env.production.local
7+
.env.*.local
148

159
# Testing
1610
coverage
1711

1812
# Turbo
1913
.turbo
2014

21-
# Vercel
22-
.vercel
23-
24-
# Build Outputs
25-
.next/
15+
# Build outputs
2616
out/
27-
build
2817
dist
18+
target/
2919

20+
# Cargo
21+
.cargo-local/
3022

3123
# Debug
32-
npm-debug.log*
33-
yarn-debug.log*
34-
yarn-error.log*
24+
*.log
3525

3626
# Misc
3727
.DS_Store
3828
*.pem
29+

README.md

Lines changed: 19 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,31 @@
1-
# Turborepo starter
1+
# Sourcemaps
22

3-
This Turborepo starter is maintained by the Turborepo core team.
3+
A monorepo for sourcemap upload infrastructure.
44

5-
## Using this example
5+
## Structure
66

7-
Run the following command:
7+
- **`apps/backend`** — Rust (Axum) API server that ingests sourcemap uploads
8+
- **`packages/bundler-plugin`** — Universal unplugin adapter set (Vite, Rollup, Rolldown, Webpack, Rspack, esbuild, Unloader, Farm, Bun) that uploads sourcemaps after builds
89

9-
```sh
10-
npx create-turbo@latest
11-
```
12-
13-
## What's inside?
14-
15-
This Turborepo includes the following packages/apps:
16-
17-
### Apps and Packages
18-
19-
- `docs`: a [Next.js](https://nextjs.org/) app
20-
- `web`: another [Next.js](https://nextjs.org/) app
21-
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications
22-
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
23-
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
24-
25-
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
26-
27-
### Utilities
28-
29-
This Turborepo has some additional tools already setup for you:
30-
31-
- [TypeScript](https://www.typescriptlang.org/) for static type checking
32-
- [ESLint](https://eslint.org/) for code linting
33-
- [Prettier](https://prettier.io) for code formatting
34-
35-
### Build
36-
37-
To build all apps and packages, run the following command:
38-
39-
```
40-
cd my-turborepo
41-
42-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
43-
turbo build
44-
45-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
46-
npx turbo build
47-
yarn dlx turbo build
48-
pnpm exec turbo build
49-
```
50-
51-
You can build a specific package by using a [filter](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters):
52-
53-
```
54-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
55-
turbo build --filter=docs
56-
57-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
58-
npx turbo build --filter=docs
59-
yarn exec turbo build --filter=docs
60-
pnpm exec turbo build --filter=docs
61-
```
62-
63-
### Develop
64-
65-
To develop all apps and packages, run the following command:
66-
67-
```
68-
cd my-turborepo
69-
70-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
71-
turbo dev
72-
73-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
74-
npx turbo dev
75-
yarn exec turbo dev
76-
pnpm exec turbo dev
77-
```
78-
79-
You can develop a specific package by using a [filter](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters):
80-
81-
```
82-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
83-
turbo dev --filter=web
84-
85-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
86-
npx turbo dev --filter=web
87-
yarn exec turbo dev --filter=web
88-
pnpm exec turbo dev --filter=web
89-
```
90-
91-
### Remote Caching
92-
93-
> [!TIP]
94-
> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache).
95-
96-
Turborepo can use a technique known as [Remote Caching](https://turborepo.dev/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
97-
98-
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands:
10+
## Development
9911

12+
```sh
13+
bun install # install JS dependencies
14+
bun run dev # start all packages in dev mode
15+
bun run build # build all packages
16+
bun run check-types # type-check all packages
10017
```
101-
cd my-turborepo
10218

103-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
104-
turbo login
19+
### Backend
10520

106-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
107-
npx turbo login
108-
yarn exec turbo login
109-
pnpm exec turbo login
21+
```sh
22+
cd apps/backend
23+
cargo run # start the API server on :3000
11024
```
11125

112-
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
113-
114-
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
26+
### Bundler plugin tests
11527

28+
```sh
29+
cd packages/bundler-plugin
30+
bun run test
11631
```
117-
# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended)
118-
turbo link
119-
120-
# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager
121-
npx turbo link
122-
yarn exec turbo link
123-
pnpm exec turbo link
124-
```
125-
126-
## Useful Links
127-
128-
Learn more about the power of Turborepo:
129-
130-
- [Tasks](https://turborepo.dev/docs/crafting-your-repository/running-tasks)
131-
- [Caching](https://turborepo.dev/docs/crafting-your-repository/caching)
132-
- [Remote Caching](https://turborepo.dev/docs/core-concepts/remote-caching)
133-
- [Filtering](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters)
134-
- [Configuration Options](https://turborepo.dev/docs/reference/configuration)
135-
- [CLI Usage](https://turborepo.dev/docs/reference/command-line-reference)

apps/backend/.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
DATABASE_URL=postgres://user:password@localhost:5432/sourcemaps
2+
ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
3+
S3_BUCKET=
4+
S3_REGION=
5+
S3_ENDPOINT=
6+
S3_ACCESS_KEY=
7+
S3_SECRET_KEY=
8+
HOST=0.0.0.0
9+
PORT=3000
10+
INTERNAL_HOST=127.0.0.1
11+
INTERNAL_PORT=9485
12+
ADMIN_TOKEN=replace-with-long-random-token

0 commit comments

Comments
 (0)