Skip to content

Commit

Permalink
Remove unused KV namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Dec 29, 2023
1 parent 49b0096 commit 542d29b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
9 changes: 2 additions & 7 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,10 @@ server.use(
let measurer = new Measurer();

return {
env,
db: ctx.env.DB,
kv: {
cache: ctx.env.cache,
auth: ctx.env.auth,
airtable: ctx.env.airtable,
tutorials: ctx.env.tutorials,
},
kv: { cache: ctx.env.cache, auth: ctx.env.auth },
waitUntil: ctx.executionCtx.waitUntil.bind(ctx.executionCtx),
env,
time: measurer.time.bind(measurer),
};
},
Expand Down
2 changes: 0 additions & 2 deletions types/cloudflare.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

interface RuntimeEnv {
auth: KVNamespace;
airtable: KVNamespace;
tutorials: KVNamespace;
cache: KVNamespace;
DB: D1Database;
DSN?: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion types/sdx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare global {
declare module "@remix-run/server-runtime" {
export interface AppLoadContext {
db: D1Database;
kv: Record<"cache" | "tutorials" | "airtable" | "auth", KVNamespace>;
kv: Record<"cache" | "auth", KVNamespace>;
waitUntil(promise: Promise<unknown>): void;
env: Env;
time: Measurer["time"];
Expand Down
2 changes: 0 additions & 2 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ node_compat = true

kv_namespaces = [
{ binding = "cache", id = "597a3ce0108c42798aeac0044a566e31", preview_id = "cache" },
{ binding = "airtable", id = "7be9035dc2c04b2581e0a85ec1af46bb", preview_id = "airtable@sergiodxa.com" },
{ binding = "auth", id = "fda5fdfe90e74e2b82dd0ccd49346c27", preview_id = "auth@sergiodxa.com" },
{ binding = "tutorials", id = "35d8114ec66b41a3b1fb1723df61282f", preview_id = "tutorials@sergiodxa.com" },
]

[[d1_databases]]
Expand Down

0 comments on commit 542d29b

Please sign in to comment.