Skip to content

Commit

Permalink
docs: add NodeDownloader todo
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed Nov 23, 2023
1 parent 9ca1f44 commit 402124d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/nodelix/node_downloader.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
defmodule Nodelix.NodeDownloader do
@moduledoc """
TODO
- fetch Node.js archive for a version and platform (https://nodejs.org/dist/v20.10.0/)
- fetch checksum file (https://nodejs.org/dist/v20.10.0/SHASUMS256.txt)
- fetch checksum file signature (https://nodejs.org/dist/v20.10.0/SHASUMS256.txt.sig)
- fetch Node.js signing keys list (https://raw.githubusercontent.com/nodejs/release-keys/main/keys.list)
- fetch keys (https://raw.githubusercontent.com/nodejs/release-keys/main/keys/4ED778F539E3634C779C87C6D7062848A1AB005C.asc)
- convert keys to PEM (https://stackoverflow.com/questions/10966256/erlang-importing-gpg-public-key)
- check signature of the checksum file with each key until there's a match
- match the hash for the archive filename
- check integrity of the downloaded archive
- return the archive
sigh ... why make it simple?
"""

require Logger

@base_url "https://nodejs.org/dist/"

Check warning on line 20 in lib/nodelix/node_downloader.ex

View workflow job for this annotation

GitHub Actions / Build and test

module attribute @base_url was set but never used
end

0 comments on commit 402124d

Please sign in to comment.