Skip to content

Commit 507fcc0

Browse files
committed
feat: demo - fix the lint errors
1 parent c7fa440 commit 507fcc0

Some content is hidden

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

47 files changed

+1159
-1080
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- uses: pnpm/action-setup@v4
2626
with:
27-
version: '8.14.1'
27+
version: '10.20.0'
2828

2929
- uses: actions/setup-node@v4
3030
with:

.github/workflows/type-test-health.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: pnpm/action-setup@v2
2525
with:
26-
version: 8
26+
version: 10.20.0
2727

2828
- uses: actions/setup-node@v4
2929
with:

apps/demo/.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"singleQuote": true,
44
"trailingComma": "none",
55
"printWidth": 100,
6-
"plugins": [
7-
"prettier-plugin-svelte"
8-
],
6+
"plugins": ["prettier-plugin-svelte"],
97
"overrides": [
108
{
119
"files": "*.svelte",

apps/demo/DEPLOYMENT.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
### 1. Supabase Projects
1313

1414
Create two Supabase projects:
15+
1516
- **Production**: `pgflow-demo-prod`
1617
- **Preview**: `pgflow-demo-preview`
1718

@@ -68,15 +69,18 @@ pnpm nx deploy:preview demo
6869
Add these secrets to your GitHub repository (Settings → Secrets):
6970

7071
**Supabase (Production):**
72+
7173
- `SUPABASE_ACCESS_TOKEN` - Personal access token from https://supabase.com/dashboard/account/tokens
7274
- `PRODUCTION_PROJECT_ID` - Production project ref
7375
- `PRODUCTION_DB_PASSWORD` - Production database password
7476

7577
**Supabase (Preview):**
78+
7679
- `PREVIEW_PROJECT_ID` - Preview project ref
7780
- `PREVIEW_DB_PASSWORD` - Preview database password
7881

7982
**Cloudflare:**
83+
8084
- `CLOUDFLARE_API_TOKEN` - API token from Cloudflare dashboard
8185
- `CLOUDFLARE_ACCOUNT_ID` - Account ID from Cloudflare dashboard
8286

@@ -96,11 +100,13 @@ For automatic per-PR preview databases:
96100
## Manual Deployments
97101

98102
### Production
103+
99104
```bash
100105
pnpm nx deploy demo
101106
```
102107

103108
### Preview
109+
104110
```bash
105111
# With custom name (using script directly)
106112
cd apps/demo
@@ -117,6 +123,7 @@ pnpm nx deploy:preview demo
117123
```
118124

119125
### Reset Database
126+
120127
```bash
121128
cd apps/demo
122129
supabase link --project-ref <PROJECT_REF>
@@ -126,12 +133,15 @@ supabase db reset --linked
126133
## Troubleshooting
127134

128135
**Edge Functions failing:**
136+
129137
- Check secrets are set: `supabase secrets list`
130138
- Verify you're linked to correct project: `cat supabase/.branches/_current_branch`
131139

132140
**Database out of sync:**
141+
133142
- Run `supabase db reset --linked` to reapply all migrations
134143

135144
**Cloudflare deployment fails:**
145+
136146
- Ensure you're authenticated: `pnpm wrangler whoami`
137147
- Check wrangler.toml routes match your domain

apps/demo/eslint.config.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@ export default defineConfig(
2121
languageOptions: {
2222
globals: { ...globals.browser, ...globals.node }
2323
},
24-
rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
25-
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
26-
"no-undef": 'off' }
24+
rules: {
25+
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
26+
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
27+
'no-undef': 'off'
28+
}
2729
},
2830
{
29-
files: [
30-
'**/*.svelte',
31-
'**/*.svelte.ts',
32-
'**/*.svelte.js'
33-
],
31+
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
3432
languageOptions: {
3533
parserOptions: {
3634
projectService: true,

apps/demo/project.json

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
11
{
2-
"name": "demo",
3-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4-
"projectType": "application",
5-
"sourceRoot": "apps/demo/src",
6-
"targets": {
7-
"dev": {
8-
"executor": "nx:run-commands",
9-
"dependsOn": ["^build"],
10-
"options": {
11-
"command": "vite dev",
12-
"cwd": "apps/demo"
13-
}
14-
},
15-
"dev:remote": {
16-
"executor": "nx:run-commands",
17-
"dependsOn": ["^build"],
18-
"options": {
19-
"command": "vite dev --host 0.0.0.0",
20-
"cwd": "apps/demo"
21-
}
22-
},
23-
"build": {
24-
"executor": "nx:run-commands",
25-
"options": {
26-
"command": "vite build",
27-
"cwd": "apps/demo"
28-
},
29-
"outputs": ["{projectRoot}/.svelte-kit"]
30-
},
31-
"preview": {
32-
"executor": "nx:run-commands",
33-
"options": {
34-
"command": "vite preview",
35-
"cwd": "apps/demo"
36-
},
37-
"dependsOn": ["build"]
38-
},
39-
"sync-edge-deps": {
40-
"executor": "nx:run-commands",
41-
"dependsOn": ["core:build", "dsl:build"],
42-
"options": {
43-
"command": "./scripts/sync-edge-deps.sh",
44-
"cwd": "apps/demo"
45-
}
46-
},
47-
"test": {
48-
"executor": "nx:run-commands",
49-
"options": {
50-
"command": "deno test --allow-env --allow-net tests/",
51-
"cwd": "apps/demo/supabase/functions/article_flow_worker"
52-
}
53-
},
54-
"ensure-ci-environment": {
55-
"executor": "nx:run-commands",
56-
"options": {
57-
"command": "node -e \"if (!process.env.CI) throw new Error('This target must run in CI environment')\""
58-
}
59-
},
60-
"deploy": {
61-
"executor": "nx:run-commands",
62-
"cache": false,
63-
"local": true,
64-
"dependsOn": ["build", "ensure-ci-environment"],
65-
"inputs": ["{projectRoot}/wrangler.toml"],
66-
"options": {
67-
"cwd": "apps/demo",
68-
"command": "wrangler deploy --env production"
69-
}
70-
},
71-
"deploy:preview": {
72-
"executor": "nx:run-commands",
73-
"cache": false,
74-
"local": true,
75-
"dependsOn": ["build"],
76-
"inputs": ["{projectRoot}/wrangler.toml"],
77-
"options": {
78-
"cwd": "apps/demo",
79-
"command": "./scripts/deploy-preview.sh ${PREVIEW_NAME:-pr-${PR_NUMBER:-preview}}"
80-
}
81-
}
82-
}
2+
"name": "demo",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"sourceRoot": "apps/demo/src",
6+
"targets": {
7+
"dev": {
8+
"executor": "nx:run-commands",
9+
"dependsOn": ["^build"],
10+
"options": {
11+
"command": "vite dev",
12+
"cwd": "apps/demo"
13+
}
14+
},
15+
"dev:remote": {
16+
"executor": "nx:run-commands",
17+
"dependsOn": ["^build"],
18+
"options": {
19+
"command": "vite dev --host 0.0.0.0",
20+
"cwd": "apps/demo"
21+
}
22+
},
23+
"build": {
24+
"executor": "nx:run-commands",
25+
"options": {
26+
"command": "vite build",
27+
"cwd": "apps/demo"
28+
},
29+
"outputs": ["{projectRoot}/.svelte-kit"]
30+
},
31+
"preview": {
32+
"executor": "nx:run-commands",
33+
"options": {
34+
"command": "vite preview",
35+
"cwd": "apps/demo"
36+
},
37+
"dependsOn": ["build"]
38+
},
39+
"sync-edge-deps": {
40+
"executor": "nx:run-commands",
41+
"dependsOn": ["core:build", "dsl:build"],
42+
"options": {
43+
"command": "./scripts/sync-edge-deps.sh",
44+
"cwd": "apps/demo"
45+
}
46+
},
47+
"test": {
48+
"executor": "nx:run-commands",
49+
"options": {
50+
"command": "deno test --allow-env --allow-net tests/",
51+
"cwd": "apps/demo/supabase/functions/article_flow_worker"
52+
}
53+
},
54+
"ensure-ci-environment": {
55+
"executor": "nx:run-commands",
56+
"options": {
57+
"command": "node -e \"if (!process.env.CI) throw new Error('This target must run in CI environment')\""
58+
}
59+
},
60+
"deploy": {
61+
"executor": "nx:run-commands",
62+
"cache": false,
63+
"local": true,
64+
"dependsOn": ["build", "ensure-ci-environment"],
65+
"inputs": ["{projectRoot}/wrangler.toml"],
66+
"options": {
67+
"cwd": "apps/demo",
68+
"command": "wrangler deploy --env production"
69+
}
70+
},
71+
"deploy:preview": {
72+
"executor": "nx:run-commands",
73+
"cache": false,
74+
"local": true,
75+
"dependsOn": ["build"],
76+
"inputs": ["{projectRoot}/wrangler.toml"],
77+
"options": {
78+
"cwd": "apps/demo",
79+
"command": "./scripts/deploy-preview.sh ${PREVIEW_NAME:-pr-${PR_NUMBER:-preview}}"
80+
}
81+
}
82+
}
8383
}

0 commit comments

Comments
 (0)