Skip to content

Commit

Permalink
BETA release post. (#2108)
Browse files Browse the repository at this point in the history
https://deploy-preview-2108--electric-next.netlify.app/blog/2024/12/09/electric-beta-release

---------

Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
Co-authored-by: Valter Balegas <balegas@electric-sql.com>
Co-authored-by: msfstef <msfstef@gmail.com>
Co-authored-by: Garry Hill <garry@electric-sql.com>
Co-authored-by: Sam Willis <sam.willis@gmail.com>
  • Loading branch information
6 people authored Dec 10, 2024
1 parent e267c28 commit ade15b9
Show file tree
Hide file tree
Showing 182 changed files with 1,979 additions and 213 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-snails-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@electric-sql/client": patch
---

Expose `shape.stream` as public readonly property.
7 changes: 7 additions & 0 deletions .changeset/modern-poets-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@electric-sql/client": patch
---

Use "get" instead of "has" for checking searchParams

Not all implementations of JS have the has(name, value) syntax e.g. Expo.
5 changes: 5 additions & 0 deletions .changeset/tender-seas-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@electric-sql/react": patch
---

Expose `stream` in the useShape result data. This allows React components to easily access the stream to match on.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@electric-examples/bash-client",
"name": "@electric-examples/bash",
"version": "0.0.1",
"private": true,
"author": "ElectricSQL",
Expand Down
2 changes: 1 addition & 1 deletion examples/encryption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/basic-example
cd examples/encryption
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
4 changes: 2 additions & 2 deletions examples/encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=basic-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=basic-example pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=encryption-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=encryption-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "concurrently \"vite\" \"node backend/api.js\"",
"build": "vite build",
Expand Down
2 changes: 1 addition & 1 deletion examples/gatekeeper-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Electric - Gatekeeper auth example

This example demonstrates a number of ways of implementing the [gatekeeper auth](https://electric-sql.com/docs/guides/auth#gatekeeper-auth) pattern for [securing access](https://electric-sql.com/docs/guides/auth) to the [Electric sync service](https://electric-sql.com/product/sync).
This example demonstrates a number of ways of implementing the [gatekeeper auth](https://electric-sql.com/docs/guides/auth#gatekeeper-auth) pattern for [securing access](https://electric-sql.com/docs/guides/auth) to the [Electric sync service](https://electric-sql.com/product/electric).

It includes:

Expand Down
28 changes: 0 additions & 28 deletions examples/nextjs-example/.sst/platform/config.d.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/nextjs-example
cd examples/nextjs
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "@electric-examples/nextjs-example",
"name": "@electric-examples/nextjs",
"private": true,
"version": "0.0.1",
"author": "ElectricSQL",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=nextjs-basic-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=nextjs-basic-example pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=nextjs-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=nextjs-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "next dev --turbo -p 5173",
"build": "next build",
"start": "next start",
"format": "eslint . --fix",
"stylecheck": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"typecheck": "tsc --noEmit"
},
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/proxy-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Electric - Proxy auth example

This example implements the [proxy auth](https://electric-sql.com/docs/guides/auth#gatekeeper-auth) pattern for [securing access](https://electric-sql.com/docs/guides/auth) to the [Electric sync service](https://electric-sql.com/product/sync).
This example implements the [proxy auth](https://electric-sql.com/docs/guides/auth#gatekeeper-auth) pattern for [securing access](https://electric-sql.com/docs/guides/auth) to the [Electric sync service](https://electric-sql.com/product/electric).

It demonstrates how an API can proxy and authorise shape requests, by either:

Expand Down
4 changes: 2 additions & 2 deletions examples/proxy-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=proxy-auth pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=proxy-auth pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=proxy-auth-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=proxy-auth-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "next dev --turbo -p 5173",
"start": "next start",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/basic-example
cd examples/react
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@electric-examples/basic-example",
"name": "@electric-examples/react",
"private": true,
"version": "0.0.1",
"author": "ElectricSQL",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=basic-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=basic-example pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=react-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=react-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "vite",
"build": "vite build",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/redis-sync/README.md → examples/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/redis-sync
cd examples/redis
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@electric-examples/redis-sync",
"name": "@electric-examples/redis",
"version": "0.0.1",
"description": "An example Redis client for ElectricSQL",
"main": "dist/index.js",
Expand All @@ -10,8 +10,8 @@
"private": true,
"scripts": {
"dev": "tsx src/index.ts",
"backend:up": "PROJECT_NAME=redis-sync pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=redis-sync pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=redis-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=redis-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"typecheck": "tsc -p tsconfig.json",
"stylecheck": "eslint './*.{ts,js,tsx,jsx}' './tests/**/*.{ts,tsx}' './examples/**/*.{ts,tsx}' --no-error-on-unmatched-pattern"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/remix-basic
cd examples/remix
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@electric-examples/remix-basic",
"name": "@electric-examples/remix",
"private": true,
"version": "0.0.1",
"author": "ElectricSQL",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=remix-basic-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=remix-basic-example pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=remix-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=remix-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "vite",
"build": "vite build",
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pnpm run -r build
Navigate back to this directory:

```shell
cd examples/tanstack-example
cd examples/tanstack
```

Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@electric-examples/tanstack-example",
"name": "@electric-examples/tanstack",
"private": true,
"version": "0.0.1",
"author": "ElectricSQL",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"backend:up": "PROJECT_NAME=tanstack-basic-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=tanstack-basic-example pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=tanstack-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=tanstack-example pnpm -C ../../ run example-backend:down",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "concurrently \"vite\" \"node src/server/app.js\"",
"build": "vite build",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/todo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"url": "git+https://github.com/KyleAMathews/vite-react-router-electric-sql-starter.git"
},
"scripts": {
"backend:up": "PROJECT_NAME=todo-app pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=todo-app pnpm -C ../../ run example-backend:down",
"backend:up": "PROJECT_NAME=todo-app-example pnpm -C ../../ run example-backend:up && pnpm db:migrate",
"backend:down": "PROJECT_NAME=todo-app-example pnpm -C ../../ run example-backend:down",
"build": "vite build",
"db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./db/migrations",
"dev": "dotenv -e .env -- concurrently \"vite\" \"node server.js\"",
Expand Down
2 changes: 1 addition & 1 deletion examples/write-patterns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ https://write-patterns.examples.electric-sql.com

The main code is in the [`./patterns`](./patterns) folder, which has a subfolder for each pattern. There's also some shared code, including an API server and some app boilerplate in [`./shared`](./shared).

All of the patterns use [Electric](https://electric-sql.com/product/sync) for the read-path (i.e.: syncing data from Postgres into the local app) and implement a different approach to the write-path (i.e.: how they handle local writes and get data from the local app back into Postgres).
All of the patterns use [Electric](https://electric-sql.com/product/electric) for the read-path (i.e.: syncing data from Postgres into the local app) and implement a different approach to the write-path (i.e.: how they handle local writes and get data from the local app back into Postgres).

### [1. Online writes](./patterns/1-online-writes)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dotenv-cli": "^7.4.2"
},
"engines": {
"node": "^22.0.0"
"node": "^20.0.0"
},
"packageManager": "pnpm@9.15.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Runtime errors:
See the [typescript client docs on the website](https://electric-sql.com/docs/api/clients/typescript#error-handling) for more details on error handling.
And in general, see the [docs website](https://electric-sql.com) and [examples folder](https://electric-sql.com/examples/basic) for more information.
And in general, see the [docs website](https://electric-sql.com) and [examples](https://electric-sql.com/demos) for more information.
## Develop
Expand Down
Loading

0 comments on commit ade15b9

Please sign in to comment.