Deno

D

Deno

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

Join

Deno debugging configuration is missing?

```json "deno.enable": true, "deno.unstable": true, "deno.enablePaths": ["./api"], "deno.documentPreloadLimit": 3000,...
No description

Is there a way to show permissions used on start up during runtime?

For example: If I was to run an App with permissions: --allow-net=${hostname}:${port} is there a way to console log this during runtime?

restrict path applied for import maps

hi, is it possible to restrict importmap application to only specific path? the rationale is: - vscode_deno doesn't support multiple deno.json per workspaces: https://github.com/denoland/vscode_deno/issues/701 - one needs to be published as a npm/deno library and the other is backend server, so library shouldn't be able to use import map feels very xy problem, but i wasn't able to figure a better way. has anyone met similar problem? should i ditch importmap alltogether? thanks in advance....
No description

Best way to pass backend data to SSR rendered view?

Looking for the "proper" way to pass data to an SSR rendered view. My first idea is setting custom properties on the window object. Is there any standard? I use Oak as a backend ...

Import map

Hi I have this in deno.json:
"imports": {
"./app.controller": "./app.controller.ts",
"imports": {
"./app.controller": "./app.controller.ts",
...

What should I specify to pass a "char *" in Deno.dlopen?

For example, this is how you would use it in Python: ```python import ctypes lib = ctypes.cdll.LoadLibrary('example.dll')...

Override NPM package dependency

Relating to my question yesterday (https://canary.discord.com/channels/684898665143206084/1137532072639070268), I've gone ahead and made some changes to the problem library in my own fork. How can I override @supabase/supabase-js's dependency of @supabase/gotrue-js with my own fork? I've seen import maps and scopes, however they're confusing and I have no idea what I'm doing hah....

VS Code's debugger terminates before finished

I notice that occasionally the debugger terminates at the middle of the running, or at least doesn't print out the rest of the log. It happens even with breakpoint. Is there any reason for this?

I need some guidance regarding interprocess communication with Deno

What are good cross-platform (Windows, Linux) options for interprocess communication / data sharing between a Deno runtime running untrusted code, and another process that is trusted (both are running on the same host)? I recognize there are always risks associated with this, and I don't expect to achieve perfect security; I just don't want to take an approach that is absurdly insecure. Besides security, performance and ease of use are concerns; it would be preferable to not have to create my own protocol, for instance....

What is the Deno class?

What is Deno in Deno.cwd() ? Can someone link me to documentation? Why doesn't the Deno class need to be imported?

GetIP + Ctx from middleware to a route not passed

Hi, I have test to retrieve IP visitor Code taken from Discord is always returning "localhost" (when Deno Deploy) ...

error: No config file found in VS Code

I'm new in Deno and in coding, and need help with the following issue. I have installed Deno through VS Code terminal and when I'm trying to run deno start task getting error: No config file found, also when trying to run deno run --allow-net --allow-read ./src/index.ts getting error: Module not found "file:///C:/Users/User/Documents/VS%20Code%20Projects/src/index.ts" message. RN I'm in the process of learning Google Analytics 4 and I'm trying to run local web server according to https:/...

Declaration merging for external packages

Hi! I'm using unoCSS with Deno Fresh and have been attempting to use the attributify preset (https://unocss.dev/presets/attributify#preact). However for the type inference to work this preset requires to override preact's JSXInternal namespace declaration (which I think is quite a popular pattern with frontend / fullstack frameworks) and I can't quite get how to do it in Deno (and if it's even possible). Tl;DR How can one do the following in Deno?...

Deno.serve AbortController onError. How?

When I run my new Deno.serve() updated implementation I get a type error. Perhaps I'm doing it wrong. Maybe it is the way I am trying to use the Abort Controller or maybe the onError handler must always return something? ```ts // You can stop the server with an AbortSignal. // The abort signal needs to be passed as the signal option in the options bag....

LocalStorage Override

I'm using a library (@supabase/supabase-js), and I'm compiling my Deno app into an executable, however when I run it I get: error: Uncaught NotSupported: LocalStorage is not supported in this context. The weird thing, is that I have a custom storage adapter for Supabase (using SQLite more or less) however I'm still getting this issue. My question is, is it possible to override the localStorage usage in a third-party library so I can use this executable?...

Bad implementation of X25519?

I can't generate a shared secret with the current implementation of X25519 ```ts const alice = await crypto.subtle.generateKey({ name: "X25519" }, true, [ "deriveKey",...

Resize image/convert on upload

Hi there, I want to store images uploaded in webp format at 200x200px. Has anyone done something like this before? The only package I could find was last updated like 3+ years ago....

I cant import the Zustand module from deno.

I leave a photo of what it shows when I put the url to the import map. And try to cache the module.

Sub hosting SAAS app

What technologies are behind the Deno Deploy feature, where you can set up your own domain name? I have an application like the person in this post, but I'd like to avoid using Cloudflare for SaaS. https://discord.com/channels/684898665143206084/1055576938233733251...
No description

What should my entry point be on Deno Deploy?

Only ever used firebase before. I'm getting a 502 bad gateway error when deploying my website.