Giter VIP home page Giter VIP logo

vpm's Introduction

Sponsor Patreon Discord Twitter

Instantly publish your modules and install them. Use the API to interact and find out more information about available modules. Become a contributor and enhance V with your work. vpm.vlang.io →

To run it locally, just run

v .

Don't forget to update config.toml: set your Postgres host, port, user, password, and dbname.

Make sure you have libpq-dev installed. Please refer to your OS or distribution documentation to install it.

In order to use GitHub authentication, add GitHub client id and secret as well.

Tailwind Setup

Download and install Tailwinds Standalone CLI in your local clone.

Linux Example:

curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 tailwindcss

You can edit the tailwind configuration in tailwind.config.js and add custom css to static/css/index.css.

Watching CSS

Use the Standalone CLI to watch the css for changes

./tailwindcss -i static/css/index.css -o static/css/dist.css --watch --minify

Intellisense

Use Tailwinds CSS Intellisense extension for VSCode to get code completion for all tailwinds classes.

Development database

Instance of locally installed Postgres 15 or docker container:

docker run -it \
  --name vpm-database \
  -e POSTGRES_DB=vpm \
  -e POSTGRES_USER=vpm \
  -e POSTGRES_PASSWORD=vpm \
  --mount source=vpm-data,target=/var/lib/postgresql/data \
  -p 5432:5432 \
  postgres:15

vpm's People

Contributors

alfu32 avatar artemkakun avatar beyazit avatar casper64 avatar dhonx avatar medvednikov avatar rgbcube avatar rodabt avatar spytheman avatar terisback avatar thecodrr avatar ttytm avatar xy3 avatar yuyi98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vpm's Issues

Allow people to publish packages from other host like Gitlab or Codeberg

It's the same thing Rust does with crates.io which is one of the main factors that got my not want to involve with the language among other things. Now you may say that most people are using Github so there is no reason to support any other site but I have to say some things about that:

  1. This is not accurate. Well yes Github has the vast majority but we're seeing more and more projects going away from Github (especially big ones) or even using Github only as a mirror and not as I primary source. I am an example that not everyone likes Github
  2. In any case, this is ideologically wrong. You shouldn't force people to use something that they don't like
  3. This is a BAD image for the tool, showing non-professional work

Of course the choice about supporting other sites or not is up to you but I just wanted to show my existence and say that people that don't use and like Github for their personal projects exists. At this point, vpm is not an option for me, I hope you care for all the users of your language

Some users reports problems with login

Some users have login problems on Safari and Firefox browsers.

I did authorize the app and it still says "Log in via Github" when a want to submit a package

The problem seems not to be so trivial because I use Firefox on both PC and mobile and can log in on both devices.

Allow use README content as package description

Since module description is required on the VPM, most people will just copy-paste a text from the README file into the packages' repo.

I think we should allow the package submitter 2 options:

  1. Use README file content from the repo as a package description
  2. Provide custom package description (as we have now)

Profile link provides to 404 page

After login, the login button is replaced with your profile clickable icon. This button should open a VPM profile page and display avatar from GitHub, but right now the avatar from GitHub isn't displayed and a button provides to 404 page.

Comment from Alex

it shouldn't point to a github profile, vpm should have user profiles where all their modules are listed

Cannot add module to vpm

Hi!

Have been eyeing-off vlang for a long while, and finally decided to contribute my first module. I'm trying to submit it via the vpm new page, but logging in to github doesn't get me anywhere:

image

I did log in and grant vlang access, but after that nothing.. Refreshing the page shows the same emptiness. No errors in console.

Apologies if this is not the correct place for such an issue!

EDIT: The module I'm trying to submit is this one..

The copy notice is not in view

When I copy the installation command, the copy notice is not in view, you need to scroll down and it doesn't disappear.
image

Duplicate module

I published a first module with name "khalyomede.el" in my v.mod file, and then I saw on others module we were not required to put the actual prefix, so I changed it to just "el", and thought I should re-publish my changes, and it has now 2 times the module khalyomede.el in vpm.

Unable to use GitHub organisation account in module name

I have a GitHub organisation that I set up for some V projects. I'd like to publish some modules using this organisation name rather than my personal account name - i.e. vgfx.glfw instead of ambye85.glfw. However, the submit page does not allow me to do this - it assumes ambye85. How can we fix this?

Fix attribute warnings

Cookie “vpm” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite [vpm.vlang.io](https://vpm.vlang.io/)

Ability to manage modules, duplicates detection, documentation improvements

Hi,

Not finding sdl in the list, I submitted https://github.com/vlang/sdl but it appeared as 1ace.sdl, which was not my intention (as I obviously didn't write it).

Looking through the list again, I can see that https://github.com/vlang/sdl is actually present, but listed under @medvednikov's name, as medvednikov.sdl.

Please:

  • delete my incorrect submission
  • promote @medvednikov's medvednikov.sdl as the official sdl
  • detect duplicate submissions (just checking the URL would get us 90% of the way there)
  • provide a way to manage (at least remove) one's own submissions
  • write at least one sentence on https://vpm.vlang.io/new to indicate that the module name submitted will be namespaced under the current user, and until there's a way to remove a submission this should also be mentioned there :)

Sorry for the multi-item issue, but these are all related and I think grouping them gives them context and makes more sense.

Thanks!

Server cant be reached

Hello
Im having trouble using the packager.
when I type v install ui I get

Errors while retrieving meta data for module ui:
Http server did not respond to our request for https://vpm.vlang.io/jsmod/ui.
Error details: http.fetch: invalid url https://vpm.vlang.io/jsmod/ui

or v search ui gives:

V panic: No responding vpm server found. Please check your network connectivity and try again later.
                                                        | 0x561cb1c0b7fd | /usr/lib/vlang/cmd/tools/vpm(+0x467fd) 
                                                        | 0x561cb1c0ddbc | /usr/lib/vlang/cmd/tools/vpm(+0x48dbc) 
                                                        | 0x561cb1bc8030 | /usr/lib/vlang/cmd/tools/vpm(+0x3030) 
                                                        | 0x7fb5bec32b25 | /usr/lib/libc.so.6(__libc_start_main+0xd5) 
                                                        | 0x561cb1bc806e | /usr/lib/vlang/cmd/tools/vpm(+0x306e)

I can ping vpm.vlang.io without any problems. Even the url https://vpm.vlang.io/jsmod/ui when opened in firefox returns
{"id":0,"name":"ui","url":"https://github.com/vlang/ui","nr_downloads":133157}
which seems valid.

Update methods

When I was trying to run the vpm source, I realized that vpm hasn't been updated for so long and the some methods used in vpm are outdated. Some examples are:

http.fetch

Outdated

user_js := http.fetch('https://api.github.com/user?access_token=$token', {
	method: .get
	headers: {
	'User-Agent': 'V http client'
    }
}) or {
    panic(err)
}

Updated

user_js := http.fetch(http.FetchConfig{
        url: 'https://api.github.com/user?access_token=$token'
	method: .get
	headers: {
	'User-Agent': 'V http client'
    }
}) or {
    panic(err)
}

vweb.set_cookie

Outdated

app.vweb.set_cookie({
		name: 'vpm'
		value: '777'
})

Updated

app.vweb.set_cookie('vpm', '777)

time_seed_array

Outdated

import rand.util
fn main() {
	seed := util.time_seed_array(2)
	rand.seed([seed[0], seed[1]])
	vweb.run<App>(port)
}

Updated

import rand.seed
fn main() {
	seed := seed.time_seed_array(2)
	rand.seed([seed[0], seed[1]])
	vweb.run(&App{}, port)
}

Please look into the issue. Thanks

Improve "Most downloaded" sort algorithm

I think the algorithm here should be:

  1. by downloads count (descending)
  2. if downloads count if the same - by stars count (descending)
  3. if stars and downloads counts are the same - by the last update date (ascending)
  4. if stars and downloads count and last upload date are the same - by name (A -> Z)

Improve error message for missing modules

If I add import markdown to a file and run this file, I get 2 error messages:
image

In this case I wouldn't show the warning about the unused imported module, since it isn't really imported, it is missing. So in this case just show the second message, that the module can't be found.
Additionally it could provide a solution like:

If it's a valid module, you can install it by running v install markdown. For further information visit https://vpm.vlang.io/

Option to install all necessary modules for a project (with a single command)

In the JS world you have a package-lock.json which holds the information about all necessary packages needed for the project. For V projects I'm not sure how to handle such things. Let's say you have a big project which uses 20 vpm modules. Is there a command to install all 20 modules? Or is it the case than you run a file and then you would get plenty of error messages because modules can't be imported?

So if I'm correct about the current behaviour, I'd suggest a general command (for example v install like npm install) to install all missing modules. Since there is no package-lock.json this command has to scan all the files recursively and detect if a module is present or not and then install all missing modules.

Error 10057 sending data to server

v up work good, but v search ui not even trying to connect and crash:

Error 10057 sending data to server (1)
Error performing handshake
Unhandled Exception 0xC0000005
20: EtwNotificationRegister    ?? : address = 0x891e987d48
19: RtlEnterCriticalSection    ?? : address = 0x891e987d48
18: RtlEnterCriticalSection    ?? : address = 0x891e987d48
17: CertCloseStore             ?? : address = 0x891e987d48
16: new_tls_context            ?? : address = 0x891e987d48
15: net__Socket_get_port       ?? : address = 0x891e987d48
14: net__http__Request_do      ?? : address = 0x891e987d48
13: net__http__Request_do      ?? : address = 0x891e987d48
12: net__http__fetch           ?? : address = 0x891e987d48
11: net__http__url_encode_form_data  ?? : address = 0x891e987d48
10: net__http__head            ?? : address = 0x891e987d48
9 : net__http__escape          ?? : address = 0x891e987d48
8 : net__http__escape          ?? : address = 0x891e987d48
7 : net__http__escape          ?? : address = 0x891e987d48
6 : wmain                      ?? : address = 0x891e987d48
5 : invoke_main                d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:91
4 : __scrt_common_main_seh     d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
3 : __scrt_common_main         d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331
2 : wmainCRTStartup            d:\A01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_wmain.cpp:17
1 : BaseThreadInitThunk        ?? : address = 0x891e987d48
0 : RtlUserThreadStart         ?? : address = 0x891e987d48

OS: Windows Server 2019 with last update
Firewall and HIPS - disabled.

Improve Docker compose files

Improve docker compose files and create valid Dockerfile to make sure development environment can be set up easily

Login button redirects to `https://vpm-beta.vlang.io/`

After login from the https://vpm.vlang.io/ page, the https://vpm-beta.vlang.io/ page is opened and all operations are performed on this domain.

If I manually return to https://vpm.vlang.io/ - I'm no more logged in

vpm abandoned?

As a new V user, seeing the state of affairs of vpm makes me question adopting V as a language.

Not to be harsh, but the UI looks unprofessional and lacks even basic features. A small list of things missing:

  • No description of the purpose of vpm
  • Bad SEO: no page title or description
  • Detail pages show nothing helpful (no description, README contents, version info, download stats, or dependency/version history, etc)
    • These details are critical for someone to know which package to use and to learn more before installing
  • No support for organization/team management
    • Important for organization adoption
  • No search
  • Not responsive

Is this a project you're looking for collaborators on?

I believe having a package manager to compete with crates/npm is necessary for V to gain adoption and I'd be happy to help if contributing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.