_Pear
Explore posts from serversHelp with TypeScript namespaces - is this pattern supported?
Hi! I am attempting to model some classes in a Namespace for organization purposes. I would expect this pattern to work, the linter doesn't complain at least, but when I run
deno test
it fails with the error in the README.
Is this not supported in Deno? I tried using triple slash directives as well but no luck.
Thanks!
https://github.com/CobyPear/deno-namespace-reproduction6 replies
DTDrizzle Team
•Created by _Pear on 3/3/2024 in #help
Is it possible to store an array of primary keys for table A on table B using Postgres?
IThis might be more of a Postgres question ,and my research has turned up that the answer is pretty much "No", but I was wondering if anybody has found a way to do this using Drizzle and custom types maybe?
I want to store an array of primary keys in a table. I'm having trouble figuring out the correct way to do this.
I would settle for using the a
json
type as well but that doesn't seem to work either given the type in the column of the reference table needs to be the same as the primary key, in this case uuid
or text
.
Any ideas? Thanks!7 replies
CDCloudflare Developers
•Created by _Pear on 3/3/2024 in #pages-help
Trouble initializing wasm in SvelteKit
I am trying to use some of these
@jsquash
dependencies in a Pages app build with Sveltekit.
I am able to get things building but when initializing the wasm during runtime, I get the following error:
I have searched the discord and seen some answers like "patch the module so it doesn't use credentials", and in this case it seems like vite's load is the thing using credentials
.
Has anybody had success using this or similar modules in SvelteKit on Pages and can give any advice?
I've also tried the instructions here:
https://github.com/jamsinclair/jSquash/blob/main/examples/cloudflare-worker-esm-format/src/index.js
but those didn't work. Ideally I would make this work in SvelteKit itself and not need a separate worker, but that seems to be where this is leading. Thanks!1 replies
CDCloudflare Developers
•Created by _Pear on 2/27/2024 in #workers-help
Error: Handler does not export a fetch() for scheduled worker locally
Hi, I'm a bit confused. I just ran this scheduled worker locally using
wrangler dev
and hit the endpoint the curl command from the docs and it worked fine:
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
I tried again at a later time and got the following error:
I don't understand why it worked then started failing like this. Any suggestions?3 replies
KV list is returning an empty iterator, but data is there and gettable via get
Hello. To simplify things, I am setting a key of
["accounts", account.name]
but when I try to get the accounts with kv.list({ prefix: ["accounts"] })
, I always get an empty iterator back. I am able to see the record exist when using kv.get()
.
Here are the relevant snippets; what am I doing wrong, or is this a bug?:
6 replies