Moomoo
Moomoo
DDeno
Created by Moomoo on 9/18/2024 in #help
Child process doesn't exit on .kill()
Yeah I'm just glad I'm just making a little development tool for myself and not something that needs to run in production somewhere. It looks like Deno was actually killing the process I spawned, but not any child processes that spawned in turn, so I need to do that manually. Anyway, thank you for he help 🙂
8 replies
DDeno
Created by Moomoo on 9/18/2024 in #help
Child process doesn't exit on .kill()
Well, I got something working by calling wmic process where ParentProcessId='${pid}' get ProcessId to recursively get all the child process PIDs of the process I want to kill, and killing them all individually. I'm not sure if that's the recommended way of doing it, but it seems to work.
8 replies
DDeno
Created by Moomoo on 9/18/2024 in #help
Child process doesn't exit on .kill()
Ok, so it looks like SIGINT and SIGBREAK are not implemented on Windows, and they're not going to be. I have no idea how we're suppoesd to kill child processes on Windows if the only two signals that are supported aren't actually supported.
8 replies
DDeno
Created by Moomoo on 9/18/2024 in #help
Child process doesn't exit on .kill()
Hm, on SIGBREAK I also get the Invalid signal error.
8 replies
DDeno
Created by Moomoo on 9/18/2024 in #help
Child process doesn't exit on .kill()
Hey, thanks for your response 🙂 .kill() sends SIGTERM by default. I tried SIGKILL to no avail, and when I try SIGINT I get a TypeError: Invalid signal: SIGINT. But I did just spot in lib.deno.ns.d.ts that
On Windows only "SIGINT" (CTRL+C) and "SIGBREAK" (CTRL+Break) are supported.
So I'll give SIGBREAK a shot.
8 replies
DDeno
Created by Phatso on 12/6/2022 in #help
Import from variable path?
You can use dynamic imports: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import const {app, serve} = await import(isSelfHost ? "./selfhost.js" : "./cloudflare.js");
3 replies
DDeno
Created by lucis on 11/18/2022 in #help
Converting Typescript Types to JSON Schema (Props definition)?
This sounds like the same sort of problem that io-ts and morphic-ts attempt to solve, have you looked into those?
8 replies
DDeno
Created by 177177177 on 11/12/2022 in #help
Deno.inspect, how to log class instances with getters
Yeah I don't see the getters either with a simple test case. It might be a bug. Someone opened an issue about it recently: https://github.com/denoland/deno/issues/16408. They closed it, but you could ask them to reopen it, or create a new issue.
10 replies
DDeno
Created by 177177177 on 11/12/2022 in #help
Deno.inspect, how to log class instances with getters
I assume it means you have some circular data structure going on. Have you tried it with a simpler class or object?
10 replies
DDeno
Created by Anthony2be on 11/12/2022 in #help
how to ssr preact (without fresh)
Whoa dude, no need to be an ass about it.
8 replies
DDeno
Created by Anthony2be on 11/12/2022 in #help
how to ssr preact (without fresh)
8 replies
DDeno
Created by beerman on 11/10/2022 in #help
axios gives me a CORS error, fetch doesn't. Why is that?
Maybe you can manually set the Origin header to a value the server will accept, IDK if fetch lets you do that.
64 replies
DDeno
Created by Doctor 🤖 on 11/5/2022 in #help
is it possible to change how tsx bundles to js?
I doubt that's possible. As far as I understand, Deno just uses TypeScript's JSX transformer, which always turns JSX into a function call. I don't think it's possible to add something like a custom Babel transformer to Deno, which is probably what it would take to do what you want.
5 replies
DDeno
Created by KaKi87 on 11/3/2022 in #help
File line operations
I haven't used this myself so I couldn't tell you the details, I'm afraid.
16 replies
DDeno
Created by KaKi87 on 11/3/2022 in #help
File line operations
If you want to avoid reading the whole file, you could use a readable stream to read it in chunks: https://deno.land/api@v1.27.1?s=Deno.FsFile#prop_readable
16 replies
DDeno
Created by dan.the.discloser on 10/23/2022 in #help
Function Location
Typescript probably won't like it though
5 replies