tmcw
tmcw
Explore posts from servers
DDeno
Created by tmcw on 10/4/2023 in #help
Is it possible to use Cache-Control headers to control Deno's cache
Someday, AI helper, someday you'll be useful
3 replies
DDeno
Created by tmcw on 9/12/2023 in #help
Is there any way to get Deno to not statically analyze import()?
Another issue for another part of this - doesn't seem like "" + works for npm: packages - https://github.com/denoland/deno/issues/20479
8 replies
DDeno
Created by tmcw on 9/12/2023 in #help
Is there any way to get Deno to not statically analyze import()?
that's been a fairly tough one to work with - with val.town at least there are certain dependencies that just break the evaluation server until it restarts, though evaluations are happening in a Worker
8 replies
DDeno
Created by tmcw on 9/12/2023 in #help
Is there any way to get Deno to not statically analyze import()?
there's a bug report i've commented on at https://github.com/denoland/deno/issues/18557 - if you have a dynamic import that points to a module that has a git+ dependency, your import() method is permanently broken
8 replies
DDeno
Created by tmcw on 8/23/2023 in #help
Deno with the --inspect-wait arg doesn't expose /json/protocol - should it?
Providing a hardcoded protocol.json does make chrome-remote-interface work, though it's hard to tell which methods are and aren't supported by Deno without protocol.json
4 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
evaluating untrusted user code - it's basically sandboxing, and the worker is the most inside level of the sandbox
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
it's importing from internals.ts, but that's the only local import the worker has access to (is the intent)
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
Yeah - though to be clear, it's just a file named internals.ts, I think Deno has a file with the same name, it's not that file 😉
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
So worker.ts can't read any files except for what's in internals.ts. Maybe I just need to give it read access to vendor too.
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
So like we have this code:
worker = new Worker(new URL("./worker.ts", import.meta.url).href, {
type: "module",
deno: {
permissions: {
read: ['internals.ts'],
net: true,
},
},
});
worker = new Worker(new URL("./worker.ts", import.meta.url).href, {
type: "module",
deno: {
permissions: {
read: ['internals.ts'],
net: true,
},
},
});
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
Ah, using vendor triggers some different permissions. That's why I wasn't using it. Sorry, this codebase is a little zany - we're using WebWorker's ability to run with reduced permissions, so there's a catch-22 where if I vendor dependencies, then Deno tries to use vendored deps within the WebWorker, which doesn't have --allow-read. Maybe there's a way to exclude stuff from being vendored
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
esm.sh + vendor seems like the way?
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
They all work with Deno just fine, I don't think I need them to run in nodejs mode. I'm really just trying to figure out what's the way to deploy without relying on a CDN being functional
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
for the particular things we're using, they're mostly very niche, hard-to-replicate projects like comlink, superjson, magic-string
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
So esm.sh + vendoring?
21 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
Yes, not a very complicated one but basically we just run Deno in a Docker container on Render
21 replies
DDeno
Created by tmcw on 3/21/2023 in #help
Using dynamic import with npm compatibility gives intermittent error "__DENO_NODE_GLOBAL_THIS_167935
12 replies
DDeno
Created by tmcw on 3/21/2023 in #help
Using dynamic import with npm compatibility gives intermittent error "__DENO_NODE_GLOBAL_THIS_167935
okay i think i found a workaround - if you import something from npm on the top level before you import something from npm in an import, then it works
12 replies
DDeno
Created by tmcw on 3/21/2023 in #help
Using dynamic import with npm compatibility gives intermittent error "__DENO_NODE_GLOBAL_THIS_167935
12 replies
DDeno
Created by tmcw on 3/21/2023 in #help
Using dynamic import with npm compatibility gives intermittent error "__DENO_NODE_GLOBAL_THIS_167935
okay, works for dynamic & static imports - the importing from a data url appears to be the cause
12 replies