npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

see-seeker

v1.3.0

Published

Quickly generate templates based on github repo or gitlab repo.

Downloads

13

Readme

see-seeker

Quickly generate templates based on github repo or gitlab repo.

NPM version

This project was bootstrapped by create-neon.

Installing see-seeker

$ npm install see-seeker -g

Exploring see-seeker

After install see-seeker, you can explore it at the Node REPL:

$ npm install see-seeker -g
$ see https://github.com/Dlouxgit/see ./see

Available Scripts

In the project directory, you can run:

see [select [dest]]

Pull items from the local list to the dest directory, dest defaults to the current directory.

see set-token <access_token>

Set gitlab's private token for internal projects.

see <repo-url> [dest]

Pull the project of repo-url to the directory corresponding to dest, dest is the current directory by default.

Project Layout

The directory structure of this project is:

see/
├── Cargo.toml
├── README.md
├── index.node
├── package.json
├── src/
|   └── lib.rs
├── bin/
|   └── main.js
└── target/

Cargo.toml

The Cargo manifest file, which informs the cargo command.

README.md

This file.

index.node

The Node addon—i.e., a binary Node module—generated by building the project. This is the main module for this package, as dictated by the "main" key in package.json.

Under the hood, a Node addon is a dynamically-linked shared object. The "build" script produces this file by copying it from within the target/ directory, which is where the Rust build produces the shared object.

package.json

The npm manifest file, which informs the npm command.

src/

The directory tree containing the Rust source code for the project.

src/lib.rs

The Rust library's main module.

bin/main.js

The cli main file.

target/

Binary artifacts generated by the Rust build.

Learn More

To learn more about Neon, see the Neon documentation.

To learn more about Rust, see the Rust documentation.

To learn more about Node, see the Node documentation.

LICENSE

ISC

    let re = Regex::new("^(?:(?:https://)?([^:/]+.[^:/]+)/|git@([^:/]+)[:/]|([^/]+):)?(?P<user>[^/s]+)/(?P<name>.+)(?P<subdir>:(?P<refer>(?:/[^/s#]+)+))?(?:/)?(?:#(.+))?")
    .unwrap();
    if re.is_match(src) {

        let caps: regex::Captures<'_> = re.captures(src).unwrap();
        let matched_site = caps.get(1).or(caps.get(2)).or(caps.get(3));
        let site: String;
        if let true = matched_site.is_some() {
            let reg = Regex::new(".(com|org)$").unwrap();
            site = reg.replace_all(matched_site.unwrap().as_str(), "").to_string();
        } else {
            site = String::from("github");
        }

        let mut res = false;
        let mut mode = String::from("git");
        for (_, v) in VALID_SITES.iter().enumerate() {
            if site.contains(v) {
                res = true;
                mode = String::from("tar");
            }
        }
        if !res && !site.starts_with("gitlab") {
            return Err("cli supports GitHub, GitLab");
        }

        let domain = site.clone() + ".com";
        
        let user = caps.name("user").unwrap().as_str().to_string();
        let name = caps.name("name").unwrap().as_str().replace(".git", "").to_string();
        let subdir;
        subdir = match caps.name("subdir") {
            None => "xxx",
            Some(i) => i.as_str(),
        }.to_string();
        let refer;
        refer = match caps.name("refer") {
            None => "HEAD",
            Some(i) => i.as_str(),
        }.to_string();
        let url = format!("https://{domain}/{user}/{name}");
        println!("urlrs{:?}", url);
        let ssh = format!("git@{domain}:{user}/{name}");
        println!("ssh{:?}", ssh);

        Ok(UrlInfo {site, _user: user, name, _refer: refer, url, _ssh: ssh, _subdir: subdir, _mode: mode})
    } else {
        return Err("Not enough arguments.");
    }