-
Notifications
You must be signed in to change notification settings - Fork 40
Make server component separate and this module just install npm deps #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
README.md
Outdated
# npm on IPFS | ||
|
||
 | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too big
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit big. Did you have a preferred size in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the js-ipfs repo for a good size
=========== | ||
# npm on IPFS | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image was great btw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer it to the new image? Since #55 was opened I thought you wanted it updating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the js-ipfs repo for a good size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the network of multiple npm registries is still super cool. Can we meet in the middle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll put it back in :)
README.md
Outdated
🔧 Please either update your npm config with 'npm config set registry http://localhost:50321' | ||
🔧 or use the '--registry' flag, eg: 'npm install --registry=http://localhost:50321' | ||
$ ipfs-npm | ||
👿 Spawning a go-IPFS node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no default to JS anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It defaults to an in-process js-ipfs node. The output here is from a testing run, I missed that it was with a go-ipfs node, will update.
README.md
Outdated
🔧 or use the '--registry' flag, eg: 'npm install --registry=http://localhost:50321' | ||
$ ipfs-npm | ||
👿 Spawning a go-IPFS node | ||
🗑️ Removing old registry if it exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing or updating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It removes the old one and replaces it with the latest from the replication master. Once it's finished it's first import run (might take a week or two), it should have everything you'd ever need. N.b. it's just the json package descriptions you're pulling down, not the tarballs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps say something as "replacing old registry index if it exists"
README.md
Outdated
🗑️ Removing old registry if it exists | ||
☎️ Dialing replication master /ip4/127.0.0.1/tcp/40020/ipfs/QmeXyYCLSivUn5Ju31jjPBYNKdncbzzEf6zdN2DyrdLAbe | ||
📠 Copying registry index /ipfs/QmQmVsNFw3stJky7agrETeB9kZqkcvLSLRnFFMrhiR8zG1 to /commons-registry | ||
👩🚀 Starting local webserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps say "local proxy"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
README.md
Outdated
👿 Spawning a go-IPFS node | ||
🗑️ Removing old registry if it exists | ||
☎️ Dialing replication master /ip4/127.0.0.1/tcp/40020/ipfs/QmeXyYCLSivUn5Ju31jjPBYNKdncbzzEf6zdN2DyrdLAbe | ||
📠 Copying registry index /ipfs/QmQmVsNFw3stJky7agrETeB9kZqkcvLSLRnFFMrhiR8zG1 to /commons-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do npm-registry
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwback to #56. Will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a folder name
README.md
Outdated
🎁 Installing dependencies with /Users/alex/.nvm/versions/node/v10.8.0/bin/npm | ||
🆕 New version of express detected undefined vs 3864-53d75cca2a8eae32408fce2fd43f4c87 | ||
📄 GET /express 200 993ms | ||
🐨 npm http fetch GET 200 http://localhost:57314/express 1029ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it try to install express on setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, this was output using ipfs-npm
in a project that had express as a dependency.
README.md
Outdated
📠 Copying registry index /ipfs/QmQmVsNFw3stJky7agrETeB9kZqkcvLSLRnFFMrhiR8zG1 to /commons-registry | ||
👩🚀 Starting local webserver | ||
👿 Spawning an in-process IPFS node | ||
🗑️ Replacing old registry index if it exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exists*
README.md
Outdated
# npm on IPFS | ||
|
||
 | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicpick, can you make it centered. Just like libp2p https://github.com/libp2p/js-libp2p?
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
=========================================
Coverage ? 75.13%
=========================================
Files ? 8
Lines ? 185
Branches ? 0
=========================================
Hits ? 139
Misses ? 46
Partials ? 0
Continue to review full report at Codecov.
|
I've moved the replication/mirroring functionality out of this module into
ipfs-registry-mirror
because it was getting very unwieldy and was starting to lose focus - this is what's currently deployed at https://registry.js.ipfs.ioThis PR fixes #50 by making the purpose of this module just to install your npm deps.
When invoked on the command line, this module now:
ipfs.files.cp
the updated indexnpm
in the background configured to connect to usSome notes:
js-ipfs
can resolve remote IPNS namesipfs.dag.get
, in that it stops responding when invoked loads of times concurrently, but I need to dig in to this further. Until then this module is best used with the go daemon. E.g. in your project directory and withgo-ipfs
on your$PATH
:http://localhost...
in yourpackage-lock.json
file, might need to rewrite these post-install and replace them withhttps://registry.js.ipfs.io
urls..