question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deno.land/x/ corporate?

See original GitHub issue

At my company we have an internally hosted github and I’d like to introduce Deno use to the company. We can of course use urls to pull directly from our internal github and other places but that will likely put a lot of burden on github itself. What I’d really like is to run something dedicated to caching which proxies both our internal github and also public urls such as deno.land/x/. Meaning we would be able to do something like:

import { Foo } from "https://deno.internal.com/x/foo@1.0.0/mod.ts" // caches modules from deno.land/x/
import { Bar } from "https://deno.internal.com/g/bar@1.0.0/mod.ts" // caches modules from github.internal.com/...

We’re currently using Artifactory for all of our artifacts such as NPM packages, Docker images, etc. Artifactory will proxy out to npm or docker hub if you try to pull an image from it which doesn’t exist, but it also has folders we can upload things to directly… but I just do see any feature or plugin of artifactory that would work for ecmascript modules like i’m imagining here with Deno.

I’m just wondering if anyone has tried this already or knows of a solution? Before I go off and create something that already exists, I’d love to hear some ideas!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kitsonkcommented, Dec 17, 2021

The content-type would need to be preserved, I don’t know of a reverse proxy that wouldn’t do that by default. It isn’t some sort of Deno “trickery”, browsers require correct content-types to load scripts as well.

0reactions
justinmchasecommented, Dec 17, 2021

Not a lot of logic but just a little bit. Correct me if I’m wrong but isn’t there some functionality in Deno also related to the content-type header for typescript files as well? I guess as long as artifactory preserves those headers in its proxy requests it would work. And I agree we could live without the unversioned urls, which would simplify it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Company | Deno
Deno Land Inc. 251 Little Falls Dr. Wilmington DE 19808-1674. USA. ry. Chief Executive Officer. piscisaureus. Chief Technology Officer.
Read more >
Deno — A modern runtime for JavaScript and TypeScript
Deno is a simple, modern runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
Read more >
Deno Third Party Modules
deno.land/x is a hosting service for Deno scripts. It caches releases of open-source modules stored on GitHub and serves them at an easy-to-remember...
Read more >
land@v0.9.3 - Deno
How it works? land will check the deno.land third-party module metadata at bootstrap, when the cli.ts or cli.js found then run it as...
Read more >
Style Guide | Manual - Deno
Example of test: import { assertEquals } from "https://deno.land/std@0.168.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found