Comparing version 0.12.0 to 0.13.0
{ | ||
"name": "thrift", | ||
"description": "node.js bindings for the Apache Thrift RPC system", | ||
"homepage": "http://thrift.apache.org/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/apache/thrift.git" | ||
}, | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Thrift is a software framework for scalable cross-language services development.", | ||
"author": { | ||
"name": "Apache Thrift Developers", | ||
"email": "dev@thrift.apache.org", | ||
"url": "http://thrift.apache.org" | ||
"email": "dev@thrift.apache.org" | ||
}, | ||
"bugs": "https://issues.apache.org/jira/projects/THRIFT/summary", | ||
"homepage": "http://thrift.apache.org", | ||
"repository": "https://github.com/apache/thrift", | ||
"license": "Apache-2.0", | ||
"licenses": [ | ||
{ | ||
"type": "Apache-2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0" | ||
} | ||
], | ||
"bugs": { | ||
"mail": "dev@thrift.apache.org", | ||
"url": "https://issues.apache.org/jira/browse/THRIFT" | ||
"devDependencies": { | ||
"browserify": "~16.2", | ||
"grunt": "~1.0", | ||
"grunt-cli": "~1.3", | ||
"grunt-contrib-concat": "~1.0", | ||
"grunt-contrib-jshint": "~2.1", | ||
"grunt-contrib-qunit": "~3.1", | ||
"grunt-contrib-uglify": "~4.0", | ||
"grunt-jsdoc": "~2.3", | ||
"grunt-shell-spawn": "~0.4", | ||
"jslint": "~0.12", | ||
"node-int64": "~0.4.0" | ||
}, | ||
"files": [ | ||
"lib/nodejs/lib/thrift", | ||
"lib/nodejs/README.md" | ||
], | ||
"directories": { | ||
"lib": "./lib/nodejs/lib/thrift" | ||
}, | ||
"main": "./lib/nodejs/lib/thrift", | ||
"engines": { | ||
"node": ">= 4.1.0" | ||
}, | ||
"dependencies": { | ||
"node-int64": "^0.4.0", | ||
"q": "^1.5.0", | ||
"ws": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"buffer-equals": "^1.0.4", | ||
"commander": "^2.14.1", | ||
"connect": "^3.6.6", | ||
"eslint": "^5.7.0", | ||
"eslint-config-prettier": "^3.1.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"istanbul": "^0.4.5", | ||
"jsdoc": "^3.5.5", | ||
"prettier": "^1.14.3", | ||
"tape": "^4.9.0", | ||
"utf-8-validate": "^4.0.0", | ||
"typescript": "^3.1.6", | ||
"@types/node": "^10.12.6", | ||
"@types/q": "^1.5.1" | ||
}, | ||
"scripts": { | ||
"cover": "lib/nodejs/test/testAll.sh COVER", | ||
"test": "lib/nodejs/test/testAll.sh", | ||
"test-ts": "lib/nodets/test/testAll.sh", | ||
"prettier": "prettier --write '**/*.js'", | ||
"lint": "eslint lib/nodejs/. --ext .js", | ||
"lint-tests": "eslint lib/nodejs/test/. --ext .js" | ||
"jsdoc": "~3.5", | ||
"json-int64": "~1.0", | ||
"nopt": "~4.0" | ||
} | ||
} |
271
README.md
@@ -1,45 +0,9 @@ | ||
Apache Thrift | ||
============= | ||
Thrift Javascript Library | ||
========================= | ||
This browser based Apache Thrift implementation supports | ||
RPC clients using the JSON protocol over Http[s] with XHR | ||
and WebSocket. | ||
Introduction | ||
============ | ||
Thrift is a lightweight, language-independent software stack with an | ||
associated code generation mechanism for point-to-point RPC. Thrift provides | ||
clean abstractions for data transport, data serialization, and application | ||
level processing. The code generation system takes a simple definition | ||
language as input and generates code across programming languages that | ||
uses the abstracted stack to build interoperable RPC clients and servers. | ||
![Apache Thrift Layered Architecture](doc/images/thrift-layers.png) | ||
Thrift makes it easy for programs written in different programming | ||
languages to share data and call remote procedures. With support | ||
for [25 programming languages](LANGUAGES.md), chances are Thrift | ||
supports the languages that you currently use. | ||
Thrift is specifically designed to support non-atomic version changes | ||
across client and server code. | ||
For more details on Thrift's design and implementation, see the Thrift | ||
whitepaper included in this distribution, or at the README.md file | ||
in your particular subdirectory of interest. | ||
Status | ||
====== | ||
| Branch | Travis | Appveyor | Coverity Scan | codecov.io | Website | | ||
| :----- | :----- | :------- | :------------ | :--------- | :------ | | ||
| [`master`](https://github.com/apache/thrift/tree/master) | [![Build Status](https://travis-ci.org/apache/thrift.svg?branch=master)](https://travis-ci.org/apache/thrift) | [![Build status](https://ci.appveyor.com/api/projects/status/github/apache/thrift?branch=master&svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/history) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/1345/badge.svg)](https://scan.coverity.com/projects/thrift) | | [![Website](https://img.shields.io/badge/official-website-brightgreen.svg)](https://thrift.apache.org/) | | ||
Releases | ||
======== | ||
Thrift does not maintain a specific release calendar at this time. | ||
We strive to release twice yearly. Download the [current release](http://thrift.apache.org/download). | ||
License | ||
======= | ||
------- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
@@ -62,132 +26,121 @@ or more contributor license agreements. See the NOTICE file | ||
Project Hierarchy | ||
================= | ||
Grunt Build | ||
----------- | ||
This is the base directory for the Apache Thrift JavaScript | ||
library. This directory contains a Gruntfile.js and a | ||
package.json. Many of the build and test tools used here | ||
require a recent version of Node.js to be installed. To | ||
install the support files for the Grunt build tool execute | ||
the command: | ||
thrift/ | ||
npm install | ||
This reads the package.json and pulls in the appropriate | ||
sources from the internet. To build the JavaScript branch | ||
of Apache Thrift execute the command: | ||
compiler/ | ||
npx grunt | ||
This runs the grunt build tool (from within `./node_modules/.bin/`), | ||
linting all of the source files, setting up and running the | ||
tests, concatenating and minifying the main libraries and | ||
generating the html documentation. | ||
Contains the Thrift compiler, implemented in C++. | ||
Tree | ||
---- | ||
The following directories are present (some only after the | ||
grunt build): | ||
/src - The JavaScript Apache Thrift source | ||
/doc - HTML documentation | ||
/dist - Distribution files (thrift.js and thrift.min.js) | ||
/test - Various tests, this is a good place to look for | ||
example code | ||
/node_modules - Build support files installed by npm | ||
lib/ | ||
Contains the Thrift software library implementation, subdivided by | ||
language of implementation. | ||
Example JavaScript Client and Server | ||
------------------------------------ | ||
The listing below demonstrates a simple browser based JavaScript | ||
Thrift client and Node.js JavaScript server for the hello_svc | ||
service. | ||
cpp/ | ||
go/ | ||
java/ | ||
php/ | ||
py/ | ||
rb/ | ||
... | ||
### hello.thrift - Service IDL | ||
### build with: $ thrift -gen js -gen js:node hello.thrift | ||
service hello_svc { | ||
string get_message(1: string name) | ||
} | ||
test/ | ||
### hello.html - Browser Client | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Hello Thrift</title> | ||
</head> | ||
<body> | ||
Name: <input type="text" id="name_in"> | ||
<input type="button" id="get_msg" value="Get Message" > | ||
<div id="output"></div> | ||
<script src="thrift.js"></script> | ||
<script src="gen-js/hello_svc.js"></script> | ||
<script> | ||
(function() { | ||
var transport = new Thrift.TXHRTransport("/hello"); | ||
var protocol = new Thrift.TJSONProtocol(transport); | ||
var client = new hello_svcClient(protocol); | ||
var nameElement = document.getElementById("name_in"); | ||
var outputElement = document.getElementById("output"); | ||
document.getElementById("get_msg") | ||
.addEventListener("click", function(){ | ||
client.get_message(nameElement.value, function(result) { | ||
outputElement.innerHTML = result; | ||
}); | ||
}); | ||
})(); | ||
</script> | ||
</body> | ||
</html> | ||
Contains sample Thrift files and test code across the target programming | ||
languages. | ||
### hello.js - Node Server | ||
var thrift = require('thrift'); | ||
var hello_svc = require('./gen-nodejs/hello_svc.js'); | ||
var hello_handler = { | ||
get_message: function(name, result) { | ||
var msg = "Hello " + name + "!"; | ||
result(null, msg); | ||
} | ||
} | ||
var hello_svc_opt = { | ||
transport: thrift.TBufferedTransport, | ||
protocol: thrift.TJSONProtocol, | ||
processor: hello_svc, | ||
handler: hello_handler | ||
}; | ||
var server_opt = { | ||
staticFilePath: ".", | ||
services: { | ||
"/hello": hello_svc_opt | ||
} | ||
} | ||
var server = Thrift.createWebServer(server_opt); | ||
var port = 9099; | ||
server.listen(port); | ||
console.log("Http/Thrift Server running on port: " + port); | ||
tutorial/ | ||
Contains a basic tutorial that will teach you how to develop software | ||
using Thrift. | ||
TypeScript | ||
---------- | ||
TypeScript definition files can also be generated by running: | ||
Development | ||
=========== | ||
thrift --gen js:ts file.thrift | ||
To build the same way Travis CI builds the project you should use docker. | ||
We have [comprehensive building instructions for docker](build/docker/README.md). | ||
# Breaking Changes | ||
Requirements | ||
============ | ||
## 0.13.0 | ||
See http://thrift.apache.org/docs/install for a list of build requirements (may be stale). Alternatively see the docker build environments for a list of prerequisites. | ||
Resources | ||
========= | ||
More information about Thrift can be obtained on the Thrift webpage at: | ||
http://thrift.apache.org | ||
Acknowledgments | ||
=============== | ||
Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo, | ||
and also by Google's protocol buffers. | ||
Installation | ||
============ | ||
If you are building from the first time out of the source repository, you will | ||
need to generate the configure scripts. (This is not necessary if you | ||
downloaded a tarball.) From the top directory, do: | ||
./bootstrap.sh | ||
Once the configure scripts are generated, thrift can be configured. | ||
From the top directory, do: | ||
./configure | ||
You may need to specify the location of the boost files explicitly. | ||
If you installed boost in /usr/local, you would run configure as follows: | ||
./configure --with-boost=/usr/local | ||
Note that by default the thrift C++ library is typically built with debugging | ||
symbols included. If you want to customize these options you should use the | ||
CXXFLAGS option in configure, as such: | ||
./configure CXXFLAGS='-g -O2' | ||
./configure CFLAGS='-g -O2' | ||
./configure CPPFLAGS='-DDEBUG_MY_FEATURE' | ||
To enable gcov required options -fprofile-arcs -ftest-coverage enable them: | ||
./configure --enable-coverage | ||
Run ./configure --help to see other configuration options | ||
Please be aware that the Python library will ignore the --prefix option | ||
and just install wherever Python's distutils puts it (usually along | ||
the lines of /usr/lib/pythonX.Y/site-packages/). If you need to control | ||
where the Python modules are installed, set the PY_PREFIX variable. | ||
(DESTDIR is respected for Python and C++.) | ||
Make thrift: | ||
make | ||
From the top directory, become superuser and do: | ||
make install | ||
Note that some language packages must be installed manually using build tools | ||
better suited to those languages (at the time of this writing, this applies | ||
to Java, Ruby, PHP). | ||
Look for the README.md file in the lib/<language>/ folder for more details on the | ||
installation of each language library package. | ||
Testing | ||
======= | ||
There are a large number of client library tests that can all be run | ||
from the top-level directory. | ||
make -k check | ||
This will make all of the libraries (as necessary), and run through | ||
the unit tests defined in each of the client libraries. If a single | ||
language fails, the make check will continue on and provide a synopsis | ||
at the end. | ||
To run the cross-language test suite, please run: | ||
make cross | ||
This will run a set of tests that use different language clients and | ||
servers. | ||
1. 64-bit integer constants are now generated using node-int64 e.g.: var x = new Int64("7fffffffffffffff"); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
11
36
0
100
3
288925
4036
1
146
6
+ Addedjsdoc@~3.5
+ Addedjson-int64@~1.0
+ Addednopt@~4.0
+ Addedabbrev@1.1.1(transitive)
+ Addedbabylon@7.0.0-beta.19(transitive)
+ Addedbluebird@3.5.5(transitive)
+ Addedcatharsis@0.8.11(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjs2xmlparser@3.0.0(transitive)
+ Addedjsdoc@3.5.5(transitive)
+ Addedjson-int64@1.0.3(transitive)
+ Addedklaw@2.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmarked@0.3.19(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addednopt@4.0.3(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedrequizzle@0.2.4(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtaffydb@2.6.2(transitive)
+ Addedunderscore@1.8.3(transitive)
+ Addedxmlcreate@1.0.2(transitive)
- Removednode-int64@^0.4.0
- Removedq@^1.5.0
- Removedws@^5.0.0
- Removedasync-limiter@1.0.1(transitive)
- Removedq@1.5.1(transitive)
- Removedws@5.2.4(transitive)