Jump to content




npm-inspired Packet Manager

utility

12 replies to this topic

#1 schroffl

  • Members
  • 8 posts

Posted 15 April 2016 - 08:42 PM

Hey guys,

since I found it pretty annoying that you always had to C&P some basic utility functions everytime you need them, I sat down and created a little packet manager.

Here are some resources you may want to look at:
- Client Documentation
- How to create and publish a package
- Server/Registry Source Code

There's also a webinterface to browse the public registry: www.ccpm.ml

Yes, this post is kinda small, but I think that the documentation (currently client-only) should be self-explanatory and if there are any questions, feel free to ask them.

EDIT:
So here's a little example:
Posted Image

Edited by schroffl, 24 April 2016 - 08:27 PM.


#2 lkmnds

  • Members
  • 25 posts
  • LocationBrazil

Posted 16 April 2016 - 10:18 AM

Can anyone publish packages to the server? If the package I send(theoretically) already exists in the server, what would happen? This is a good idea in the lines of npm and cargo... I was thinking if git repositories could be implemented, so you have all the versioning features and branches and tags and <infinite stuff from git>

Edited by lkmnds, 16 April 2016 - 10:19 AM.


#3 schroffl

  • Members
  • 8 posts

Posted 16 April 2016 - 10:39 AM

View Postlkmnds, on 16 April 2016 - 10:18 AM, said:

Can anyone publish packages to the server? If the package I send(theoretically) already exists in the server, what would happen? This is a good idea in the lines of npm and cargo... I was thinking if git repositories could be implemented, so you have all the versioning features and branches and tags and <infinite stuff from git>

Yes, anyone can publish, as long as they have a registered account as shown in the example. The public registry is currently running on my Cloud9, but theoretically you can run your own registry (for whatever reason).

To the git-thing: Could you elaborate? :P

Edited by schroffl, 22 April 2016 - 12:27 PM.


#4 lkmnds

  • Members
  • 25 posts
  • LocationBrazil

Posted 17 April 2016 - 12:50 AM

For example, when you initialize a Rust package(with "cargo init") it creates the package data AND a git repository in the current directory, so the packager has all the features of using git(branches, commits, and whatnot).

#5 apemanzilla

  • Members
  • 1,421 posts

Posted 17 April 2016 - 02:41 AM

If you want this to work you're going to need to host the server on a proper VPS. Cloud9 was designed for demos and lightweight testing and the registry is currently offline.

#6 schroffl

  • Members
  • 8 posts

Posted 17 April 2016 - 10:16 AM

View Postapemanzilla, on 17 April 2016 - 02:41 AM, said:

If you want this to work you're going to need to host the server on a proper VPS. Cloud9 was designed for demos and lightweight testing and the registry is currently offline.

Yeah, I know, but I wanted to start off with Cloud9 just to test if anyone is actually interested in using it...
(It's online again)

Edited by schroffl, 18 April 2016 - 04:38 PM.


#7 schroffl

  • Members
  • 8 posts

Posted 18 April 2016 - 08:42 PM

The registry is now being run via Red Hat's OpenShift.
You can get the client using said registry via the pastebin code GuLjbc5i (outdated)

Edited by schroffl, 22 April 2016 - 12:29 PM.


#8 apemanzilla

  • Members
  • 1,421 posts

Posted 18 April 2016 - 09:08 PM

Now that the registry is online, it would be nice if there was better documentation :P

#9 schroffl

  • Members
  • 8 posts

Posted 18 April 2016 - 09:20 PM

View Postapemanzilla, on 18 April 2016 - 09:08 PM, said:

Now that the registry is online, it would be nice if there was better documentation :P
Uhh c'mon, I knew that day would come :D
But I will hopefully sit down tomorrow and expand it a little further.

Edited by schroffl, 18 April 2016 - 09:21 PM.


#10 apemanzilla

  • Members
  • 1,421 posts

Posted 18 April 2016 - 10:03 PM

View Postschroffl, on 18 April 2016 - 09:20 PM, said:

View Postapemanzilla, on 18 April 2016 - 09:08 PM, said:

Now that the registry is online, it would be nice if there was better documentation :P
Uhh c'mon, I knew that day would come :D
But I will hopefully sit down tomorrow and expand it a little further.

Also a command to list packages available, or another way to browse them, would be nice :D

#11 schroffl

  • Members
  • 8 posts

Posted 20 April 2016 - 07:11 PM

View Postapemanzilla, on 18 April 2016 - 09:08 PM, said:

Now that the registry is online, it would be nice if there was better documentation :P

I've just added a little guide on creating a package to the repo.

Edited by schroffl, 22 April 2016 - 05:00 AM.


#12 schroffl

  • Members
  • 8 posts

Posted 22 April 2016 - 05:06 AM

View Postlkmnds, on 16 April 2016 - 10:18 AM, said:

If the package I send(theoretically) already exists in the server, what would happen?

If you aren't the owner, you cannot publish a package that already exists (the owner is the person to first publish a package).
If you are the owner and the version you want to publish is already in the registry, it won't work either.
So in order to update you will have to increment your version (Semver).

Edited by schroffl, 22 April 2016 - 05:10 AM.


#13 schroffl

  • Members
  • 8 posts

Posted 24 April 2016 - 05:45 PM

View Postapemanzilla, on 18 April 2016 - 10:03 PM, said:

Also a command to list packages available, or another way to browse them, would be nice :D

I've created a webinterface to browse and search for packages. It can be reached via www.ccpm.ml

Edited by schroffl, 24 April 2016 - 06:09 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users