Socket
Socket
Sign inDemoInstall

logrocket-cli

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logrocket-cli - npm Package Compare versions

Comparing version 0.9.3 to 0.10.0

38

dist/commands/upload.js

@@ -165,2 +165,7 @@ 'use strict';

demand: 'You must specify a release, use -r or --release'
}).option('p', {
alias: 'urlPrefix',
type: 'string',
default: '~/',
describe: 'Sets a URL prefix in front of all files. Defaults to "~/"'
}).demand(1, 'Missing upload path: e.g. logrocket upload -r 1.2.3 dist/').option('gcs-token', { // for testing, pass the webhook token to get an immediate pending=no

@@ -180,3 +185,3 @@ type: 'string',

var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(args) {
var paths, release, apikey, apihost, verbose, client, uploadFile, fileList, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, fileInfo;
var paths, release, apikey, apihost, verbose, urlPrefix, client, uploadFile, fileList, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, fileInfo;

@@ -187,3 +192,3 @@ return _regenerator2.default.wrap(function _callee4$(_context4) {

case 0:
paths = args.paths, release = args.release, apikey = args.apikey, apihost = args.apihost, verbose = args.verbose;
paths = args.paths, release = args.release, apikey = args.apikey, apihost = args.apihost, verbose = args.verbose, urlPrefix = args.urlPrefix;

@@ -211,3 +216,3 @@

name = _ref5.name;
var data, res;
var filepath, data, res;
return _regenerator2.default.wrap(function _callee3$(_context3) {

@@ -219,16 +224,17 @@ while (1) {

filepath = urlPrefix.replace(/\/$/, '') + '/' + name;
data = {
release: release,
filepath: '*/' + name,
filepath: filepath,
contents: (0, _fs.createReadStream)(path)
};
_context3.prev = 2;
_context3.next = 5;
_context3.prev = 3;
_context3.next = 6;
return client.uploadFile(data);
case 5:
case 6:
res = _context3.sent;
if (res.ok) {
_context3.next = 10;
_context3.next = 11;
break;

@@ -238,12 +244,12 @@ }

console.error('Failed to upload: ' + name);
_context3.next = 10;
_context3.next = 11;
return (0, _formatError2.default)(res, { verbose: verbose });
case 10:
_context3.next = 16;
case 11:
_context3.next = 17;
break;
case 12:
_context3.prev = 12;
_context3.t0 = _context3['catch'](2);
case 13:
_context3.prev = 13;
_context3.t0 = _context3['catch'](3);

@@ -253,3 +259,3 @@ console.error(_context3.t0.message);

case 16:
case 17:
case 'end':

@@ -259,3 +265,3 @@ return _context3.stop();

}
}, _callee3, undefined, [[2, 12]]);
}, _callee3, undefined, [[3, 13]]);
}));

@@ -262,0 +268,0 @@

{
"name": "logrocket-cli",
"version": "0.9.3",
"version": "0.10.0",
"description": "Command line tool for [LogRocket](https://logrocket.com/).",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc