Socket
Socket
Sign inDemoInstall

28

Package Overview
Dependencies
138
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.1

41

lib/commands/run.js

@@ -10,6 +10,6 @@ 'use strict';

//Trace Command
//Run Command
var runCmd = cli.command('run <projectName> <path>');
runCmd
.description('Run 28.io query.')
.description('Run query.')
.action(function(projectName, path){

@@ -22,6 +22,34 @@ projectName = projectName || Config.getDefaultProject();

}
if(!u.path.endsWith('.jq') && !u.path.endsWith('.xq')) {
var serializedURL = URL.format(u);
console.log(`GET ${serializedURL}`.gray);
request({
uri: serializedURL,
method: 'GET'
}, function(error, response, body){
if(error) {
console.error(error);
} else {
console.log(body);
}
});
});
});
//Trace Command
var traceCmd = cli.command('trace <projectName> <path>');
traceCmd
.description('Trace query.')
.action(function(projectName, path){
projectName = projectName || Config.getDefaultProject();
return Config.refreshTokens(projectName).then(function(){
var u = URL.parse(path);
if(u.protocol === null) {
u = URL.parse(Config.getProjectEndpoint(projectName) + '/_queries' + (path[0] === '/' ? '' : '/') + path);
}
if(!u.pathname.endsWith('.jq') && !u.pathname.endsWith('.xq')) {
//Assumes JSONiq then
u.path += '.jq';
u.pathname += '.jq';
}
u.pathname += "/metadata/trace";
if(u.search === null) {

@@ -34,2 +62,3 @@ u.search = '';

var serializedURL = URL.format(u);
console.log(`GET ${serializedURL}`.gray);
request({

@@ -41,7 +70,7 @@ uri: serializedURL,

console.error(error);
return;
} else {
console.log(body.green);
}
console.log(body.green);
});
});
});

2

package.json

@@ -9,3 +9,3 @@ {

"description": "Command line utility to download and upload 28.io queries.",
"version": "3.2.0",
"version": "3.2.1",
"keywords": [

@@ -12,0 +12,0 @@ "jsoniq",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc