npm_3pp_lister 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Gemfile.lock +1 -1
 - data/README.md +8 -0
 - data/Screenshot.png +0 -0
 - data/lib/npm_3pp_lister/commands/list.rb +12 -5
 - data/lib/npm_3pp_lister/version.rb +1 -1
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 7f1f4a26f822b2367f0952d52687a758a493cf1f93ba54c9d81e1e5d1dbf9429
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a12c8faf2fe735aaeabc74b39ab68dbec990f9088ded5796b2f5ebbc333f9978
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 709df33278b0ca70114ccaf1fb53b8e86af458812635a5e41330c1f02e2e8fb82d885ce4dd6f0e962ced43035d43d1b229387f83f8a7e5fe322cf1cab92e4728
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b43abb6a7e0247a7bff3d00c76ec978c9da6e2b7722a8d1ca57fe9cc5579bfd6e740dd756f07eb248a8f46bcc2330646901709b11fa323684fd330edda00ae95
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -9,8 +9,16 @@ link to the source code of the specific version on the NPM registry. 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            ## Usage
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
      
 12 
     | 
    
         
            +
            In any directory with a package.json file:
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
       12 
14 
     | 
    
         
             
                $ npm_3pp_lister list
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
      
 16 
     | 
    
         
            +
            
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            ## Todo
         
     | 
| 
      
 19 
     | 
    
         
            +
            - list dev/peer dependencies
         
     | 
| 
      
 20 
     | 
    
         
            +
            - ??
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       14 
22 
     | 
    
         
             
            ## License
         
     | 
| 
       15 
23 
     | 
    
         | 
| 
       16 
24 
     | 
    
         
             
            Do whatever you want
         
     | 
    
        data/Screenshot.png
    ADDED
    
    | 
         Binary file 
     | 
| 
         @@ -16,13 +16,20 @@ module Npm3ppLister 
     | 
|
| 
       16 
16 
     | 
    
         
             
                      file = File.read('./package.json')
         
     | 
| 
       17 
17 
     | 
    
         
             
                      json = JSON.parse(file)
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
      
 19 
     | 
    
         
            +
                      output.puts "dependencies:"
         
     | 
| 
      
 20 
     | 
    
         
            +
                      output.puts "\n"
         
     | 
| 
       19 
21 
     | 
    
         
             
                      json["dependencies"].each do |key, val|
         
     | 
| 
       20 
     | 
    
         
            -
                         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
      
 22 
     | 
    
         
            +
                        source_code_url = `npm view #{key}@#{val} dist.tarball`
         
     | 
| 
      
 23 
     | 
    
         
            +
                        output.puts "#{key.colorize(:yellow)}: #{val}" + " " + source_code_url.colorize(:green)
         
     | 
| 
      
 24 
     | 
    
         
            +
                      end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                      output.puts "\n\n\n"
         
     | 
| 
      
 27 
     | 
    
         
            +
                      output.puts "devDependencies:"
         
     | 
| 
      
 28 
     | 
    
         
            +
                      output.puts "\n"
         
     | 
| 
      
 29 
     | 
    
         
            +
                      json["devDependencies"].each do |key, val|
         
     | 
| 
      
 30 
     | 
    
         
            +
                        source_code_url = `npm view #{key}@#{val} dist.tarball`
         
     | 
| 
      
 31 
     | 
    
         
            +
                        output.puts "#{key.colorize(:yellow)}: #{val}" + " " + source_code_url.colorize(:green)
         
     | 
| 
       24 
32 
     | 
    
         
             
                      end
         
     | 
| 
       25 
     | 
    
         
            -
                      output.puts "\n\nResult written to 3pp_list.txt"
         
     | 
| 
       26 
33 
     | 
    
         | 
| 
       27 
34 
     | 
    
         
             
                    else
         
     | 
| 
       28 
35 
     | 
    
         
             
                      output.puts "- No package.json found here -"
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: npm_3pp_lister
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Eric Khoury
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-04-14 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: tty-color
         
     | 
| 
         @@ -348,6 +348,7 @@ files: 
     | 
|
| 
       348 
348 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       349 
349 
     | 
    
         
             
            - README.md
         
     | 
| 
       350 
350 
     | 
    
         
             
            - Rakefile
         
     | 
| 
      
 351 
     | 
    
         
            +
            - Screenshot.png
         
     | 
| 
       351 
352 
     | 
    
         
             
            - bin/console
         
     | 
| 
       352 
353 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       353 
354 
     | 
    
         
             
            - exe/npm_3pp_lister
         
     | 
| 
         @@ -383,8 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       383 
384 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       384 
385 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       385 
386 
     | 
    
         
             
            requirements: []
         
     | 
| 
       386 
     | 
    
         
            -
             
     | 
| 
       387 
     | 
    
         
            -
            rubygems_version: 2.7.6
         
     | 
| 
      
 387 
     | 
    
         
            +
            rubygems_version: 3.1.2
         
     | 
| 
       388 
388 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       389 
389 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       390 
390 
     | 
    
         
             
            summary: Generates a list of dependencies in package.json, with name, version and
         
     |