Deno

D

Deno

Chat about Deno, a modern runtime for JavaScript and TypeScript.

Join

Deno.open() question

Does, when the process terminate, deno close the files if they were opened with Deno.open()?

Manually edit existing KV table

Hello! another day, another question. Is there a way to manually edit KV database to modify an entry? ```json...

Looking to deploy Deno Fresh on VPS using port 443

Hello! I have two questions, I used saaskit as a base. However fresh's start function is using serve() and not serveTls(). The problem is I cannot expose on 443 since I can't provide certificate and key as start options. Any advice? Should I write a custom start function? My second question is about continuous deployment: I have setup a gitlab runner on my VPS that handles the process of running on each new commit, but unlike NPM, the deno runtime is "listening" and the pipeline stays in "running" state. Is there any solution to this?...

Trying to use Deno.serve() for an https static hosting

I was trying to setup an simple hello world response in https on my custom domain.

"https://esm.sh/mercadopago@1.5.15" Is not workin on deploy

"https://esm.sh/mercadopago@1.5.15" Is not workin on deno deploy, any clues? it works on local but on prod it hans wen using...

Simulating physics collisions across isolates

A bit tangential to Deno, but since Deploy uses v8 isolates, it seems that a multiplayer online game that involves collision detection and resolution that runs on Deploy would need to do things a bit differently. Wondering if anyone out there has delved into this before and wouldn’t mind sharing their discoveries?

Deno showing node globalThis error

Deno is showing this error:
error: Uncaught ReferenceError: __DENO_NODE_GLOBAL_THIS_0_43_0__ is not defined
at file:///home/ren/coding/frontend/packit/node_modules/@reejs/imports/env.js:1:18
error: Uncaught ReferenceError: __DENO_NODE_GLOBAL_THIS_0_43_0__ is not defined
at file:///home/ren/coding/frontend/packit/node_modules/@reejs/imports/env.js:1:18
...

How to read Chunked request body?

Hello! Is it possible to read a chunked request body using for await? It seems to only read up to the point where the reader is empty and then stop. Since some chunks might only show up after some delay, I need it to read until 'zero-length chunk' is sent, meaning the chunked body is over.

Deno Fresh (Saaskit base) - Impossible to debug error

When I try to access my account by logging in, the web app becomes unusable and I get this error

Possible to deploy the chat example to deno deploy?

I would like to try running this demo on deno deploy: https://deno.com/manual@v1.34.0/examples/chat_app However, I have seen somewhere that deploy doesn't suport websockets. Is this currently the case? Is it possbile to run this with deploy? ...

`dnt` incompatible with `addEventListener`?

I am using the log/mod.ts module from deno_std and running dnt with no special configuration as far as I know, why doesn't this just work? Some Node.js shim missing? ```ts src/deps/deno.land/std@0.189.0/log/handlers.ts:153:5 - error TS2304: Cannot find name 'addEventListener'. ...

Saaskit 0.2.0 - URLPattern error

I followed the README.md but when running deno task start this error pops up (image) How can i fix this?...

Running `deno cache` fails often with internal server errors when importing

Example message ``` error: Import 'https://deno.land/std@0.175.0/path/_constants.ts' failed: 500 Internal Server Error May 29 10:30:08 AM #14 309.3 at https://deno.land/std@0.175.0/path/win32.ts:12:8 May 29 10:30:08 AM ------...

Allow-net not applying to npm: imports ?

Hi, Running the below does not ask me for a permission to access github.com. ``` import axios from "npm:axios"...

How many Web Platform tests should deno be passing?

I wanted to package Deno as RPMs but before I started that, I'm getting very different test results just building from source. Should deno be passing every Web Platform test when its built? CentOS 7 Python 3.11.3 cargo 1.69.0 (6e9a83356 2023-04-12) rustc 1.69.0 (84c898d65 2023-04-16) Deno 1.33.4 - from source...

Deno Deploy with Cloudflare Proxy

Is it possible to use Cloudflare proxy with Deno deploy website? Cloudflare provides countryCode in headers, and I get only ip address with Deno Deploy...

Deno event loop and gui application

Hi, I am trying to write custom gtk library in deno using gtk-rs and deno_runtime. I already have initial rendering of components but i am having trouble understanding how to setup event loop for gui application. Currently i am using tokio's new_current_thread and block_on on deno's execute_main_module but this way setTimeouts don't seem to be executed which I suspect is because there is no event loop. execute_main_module seems to already call run_event_loop but should i just call it in loop or is there a proper way to do it using tokio? and how does event_loop_middleware fit into all this?
The other slightly related question is how do i schedule updates from the button clicks if the click listener closure is setup in the #[op(v8)]? thanks for your help...

Simple type narrowing/type guard/assertion (?)

Is there really no simpler way of doing this without any and without external deps? ```ts export function isFooBarBaz( value: unknown,...