Upgrade local dev to use electric beta.15 (#1699)
This commit is contained in:
@@ -10,7 +10,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
|
||||
const client = new RealtimeClient({
|
||||
electricOrigin,
|
||||
keyPrefix: "test:realtime",
|
||||
redis: redis.options,
|
||||
redis: {
|
||||
host: redis.options.host,
|
||||
port: redis.options.port,
|
||||
tlsDisabled: true,
|
||||
},
|
||||
expiryTimeInSeconds: 5,
|
||||
cachedLimitProvider: {
|
||||
async getCachedLimit() {
|
||||
@@ -146,7 +150,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
|
||||
const client = new RealtimeClient({
|
||||
electricOrigin,
|
||||
keyPrefix: "test:realtime",
|
||||
redis: redis.options,
|
||||
redis: {
|
||||
host: redis.options.host,
|
||||
port: redis.options.port,
|
||||
tlsDisabled: true,
|
||||
},
|
||||
expiryTimeInSeconds: 5,
|
||||
cachedLimitProvider: {
|
||||
async getCachedLimit() {
|
||||
@@ -225,7 +233,11 @@ describe.skipIf(process.env.GITHUB_ACTIONS)("RealtimeClient", () => {
|
||||
const client = new RealtimeClient({
|
||||
electricOrigin,
|
||||
keyPrefix: "test:realtime",
|
||||
redis: redis.options,
|
||||
redis: {
|
||||
host: redis.options.host,
|
||||
port: redis.options.port,
|
||||
tlsDisabled: true,
|
||||
},
|
||||
expiryTimeInSeconds: 5,
|
||||
cachedLimitProvider: {
|
||||
async getCachedLimit() {
|
||||
|
||||
@@ -140,7 +140,7 @@ services:
|
||||
# - "REDIS_CLUSTER_CREATOR=yes"
|
||||
|
||||
electric:
|
||||
image: electricsql/electric:1.0.0-beta.1@sha256:2262f6f09caf5fa45f233731af97b84999128170a9529e5f9b9b53642308493f
|
||||
image: electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810
|
||||
restart: always
|
||||
environment:
|
||||
DATABASE_URL: postgresql://postgres:postgres@database:5432/postgres?sslmode=disable
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function createElectricContainer(
|
||||
)}:5432/${postgresContainer.getDatabase()}?sslmode=disable`;
|
||||
|
||||
const container = await new GenericContainer(
|
||||
"electricsql/electric:1.0.0-beta.1@sha256:2262f6f09caf5fa45f233731af97b84999128170a9529e5f9b9b53642308493f"
|
||||
"electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810"
|
||||
)
|
||||
.withExposedPorts(3000)
|
||||
.withNetwork(network)
|
||||
|
||||
@@ -11,19 +11,8 @@ export async function triggerExampleTask() {
|
||||
id: randomUUID(),
|
||||
});
|
||||
|
||||
const publicToken = await auth.createPublicToken({
|
||||
scopes: {
|
||||
read: {
|
||||
runs: [handle.id],
|
||||
},
|
||||
},
|
||||
expirationTime: "2s",
|
||||
});
|
||||
|
||||
console.log("Setting the run JWT in a cookie", publicToken);
|
||||
|
||||
// Set JWT in a secure, HTTP-only cookie
|
||||
cookies().set("run_token", publicToken);
|
||||
cookies().set("run_token", handle.publicAccessToken);
|
||||
|
||||
// Redirect to the details page
|
||||
redirect(`/runs/${handle.id}`);
|
||||
|
||||
Reference in New Issue
Block a user