hewlothereH
Denoβ€’13mo agoβ€’
1 reply
hewlothere

"Publishing" deno packages to a web accessible S3 and resolve deno.json workspace members?

Heya, I would like to publish some packages internally in our company by basically uploading them to a web accessible S3 bucket.

For example, if I had:
- @mycompany/foo, it might live at s3.internal.mycompany.com/pkgs/mycompany/foo and be located in the packages/foo folder
- @mycompany-cli/bar it might live at s3.internal.mycompany.com/pkgs/mycompany-cli/bar and be located in the scripts/bar folder

How can I publish the @mycompany-cli/bar package to the S3 bucket so that it can correctly resolve the imports from @mycompany/foo to be the S3 bucket URL?

Is it possible to send a header or something that has an import map?
Or would importing from https://s3.internal.mycompany.com/pkgs/mycompany-cli/bar automatically try to find a deno.json file at https://s3.internal.mycompany.com/pkgs/mycompany-cli/bar/deno.json ?

I would have a web server in front of the S3 bucket so I can send custom headers if needed. Would appreciate a lot if someone can help πŸ™‚
Was this page helpful?