+12
-8
@@ -11,3 +11,7 @@ var fs = require('fs'), | ||
| var log = function(message) { | ||
| console.log('[inst]', message); | ||
| }; | ||
| exports.run = function(opts) { | ||
@@ -17,3 +21,4 @@ var storage = new Storage(process.cwd(), opts); | ||
| console.log('Manifest shasum: ' + storage.shasum); | ||
| log('Manifest shasum: ' + storage.shasum); | ||
| log('Cache dir: ' + opts.storage); | ||
@@ -28,3 +33,3 @@ if (storage.exists()) | ||
| exports.fresh = function(storage) { | ||
| console.log('No tarballs were found, doing fresh install'); | ||
| log('No tarballs were found, doing fresh install'); | ||
| var start = Date.now(); | ||
@@ -39,11 +44,10 @@ var config = {}; | ||
| if (err) return handleError(err); | ||
| log('Fresh npm install was successful, making a tarball'); | ||
| storage.pack(function(err, res) { | ||
| if (err) return handleError(err); | ||
| console.log('Time spent: ' + Number((Date.now() - start) / 1000).toFixed(1) + ' secs'); | ||
| log('Time spent: ' + Number((Date.now() - start) / 1000).toFixed(1) + ' secs'); | ||
| }); | ||
| }) | ||
| npm.on('log', function (message) { | ||
| console.log('log:', message); | ||
| }); | ||
| npm.on('log', log); | ||
| }); | ||
@@ -54,3 +58,3 @@ }; | ||
| exports.fast = function(storage) { | ||
| console.log('Tarball from previous install found, extracting'); | ||
| log('Tarball from previous install found, extracting'); | ||
| var start = Date.now(); | ||
@@ -60,4 +64,4 @@ | ||
| if (err) return handleError(err); | ||
| console.log('Time spent: ' + Number((Date.now() - start) / 1000).toFixed(1) + ' secs'); | ||
| log('Time spent: ' + Number((Date.now() - start) / 1000).toFixed(1) + ' secs'); | ||
| }); | ||
| }; |
+1
-1
| { | ||
| "name": "inst", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "dependencies": { | ||
@@ -5,0 +5,0 @@ "npm": "~1.4.0", |
+1
-1
@@ -14,3 +14,3 @@ node-inst | ||
| dependencies and extract it next time when you do install. It's like **30-50** times faster than normal | ||
| install even with warn npm cache. | ||
| install even with "warm" npm cache. | ||
@@ -17,0 +17,0 @@ |
@@ -7,3 +7,3 @@ var assert = require('assert'), | ||
| describe.only('/lib/storage', function() { | ||
| describe('/lib/storage', function() { | ||
@@ -10,0 +10,0 @@ describe('gc()', function() { |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
12743
0.54%205
1.49%