Skip to content

Commit

Permalink
Merge pull request #123 from cloudflare/fix-DO-bindings
Browse files Browse the repository at this point in the history
Fix DO bindings and upgrade wrangler
  • Loading branch information
third774 authored Sep 27, 2024
2 parents c7d3e9e + 946b881 commit 2e616ed
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 138 deletions.
198 changes: 98 additions & 100 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"tailwindcss": "^3.4.9",
"typescript": "^5.5.4",
"vitest": "1.5.0",
"wrangler": "^3.78.2"
"wrangler": "^3.78.12"
},
"overrides": {
"msw": {
Expand Down
20 changes: 11 additions & 9 deletions wrangler.development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ compatibility_flags = ["nodejs_compat"]
bucket = "./public"

[[build.upload.rules]]
type = "ESModule"
globs = ["**/*.js"]

kv_namespaces = [
{ binding = "FEEDBACK_STORAGE", id = "acb3952303514551a17b6fe627fb6953", preview_id = "acb3952303514551a17b6fe627fb6953" }
]
durable_objects.bindings = [
{ name = "rooms", class_name = "ChatRoom" },
]
type = "ESModule"
globs = ["**/*.js"]

[[kv_namespaces]]
binding = "FEEDBACK_STORAGE"
id = "acb3952303514551a17b6fe627fb6953"
preview_id = "acb3952303514551a17b6fe627fb6953"

[[durable_objects.bindings]]
name = "rooms"
class_name = "ChatRoom"

[vars]
CALLS_APP_ID = "f0ea263009299383d09d44b9fad5316c"
Expand Down
20 changes: 11 additions & 9 deletions wrangler.production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ compatibility_flags = ["nodejs_compat"]
bucket = "./public"

[[build.upload.rules]]
type = "ESModule"
globs = ["**/*.js"]

kv_namespaces = [
{ binding = "FEEDBACK_STORAGE", id = "301815bba6144355bfda771856ca4614", preview_id = "acb3952303514551a17b6fe627fb6953" }
]
durable_objects.bindings = [
{ name = "rooms", class_name = "ChatRoom" },
]
type = "ESModule"
globs = ["**/*.js"]

[[kv_namespaces]] =
binding = "FEEDBACK_STORAGE"
id = "301815bba6144355bfda771856ca4614"
preview_id = "acb3952303514551a17b6fe627fb6953"

[[durable_objects.bindings]] =
name = "rooms"
class_name = "ChatRoom"

[vars]
CALLS_APP_ID = "700932c6384d6f4ba19838afa3ab93cd"
Expand Down
11 changes: 5 additions & 6 deletions wrangler.public.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ compatibility_flags = ["nodejs_compat"]
bucket = "./public"

[[build.upload.rules]]
type = "ESModule"
globs = ["**/*.js"]
type = "ESModule"
globs = ["**/*.js"]

[vars]
CALLS_APP_ID = "d83fd70c193329ea4f683ffe7b34d056"
TURN_SERVICE_ID = "46711d6c5759085dd70f599f6190ab94"
PUBLIC = "true"

[durable_objects]
bindings = [
{ name = "rooms", class_name = "ChatRoom", script_name = "orange-meets-public" }
]
[[durable_objects.bindings]]
name = "rooms"
class_name = "ChatRoom"

# Indicate that you want the ChatRoom and RateLimiter classes to be callable as Durable Objects.
[[migrations]]
Expand Down
20 changes: 11 additions & 9 deletions wrangler.staging.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ compatibility_flags = ["nodejs_compat"]
bucket = "./public"

[[build.upload.rules]]
type = "ESModule"
globs = ["**/*.js"]

kv_namespaces = [
{ binding = "FEEDBACK_STORAGE", id = "acb3952303514551a17b6fe627fb6953", preview_id = "acb3952303514551a17b6fe627fb6953" }
]
durable_objects.bindings = [
{ name = "rooms", class_name = "ChatRoom" },
]
type = "ESModule"
globs = ["**/*.js"]

[[kv_namespaces]] =
binding = "FEEDBACK_STORAGE"
id = "acb3952303514551a17b6fe627fb6953"
preview_id = "acb3952303514551a17b6fe627fb6953"

[[durable_objects.bindings]] =
name = "rooms"
class_name = "ChatRoom"

[vars]
CALLS_APP_ID = "9effffd0c077c1115c7d285e55593a9a"
Expand Down
7 changes: 3 additions & 4 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ compatibility_flags = ["nodejs_compat"]
[vars]
CALLS_APP_ID = "YOUR_CALLS_SFU_APP_ID_HERE"

[durable_objects]
bindings = [
{ name = "rooms", class_name = "ChatRoom" }
]
[[durable_objects.bindings]]
name = "rooms"
class_name = "ChatRoom"

# Indicate that you want the ChatRoom class to be callable as Durable Objects.
[[migrations]]
Expand Down

0 comments on commit 2e616ed

Please sign in to comment.