Skip to content

Commit a6ba808

Browse files
chore: Update PowerSync SDK (#47)
* update powersync sdk * update supabase demo
1 parent a9406d7 commit a6ba808

File tree

8 files changed

+43
-30
lines changed

8 files changed

+43
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# PowerSync Self Hosted Example
22

3+
## 2025-01-16
4+
5+
- Updated PowerSync SDK packages in demo application.
6+
- Updated Supabase demo to use JWT secret
7+
38
## 2025-01-10
49

510
- Added demo for using Postgres as the bucket storage.

demos/nodejs/demo-app/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.9.0

demos/nodejs/demo-app/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
"@emotion/react": "^11.11.4",
1313
"@emotion/styled": "^11.11.5",
1414
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
15-
"@powersync/react": "^1.4.2",
16-
"@powersync/web": "^1.11.0",
17-
"@powersync/common": "^1.21.0",
18-
"@journeyapps/wa-sqlite": "^1.0.0",
15+
"@powersync/react": "^1.5.1",
16+
"@powersync/web": "^1.12.1",
17+
"@journeyapps/wa-sqlite": "^1.2.0",
1918
"@mui/icons-material": "^5.15.15",
2019
"@mui/material": "^5.15.12",
2120
"@mui/x-data-grid": "^6.19.6",

demos/nodejs/demo-app/pnpm-lock.yaml

Lines changed: 27 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/supabase/.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Get these after executing `supabase start`
33
SUPABASE_URL=http://localhost:54321
44
SUPABASE_ANON_KEY=
5+
PS_SUPABASE_JWT_SECRET=
56

67
# The Supabase Postgres connection is available in the Supabase network
78
# The Postgres container name is of the form `supabase_db_${project_id}`

demos/supabase/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Start the Supabase project
1818
supabase start
1919
```
2020

21-
Once started the console will contain details for the Supabase services. Apply the `anon key` to the `.env` file.
21+
Once started the console will contain details for the Supabase services. Apply the `anon key` and `JWT secret` to the `.env` file.
2222

2323
Note: Default Supabase projects expose the Postgres DB on a high port number. We currently only support ports in the range of `port >= 1024 && port <= 49151`. This demo configures Postgres on port `5433`.
2424

demos/supabase/config/powersync.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ replication:
1616

1717
# Connection settings for sync bucket storage
1818
storage:
19-
type: postgresql
20-
uri: !env PS_STORAGE_SOURCE_URI
21-
sslmode: disable # 'verify-full' (default) or 'verify-ca' or 'disable'
19+
type: mongodb
20+
uri: !env PS_MONGO_URI
2221

2322
# The port which the PowerSync API server will listen on
2423
port: !env PS_PORT
@@ -30,6 +29,7 @@ sync_rules:
3029
# Client (application end user) authentication settings
3130
client_auth:
3231
supabase: true
32+
supabase_jwt_secret: !env PS_SUPABASE_JWT_SECRET
3333

3434
# JWKS audience
3535
audience: ["powersync-dev", "powersync"]

demos/supabase/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
networks:
1919
- default
2020
- supabase_network_powersync_demo
21+
environment:
22+
PS_SUPABASE_JWT_SECRET: ${PS_SUPABASE_JWT_SECRET}
2123

2224
demo-client:
2325
build:

0 commit comments

Comments
 (0)