Josh
Josh
DDeno
Created by Zidan on 8/10/2023 in #help
Serving multiple static files to an HTTP request
You could try opening a WebSocket, sending each file at a time and have the user and server notify each other when a file is received / sent, may be too much overhead though
37 replies
DDeno
Created by shultz on 7/29/2023 in #help
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
I don't know if Deno bundling is any good at tree shaking NPM packages
7 replies
DDeno
Created by shultz on 7/29/2023 in #help
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
Because it cached the entire package and all its dependencies. If you only need the type and not the whole package, you can technically copy and paste the class into your project, or copy the entire type definition file and paste it into your project to use
7 replies
DDeno
Created by shultz on 7/29/2023 in #help
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
schema-dts relied on the typescript NPM package, and that package is pretty large. I don't think there's a way to have an NPM package use Deno's TypeScript implementation
7 replies
DDeno
Created by shultz on 7/29/2023 in #help
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
Doesn't seem like a bug to me since the NPM TypeScript package is separate
7 replies
DDeno
Created by Josh on 7/6/2023 in #help
Migrating large Node project to Deno
So many bootstrappers and polyfills
11 replies
DDeno
Created by Josh on 7/6/2023 in #help
Migrating large Node project to Deno
Yeah, and tons of Node features are still unsupported or conflicting so the conversion is a pain
11 replies
DDeno
Created by Josh on 7/6/2023 in #help
Migrating large Node project to Deno
I've made some progress using Denoify and rewriting the rest by hand 😂 had to remove a lot of packages to even get it to run properly. Ty for the help, I guess there will be better solutions in the future for migrating
11 replies
DDeno
Created by Josh on 7/6/2023 in #help
Migrating large Node project to Deno
For an idea of the scope, here's our dependencies:
11 replies
DDeno
Created by Josh on 7/6/2023 in #help
Migrating large Node project to Deno
It's a web game, the source is in TypeScript and we use Gulp to have Webpack and a lot of plugins generate the public pages and scripts
11 replies
DDeno
Created by Josh on 3/14/2023 in #help
Better way to allow downloading of files besides serving entire file
Ended up going the route of public folders
24 replies
DDeno
Created by Josh on 3/14/2023 in #help
Better way to allow downloading of files besides serving entire file
I found a way to pipe directly to the file system, only issue is that download progress isn't shown
const res = await fetch(`/download/${token}`);

const ws_dest = window.showSaveFilePicker().then(handle => handle.createWritable());

const ts_dec = new TransformStream({
transform(chunk, controller) {
controller.enqueue(chunk);
}
});

return res.body.pipeThrough(ts_dec).pipeTo(await ws_dest);
const res = await fetch(`/download/${token}`);

const ws_dest = window.showSaveFilePicker().then(handle => handle.createWritable());

const ts_dec = new TransformStream({
transform(chunk, controller) {
controller.enqueue(chunk);
}
});

return res.body.pipeThrough(ts_dec).pipeTo(await ws_dest);
24 replies