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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,35 @@ jobs:
run: pnpm exec tsc --noEmit -p tsconfig.lambda.json
working-directory: templates/snippets

# Generates a real project per target with setup-project.sh and type-checks
# it. Unlike typecheck-templates this has no lockfile on purpose: it installs
# whatever `pnpm add` resolves today, so a dependency release that breaks
# freshly generated projects (e.g. the TypeScript 6 @types auto-include
# removal, #119) fails here instead of only on user machines.
generated-projects:
name: Generate & Type-check (${{ matrix.platform }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
platform: [cloudflare, node, lambda, railway, fly]
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 22

- run: corepack enable

- name: Generate project
run: ./scripts/setup-project.sh demo-${{ matrix.platform }} --${{ matrix.platform }}

- name: Type-check generated project
run: pnpm typecheck
working-directory: demo-${{ matrix.platform }}/api

check-links:
name: Check Markdown Links
runs-on: ubuntu-latest
Expand Down
23 changes: 18 additions & 5 deletions scripts/setup-project.sh
100644 → 100755

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

2 changes: 1 addition & 1 deletion templates/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

# Copy source code
COPY tsconfig.json drizzle.config.ts ./
COPY tsconfig.json tsconfig.base.json drizzle.config.ts ./
COPY src/ ./src/

# Build the application
Expand Down
2 changes: 1 addition & 1 deletion templates/node-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

# Copy source code
COPY tsconfig.json drizzle.config.ts ./
COPY tsconfig.json tsconfig.base.json drizzle.config.ts ./
COPY src/ ./src/

# Build the application
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions templates/shared/tsconfig.cloudflare.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"types": [
"@cloudflare/workers-types",
"node"
]
}
}
8 changes: 8 additions & 0 deletions templates/shared/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"types": [
"node"
]
}
}
3 changes: 1 addition & 2 deletions templates/snippets/tsconfig.cloudflare.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../shared/tsconfig.json",
"extends": "../shared/tsconfig.cloudflare.json",
"compilerOptions": {
"noEmit": true,
"moduleResolution": "bundler",
"types": ["@cloudflare/workers-types", "node"],
"rootDir": ".",
"rootDirs": ["shared/src", "cloudflare/src"],
"paths": {}
Expand Down
3 changes: 1 addition & 2 deletions templates/snippets/tsconfig.lambda.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../shared/tsconfig.json",
"extends": "../shared/tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"moduleResolution": "bundler",
"types": ["node"],
"rootDir": ".",
"rootDirs": ["shared/src", "aws-lambda/src"],
"paths": {}
Expand Down
3 changes: 1 addition & 2 deletions templates/snippets/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../shared/tsconfig.json",
"extends": "../shared/tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"moduleResolution": "bundler",
"types": ["node"],
"rootDir": ".",
"rootDirs": ["shared/src", "node/src"],
"paths": {}
Expand Down
Loading