Comparing version 0.5.1 to 0.5.2
@@ -10,4 +10,2 @@ module.exports = function(grunt) { | ||
var request = require('request'); | ||
var FormData = require('form-data'); | ||
var path = require('path'); | ||
var Q = require('q'); | ||
@@ -18,18 +16,25 @@ var done = this.async(); | ||
var deferred = Q.defer(); | ||
var grammar = fs.readFileSync(parser.source); | ||
var form = new FormData(); | ||
form.append('tz', parser.tz, { knownLength: new Buffer(parser.tz).length, contentType: 'text/plain' }); | ||
form.append('command', parser.command, { knownLength: new Buffer(parser.command).length, contentType: 'text/plain' }); | ||
form.append('input', grammar, { knownLength : new Buffer(grammar).length, contentType: 'text/plain', filename: path.basename(parser.source) }); | ||
var length = form.getLengthSync(); | ||
var r = request.post('http://www.bottlecaps.de/rex/', function(err, res, body) { | ||
if(err) { | ||
deferred.reject(err); | ||
} else { | ||
fs.writeFileSync(parser.destination, body); | ||
deferred.resolve(); | ||
request( | ||
{ | ||
method: 'POST', | ||
url: 'https://bottlecaps.de/rex', | ||
headers: { | ||
'Content-Type': 'multipart/form-data' | ||
}, | ||
formData : { | ||
'input': fs.createReadStream(parser.source), | ||
'command': parser.command, | ||
'tz': new Date().getTimezoneOffset() | ||
} | ||
}, | ||
function(err, res, body) { | ||
if(err) { | ||
deferred.reject(err); | ||
} | ||
else { | ||
fs.writeFileSync(parser.destination, body); | ||
deferred.resolve(); | ||
} | ||
} | ||
}); | ||
r._form = form; | ||
r.setHeader('content-length', length); | ||
); | ||
promises.push(deferred.promise); | ||
@@ -53,4 +58,3 @@ }); | ||
destination: 'lib/parsers/XQueryParser.js', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint', | ||
tz: '-60', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint' | ||
}, | ||
@@ -60,4 +64,3 @@ { | ||
destination: 'lib/parsers/JSONiqParser.js', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint', | ||
tz: '-60', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint' | ||
} | ||
@@ -71,4 +74,3 @@ ] | ||
destination: 'lib/lexers/XQueryTokenizer.js', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint', | ||
tz: '-60' | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint' | ||
}, | ||
@@ -78,4 +80,3 @@ { | ||
destination: 'lib/lexers/JSONiqTokenizer.js', | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint', | ||
tz: '-60' | ||
command: '-ll 2 -backtrack -tree -javascript -a xqlint' | ||
} | ||
@@ -82,0 +83,0 @@ ] |
@@ -8,3 +8,3 @@ { | ||
"description": "XQuery & JSONiq Quality Checker", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"keywords": [ | ||
@@ -30,3 +30,3 @@ "jsoniq", | ||
"final-fs": "~1.6.0", | ||
"lodash": "4.17.13", | ||
"lodash": "4.17.21", | ||
"q": "~1.0.0", | ||
@@ -38,3 +38,3 @@ "update-notifier": "~2.5.0" | ||
"form-data": "2.3.2", | ||
"grunt": "1.0.2", | ||
"grunt": "1.5.3", | ||
"grunt-browserify": "5.3.0", | ||
@@ -41,0 +41,0 @@ "grunt-contrib-jshint": "1.1.0", |
#XQLint | ||
[![Build Status](http://img.shields.io/travis/wcandillon/xqlint/master.svg?style=flat)](https://travis-ci.org/wcandillon/xqlint) [![NPM version](http://img.shields.io/npm/v/xqlint.svg?style=flat)](http://badge.fury.io/js/xqlint) [![Code Climate](http://img.shields.io/codeclimate/github/wcandillon/xqlint.svg?style=flat)](https://codeclimate.com/github/wcandillon/xqlint) | ||
[![NPM version](http://img.shields.io/npm/v/xqlint.svg?style=flat)](http://badge.fury.io/js/xqlint) | ||
@@ -4,0 +4,0 @@ ## JSONiq & XQuery Code Quality Tool |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6549661
94278
+ Addedlodash@4.17.21(transitive)
- Removedlodash@4.17.13(transitive)
Updatedlodash@4.17.21