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

pbnj

Package Overview
Dependencies
Maintainers
8
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pbnj - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

6

lib/descriptors/ProtoDescriptor.js

@@ -79,2 +79,8 @@

/** @return {string} */
ProtoDescriptor.prototype.getFilePath = function () {
return this._filePath
}
ProtoDescriptor.prototype.setPackage = function (package) {

@@ -81,0 +87,0 @@ this._package = package

25

lib/Project.js

@@ -28,2 +28,5 @@

/** @private {?} */
this._additionalCompilerOptions = null
/**

@@ -131,3 +134,13 @@ * Look for protos starting at the specified path. Defaults to cwd and default includes.

/**
* Set additional compiler options (these are merged onto the default SoyCompiler options).
* @param {?} additionalCompilerOptions these merge onto the default {@link SoyOptions}
* @return {Project}
*/
Project.prototype.setAdditionalCompilerOptions = function (options) {
this._additionalCompilerOptions = options
return this
}
/**

@@ -367,2 +380,5 @@ * Sets the output directory to use for each suffix. If no suffix is passed in, sets the default outDir.

})
if (this._additionalCompilerOptions) {
compiler.setOptions(this._additionalCompilerOptions)
}

@@ -375,10 +391,11 @@ return kew.nfcall(compiler.compileTemplates.bind(compiler, this._templateDir)).then(function () {

var descriptor = this.getProtos(job.proto)[0]
var baseFileName = descriptor.getName()
var filePath = descriptor.getFilePath()
if (job.suffix == '.java' && descriptor.getOption('java_outer_classname')) {
baseFileName = descriptor.getOption('java_outer_classname')
filePath = path.join(path.dirname(filePath), descriptor.getOption('java_outer_classname'))
} else if ((job.suffix == '.h' || job.suffix == '.m') && descriptor.getOption('ios_classname')) {
baseFileName = descriptor.getOption('ios_classname')
filePath = path.join(path.dirname(filePath), descriptor.getOption('ios_classname'))
}
var outDir = (job.suffix && this._outDirs[job.suffix]) ? this._outDirs[job.suffix] : this._outDir
var fileName = path.join(outDir, baseFileName + (job.suffix || this._defaultSuffix))
var relativeFilePath = path.relative(this._basePath, filePath)
var fileName = path.join(outDir, relativeFilePath + (job.suffix || this._defaultSuffix))
var contents = compiler.render(job.template, descriptor.toTemplateObject())

@@ -385,0 +402,0 @@ promises.push(this._outputFn(descriptor, fileName, contents))

2

package.json
{
"name": "pbnj",
"version": "0.8.0",
"version": "0.9.0",
"keywords": ["protocol", "buffer", "proto", "protobuf", "parser", "codegen"],

@@ -5,0 +5,0 @@ "description": "JavaScript protocol buffer schema parser and template based code generator",

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