Skip to content

Commit

Permalink
build: update electric sync service and typescript client
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 13, 2024
1 parent 9c5cff5 commit e7dcdc4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ services:
retries: 3

electric:
image: "electricsql/electric:${ELECTRIC_TAG:-0.7.7}"
image: "electricsql/electric:${ELECTRIC_TAG:-0.8.1}"
depends_on:
fmtm-db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ services:
retries: 3

electric:
image: "electricsql/electric:${ELECTRIC_TAG:-0.7.7}"
image: "electricsql/electric:${ELECTRIC_TAG:-0.8.1}"
depends_on:
fmtm-db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ services:
retries: 3

electric:
image: "electricsql/electric:${ELECTRIC_TAG:-0.7.7}"
image: "electricsql/electric:${ELECTRIC_TAG:-0.8.1}"
depends_on:
fmtm-db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion nginx/templates/odk.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ server {
# Max upload size 500MB
client_max_body_size 500m;

# Response headers (Access-Control-Allow-Origin set by FastAPI, not required)
# Response headers
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
# For opentelemetry
add_header 'Access-Control-Allow-Headers' 'traceparent,tracestate';
Expand Down
2 changes: 1 addition & 1 deletion nginx/templates/sync.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ server {
# Max upload size 1GB
client_max_body_size 1G;

# Response headers (Access-Control-Allow-Origin set by FastAPI, not required)
# Response headers
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
# For opentelemetry
add_header 'Access-Control-Allow-Headers' 'traceparent,tracestate';
Expand Down
4 changes: 2 additions & 2 deletions src/mapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"vitest": "^2.1.4"
},
"dependencies": {
"@electric-sql/client": "^0.6.5",
"@electric-sql/pglite": "^0.2.12",
"@electric-sql/client": "^0.7.1",
"@electric-sql/pglite": "^0.2.13",
"@hotosm/ui": "0.2.0-b5",
"@tiptap/core": "^2.9.1",
"@tiptap/pm": "^2.9.1",
Expand Down
26 changes: 13 additions & 13 deletions src/mapper/pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/mapper/src/store/entities.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function getEntityStatusStream(projectId: number): ShapeStream | undefined {
return;
}
return new ShapeStream({
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape/odk_entities`,
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape`,
table: 'odk_entities',
where: `project_id=${projectId}`,
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/mapper/src/store/tasks.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function getTaskEventStream(projectId: number): ShapeStream | undefined {
return;
}
return new ShapeStream({
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape/task_events`,
url: `${import.meta.env.VITE_SYNC_URL}/v1/shape`,
table: 'task_events',
where: `project_id=${projectId}`,
});
}
Expand Down

0 comments on commit e7dcdc4

Please sign in to comment.