tmcw
tmcw
DDeno
Created by tmcw on 12/13/2023 in #help
Is there a way to get a server's SSL certificate's public information with Deno?
This is available in Node with getPeerCertificate() but not in Deno's Node compatibility layer - is there an equivalent I'm missing?
2 replies
DDeno
Created by tmcw on 10/4/2023 in #help
Is it possible to use Cache-Control headers to control Deno's cache
I've seen via an issue ( https://github.com/denoland/deno/issues/16296 ) that Deno stores its metadata.json files in its cache directory so that it has response headers from when the dependency was downloaded, for cache invalidation. Is there cache invalidation based on these headers? Like if I have a dependency via HTTP that has Cache-Control: no-cache, can it be re-downloaded each time it's requested?
3 replies
DDeno
Created by tmcw on 9/29/2023 in #help
Is there a schedule / pattern for which Deno releases get new Docker files?
We'd love to update to Deno 1.37.1 in production, but deno_docker is still at 1.37.0. I've noticed that sometimes there are releases that don't get cut in Docker files until well after Deno's updated. Is there a process / guideline to which versions become Docker images? https://github.com/denoland/deno_docker
2 replies
DDeno
Created by tmcw on 9/12/2023 in #help
Is there any way to get Deno to not statically analyze import()?
I understand that statically analyzing and fetching dynamic import() calls is a good thing for performance, but it's making my usecase impossible - I want to import user code, which may crash, and to handle the error if it, say, throws an error on import. I can do this with browser import(). I can do it with Node. I can't do it with Deno: you basically can't use import statements like you'd expect to if you read the MDN page, which seems like a major move away from this being web-standardsy and also makes dynamic import way less useful. Is there a way to actually dynamically load code, at runtime, that I'm missing?
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?
I'm testing out connecting to a Deno process via the v8 inspector protocol: https://deno.land/manual@v1.36.2/basics/debugging_your_code and discovering that though it seems to work with Chrome and certain other tools, trying it with chrome-remote-interface https://github.com/cyrus-and/chrome-remote-interface says that it doesn't expose an endpoint at /json/protocol. I've tried Node, and it does expose an endpoint there and list its capabilities with JSON. Is this not part of the v8 protocol but something else? Maybe this is something Deno hasn't implemented?
4 replies
DDeno
Created by tmcw on 4/21/2023 in #help
Can I pre-cache dependencies that I specify using npm:?
Hi! Trying to figure out the right way to combine Deno's module support to make our deploys consistent. In particular, I was using esm.sh URLs, but just hit some CDN errors so that made me switch to npm: in hopes of it being more reliable. But afaict deno vendor doesn't vendor npm dependencies? What's the right combination of things to do to deploy reliably?
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
This is pretty hard to google because the number at the end of the error changes everytime it happens, but basically: is this a known issue? I'll run some code (in a worker, using dynamic import pointing to npm: or a CDN and get ReferenceError: __DENO_NODE_GLOBAL_… on the first and sometimes second run, but after that it'll work.
12 replies
DDeno
Created by tmcw on 3/14/2023 in #help
Is it possible to know what version of a dynamically-imported module was just imported?
Right now, you can run code like import('npm:lodash'), which will get the latest version of lodash. Is it possible to know what version of lodash that resolved to, in the runtime or elsewhere? I suspect that it writes to an import map if there is one?
3 replies
DDeno
Created by tmcw on 3/13/2023 in #help
Should we, or how should we, use Deno as a sandbox for untrusted code?
I've been using Deno in this context because of some of the nice security model features. However, it's been tricky hitting snags with the model. For example, user's code runs in a WebWorker and has a specific environment with limited access to APIs. But there's no permission to enable/disable the creation of new Worker objects, so people can create a worker in the worker that has access to raw APIs. Is there a right way to do this?
29 replies