New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jora-cli

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jora-cli - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 1.2.0 (September 19, 2019)
- Added `--sandbox` option to open data and query in sandbox (opens in a browser a web interface with injected data and query saved in a temporary file)
## 1.1.1 (August 21, 2019)

@@ -2,0 +6,0 @@

const fs = require('fs');
const path = require('path');
const cli = require('clap');
const tempfile = require('tempfile');
const open = require('open');
const createSandboxFileContent = require('jora-sandbox');
const jora = require('jora/dist/jora');

@@ -20,2 +23,3 @@ const colorize = require('./utils/colorize');

const color = options.color && colorize.supported;
const sandbox = options.sandbox || false;
let inputFile = options.input;

@@ -42,2 +46,3 @@ let outputFile = options.output;

color,
sandbox,
inputFile,

@@ -87,3 +92,2 @@ outputFile

function processStream(options) {
const query = prepareQuery(options);
const inputStream = options.inputFile === '<stdin>'

@@ -95,2 +99,14 @@ ? process.stdin

const data = prepareData(source);
if (options.sandbox) {
const filepath = tempfile('.html');
fs.writeFileSync(filepath, createSandboxFileContent(
{ name: options.inputFile, data },
options.query
));
open(filepath);
return;
}
const query = prepareQuery(options);
const result = performQuery(query, data, undefined);

@@ -116,2 +132,3 @@ const serializedResult = serializeResult(convertUndefinedToNull(result), options);

.option('--no-color', 'Suppress color output')
.option('-s, --sandbox', 'Output data and query in sandbox')
.action(function(args) {

@@ -118,0 +135,0 @@ const options = processOptions(this.values, args);

18

package.json
{
"name": "jora-cli",
"version": "1.1.1",
"version": "1.2.0",
"description": "Command line interface for Jora",
"keywords": [],
"homepage": "https://github.com/discoveryjs/jora-cli",
"keywords": [
"cli",
"jora"
],
"maintainers": [

@@ -21,5 +23,2 @@ {

"repository": "discoveryjs/jora-cli",
"bugs": {
"url": "https://github.com/discoveryjs/jora-cli/issues"
},
"bin": {

@@ -41,7 +40,10 @@ "jora": "./bin/jora"

"jora": "1.0.0-alpha.10",
"supports-color": "^7.0.0"
"jora-sandbox": "^1.0.1",
"open": "^6.4.0",
"supports-color": "^7.0.0",
"tempfile": "^3.0.0"
},
"devDependencies": {
"coveralls": "^3.0.4",
"eslint": "^6.0.1",
"eslint": "^6.4.0",
"mocha": "^5.2.0",

@@ -48,0 +50,0 @@ "nyc": "^14.1.1"

@@ -33,2 +33,3 @@ # jora-cli

-q, --query <query> Jora query
-s, --sandbox Output data and query in sandbox
-v, --version Output version

@@ -35,0 +36,0 @@ ```

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