-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Preparations for moving the CLI to its own package, see #716
- Loading branch information
Showing
11 changed files
with
108 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Copyright (c) 2016, Daniel Wirtz All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of its author, nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
--- | ||
|
||
Code generated by the command line utilities is owned by the owner | ||
of the input file used when generating it. This code is not | ||
standalone and requires a support library to be linked with it. This | ||
support library is itself covered by the above license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env node | ||
var path = require("path"), | ||
cli = require(path.join(__dirname, "..", "pbjs.js")); | ||
var ret = cli.main(process.argv.slice(2)); | ||
if (typeof ret === 'number') | ||
process.exit(ret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env node | ||
var path = require("path"), | ||
cli = require(path.join(__dirname, "..", "pbts.js")); | ||
var ret = cli.main(process.argv.slice(2)); | ||
if (typeof ret === 'number') | ||
process.exit(ret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as pbjs from "./pbjs.js"; | ||
import * as pbts from "./pbts.js"; | ||
export { pbjs, pbts }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
exports.pbjs = require("./pbjs"); | ||
exports.pbts = require("./pbts"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
{} | ||
{ | ||
"name": "protobufjs-cli", | ||
"description": "protobuf.js command line interface (CLI).", | ||
"version": "6.7.0", | ||
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/dcodeIO/protobuf.js.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"bin": { | ||
"pbjs": "bin/pbjs", | ||
"pbts": "bin/pbts" | ||
}, | ||
"peerDependencies": { | ||
"protobufjs": "6.7.0" | ||
}, | ||
"dependencies": { | ||
"chalk": "^1.1.3", | ||
"escodegen": "^1.8.1", | ||
"espree": "^3.1.3", | ||
"estraverse": "^4.2.0", | ||
"glob": "^7.1.1", | ||
"jsdoc": "^3.4.2", | ||
"minimist": "^1.2.0", | ||
"semver": "^5.3.0", | ||
"tmp": "0.0.31", | ||
"uglify-js": "^2.8.15" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type pbjsCallback = (err: Error|null, output?: string) => {}; | ||
|
||
/** | ||
* Runs pbjs programmatically. | ||
* @param {string[]} args Command line arguments | ||
* @param {function(?Error, string=)} [callback] Optional completion callback | ||
* @returns {number|undefined} Exit code, if known | ||
*/ | ||
export function main(args: string[], callback?: pbjsCallback): number|undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type pbtsCallback = (err: Error|null, output?: string) => {}; | ||
|
||
/** | ||
* Runs pbts programmatically. | ||
* @param {string[]} args Command line arguments | ||
* @param {function(?Error, string=)} [callback] Optional completion callback | ||
* @returns {number|undefined} Exit code, if known | ||
*/ | ||
export function main(args: string[], callback?: pbtsCallback): number|undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters