captainbuckkets
captainbuckkets
DDeno
Created by captainbuckkets on 5/22/2024 in #help
Removing cookie for basic logout
I seem to be losing my mind. My logout pathway used to work, but now no matter what method I use, the cookie remains and a) the cookie is never removed b) the user can't actually logout as a consequence Here is a simple pathway using both the .88 STD methods, and the Oak library
deleteCookie(response, "token")
cookies.delete("token", "");
await cookies.set("token", "",)

// response.status = 302;
// response.headers.set("Location", "/");
response.redirect("/login")
deleteCookie(response, "token")
cookies.delete("token", "");
await cookies.set("token", "",)

// response.status = 302;
// response.headers.set("Location", "/");
response.redirect("/login")
4 replies
DDeno
Created by captainbuckkets on 10/19/2023 in #help
Installing a deno script
I have a deno script that I've written that takes a single arg. I want to install it so that I can call "tricky" in the same way I call "deno". I did deno install -A -n tricky .\main.js
and it said installed successfully but when I try to call it from the command line like "tricky <script-path>" it says its not recognized Was referencing this to achieve this https://docs.deno.com/runtime/manual/tools/script_installer#:~:text=Deno%20provides%20deno%20install%20to,CLI%20flags%20and%20main%20module.
5 replies
DDeno
Created by captainbuckkets on 1/29/2023 in #help
NPM Import results in Rust panic
Looking to import the Airgram NPM package because I don't want to write it from scratch at this moment. The single line of code I have reads as follows: import { Airgram } from "npm:airgram@5.0.0" Running with -- inspect results in:
Debugger listening on ws://127.0.0.1:9229/ws/a4d746f8-b43c-440e-a2e4-c39bd00f34a9
Visit chrome://inspect to connect to the debugger.

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.29.1
Args: ["C:\\Users\\J\\.deno\\bin\\deno.exe", "run", "-A", "--unstable", "--inspect", ".\\tgscanner.js"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli\napi\js_native_api.rs:1523:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Debugger listening on ws://127.0.0.1:9229/ws/a4d746f8-b43c-440e-a2e4-c39bd00f34a9
Visit chrome://inspect to connect to the debugger.

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.29.1
Args: ["C:\\Users\\J\\.deno\\bin\\deno.exe", "run", "-A", "--unstable", "--inspect", ".\\tgscanner.js"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli\napi\js_native_api.rs:1523:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is there any hope of fixing this?
6 replies
DDeno
Created by captainbuckkets on 12/21/2022 in #help
Deno SDL2 Default Text Render Example (FFI problem w 1.29)
Trying to get the font render example in the Deno SDL2 repo https://github.com/littledivy/deno_sdl2/blob/main/examples/font/font.ts to work but it perpetually complains about a pointer to buffer issue. I've read through the issues that were proposed to fix this solution and tried modifications of my own to solve this issue based on this PR here https://github.com/littledivy/deno_sdl2/pull/58 but the issue still remained in my own modifications. Wondering if anybody has any ideas on how to resolve this as it pertains specifically to FFI problems which I thought would be resolved in Deno 1.29 since that seemed to caused breaking changes. I've already tried the v3 released of SDL2 and it did not resolve the problem either. I have a large and mature project I want to port over to desktop but cannot use this solution until I can draw font. I am not seeking alternative solutions such as Electron :) Error:
Uncaught TypeError: Invalid FFI buffer type, expected null, ArrayBuffer, or ArrayBufferView
const raw = sdl2Font.symbols.TTF_RenderText_Solid(
Uncaught TypeError: Invalid FFI buffer type, expected null, ArrayBuffer, or ArrayBufferView
const raw = sdl2Font.symbols.TTF_RenderText_Solid(
25 replies