177177177
177177177
DDeno
Created by 177177177 on 3/9/2024 in #help
Make an image cropper that crops from data uri
@Deno AI Helper How to make an image cropper that crops to the given dimension
6 replies
DDeno
Created by 177177177 on 3/9/2024 in #help
Make an image cropper that crops from data uri
@Deno AI Helper
6 replies
DDeno
Created by 177177177 on 3/9/2024 in #help
Make an image cropper that crops from data uri
@Deno AI Helper
6 replies
DDeno
Created by 177177177 on 12/10/2023 in #help
How to override type definitions provided by a third party module
Can you implement WebSocketStream by using WebSocket and TransformStream ?
8 replies
DDeno
Created by 177177177 on 12/10/2023 in #help
How to override type definitions provided by a third party module
How do I override type definitions provided by a third party module
8 replies
DDeno
Created by 177177177 on 12/7/2023 in #help
Can you make a fresh route detect, if it is being requested by `deno run`
Can you make a fresh route detect, if it is being requested by deno run like deno run https://localhost:3000/api/test
8 replies
DDeno
Created by 177177177 on 12/7/2023 in #help
Can you make a fresh route detect, if it is being requested by `deno run`
@Deno AI Helper
8 replies
DDeno
Created by 177177177 on 12/3/2023 in #help
Relative path in WebSocket
<:party_deno:1035517691517218847>
6 replies
DDeno
Created by 177177177 on 12/3/2023 in #help
Relative path in WebSocket
Oh tyvm
6 replies
DDeno
Created by 177177177 on 12/3/2023 in #help
Relative path in WebSocket
@Deno AI Helper
6 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
ReadableStream passed to an island component argument becomes an empty object
Is it because I'm passing functions and WebSocet connections from the server to the browser?
16 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
ReadableStream passed to an island component argument becomes an empty object
console.log('message recived') gets logged in vs code console but not in the browser console, and console.log(conn) too gets logged in vs code console as expected but gets logged as an empty object in the browser console. And in the browser console it also throws Uncaught TypeError: Cannot read properties of undefined (reading 'then')
// islands/Gateway.tsx

/// <reference lib='deno.unstable' />

import type { FunctionComponent } from 'preact'
import type { Signal } from '@preact/signals'

export const Gateway: FunctionComponent<{
conn: Promise<{
readable: ReadableStream<string | Uint8Array>
writable: WritableStream<string | Uint8Array>
extensions: string
protocol: string
}>
message: Signal<string>
}> = ({ conn, message }) => {
console.log(conn) // gets logged in vs code console as expected but gets logged as an empty object in the browser console

conn.then(({ readable }) => { // error, only shown in browser console, Uncaught TypeError: Cannot read properties of undefined (reading 'then')
readable.getReader().read().then((msg) => {
message.value = msg.value as string
console.log('message recieved')
})
})

return (
<div class='max-w-screen-md mx-auto flex flex-col items-center justify-center'>
<div class='flex gap-8 py-6'>
<button>{message}</button>
</div>
</div>
)
}
// islands/Gateway.tsx

/// <reference lib='deno.unstable' />

import type { FunctionComponent } from 'preact'
import type { Signal } from '@preact/signals'

export const Gateway: FunctionComponent<{
conn: Promise<{
readable: ReadableStream<string | Uint8Array>
writable: WritableStream<string | Uint8Array>
extensions: string
protocol: string
}>
message: Signal<string>
}> = ({ conn, message }) => {
console.log(conn) // gets logged in vs code console as expected but gets logged as an empty object in the browser console

conn.then(({ readable }) => { // error, only shown in browser console, Uncaught TypeError: Cannot read properties of undefined (reading 'then')
readable.getReader().read().then((msg) => {
message.value = msg.value as string
console.log('message recieved')
})
})

return (
<div class='max-w-screen-md mx-auto flex flex-col items-center justify-center'>
<div class='flex gap-8 py-6'>
<button>{message}</button>
</div>
</div>
)
}
16 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
ReadableStream passed to an island component argument becomes an empty object
But conn is not recognized as a promise as it gets logged as a Promise {} object in the vs code console as expected but gets logged as an empty object in the browser console.
16 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
ReadableStream passed to an island component argument becomes an empty object
@Deno AI Helper
16 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
Signal value not updating from inside of `for await of` loop inside of an IIFE
I can't use useState hook because the code is in a route and not in an island.
11 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
Signal value not updating from inside of `for await of` loop inside of an IIFE
useSignals hook is from @preact/signals
11 replies
DDeno
Created by 177177177 on 12/2/2023 in #help
Signal value not updating from inside of `for await of` loop inside of an IIFE
How can I manually trigger a re-render?
11 replies
DDeno
Created by 177177177 on 5/18/2023 in #help
Error when using readline.question()
peepoheart
5 replies
DDeno
Created by 177177177 on 5/18/2023 in #help
Error when using readline.question()
ooh, please tell me ty MelWow
5 replies
DDeno
Created by 177177177 on 1/29/2023 in #help
Deno fmt conflicting with Deno lint, when using IIFE
yes ok
6 replies