Socket
Socket
Sign inDemoInstall

@protobuf-ts/plugin-framework

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protobuf-ts/plugin-framework - npm Package Compare versions

Comparing version 2.0.0-alpha.11 to 2.0.0-alpha.12

9

build/commonjs/descriptor-info.js

@@ -302,2 +302,3 @@ "use strict";

isTypeUsed(type, inFiles) {
const needle = this.nameLookup.makeTypeName(type);
let used = false;

@@ -309,3 +310,3 @@ for (let fd of inFiles) {

if (descriptor_1.DescriptorProto.is(typeDescriptor)) {
const usedInField = typeDescriptor.field.includes(type);
const usedInField = typeDescriptor.field.some(fd => fd.typeName !== undefined && this.nameLookup.normalizeTypeName(fd.typeName) === needle);
if (usedInField) {

@@ -316,6 +317,6 @@ used = true;

else if (descriptor_1.ServiceDescriptorProto.is(typeDescriptor)) {
const usedInMethodInput = typeDescriptor.method.some(md => this.nameLookup.resolveTypeName(md.inputType) === type);
const usedInMethodOutput = typeDescriptor.method.some(md => this.nameLookup.resolveTypeName(md.outputType) === type);
const usedInMethodInput = typeDescriptor.method.some(md => md.inputType !== undefined && this.nameLookup.normalizeTypeName(md.inputType) === needle);
const usedInMethodOutput = typeDescriptor.method.some(md => md.outputType !== undefined && this.nameLookup.normalizeTypeName(md.outputType) === needle);
if (usedInMethodInput || usedInMethodOutput) {
return true;
used = true;
}

@@ -322,0 +323,0 @@ }

@@ -298,2 +298,3 @@ import { DescriptorProto, EnumDescriptorProto, EnumValueDescriptorProto, FieldDescriptorProto, FieldDescriptorProto_Label, FieldDescriptorProto_Type, FileDescriptorProto, MethodDescriptorProto, OneofDescriptorProto, ServiceDescriptorProto } from "./google/protobuf/descriptor";

isTypeUsed(type, inFiles) {
const needle = this.nameLookup.makeTypeName(type);
let used = false;

@@ -305,3 +306,3 @@ for (let fd of inFiles) {

if (DescriptorProto.is(typeDescriptor)) {
const usedInField = typeDescriptor.field.includes(type);
const usedInField = typeDescriptor.field.some(fd => fd.typeName !== undefined && this.nameLookup.normalizeTypeName(fd.typeName) === needle);
if (usedInField) {

@@ -312,6 +313,6 @@ used = true;

else if (ServiceDescriptorProto.is(typeDescriptor)) {
const usedInMethodInput = typeDescriptor.method.some(md => this.nameLookup.resolveTypeName(md.inputType) === type);
const usedInMethodOutput = typeDescriptor.method.some(md => this.nameLookup.resolveTypeName(md.outputType) === type);
const usedInMethodInput = typeDescriptor.method.some(md => md.inputType !== undefined && this.nameLookup.normalizeTypeName(md.inputType) === needle);
const usedInMethodOutput = typeDescriptor.method.some(md => md.outputType !== undefined && this.nameLookup.normalizeTypeName(md.outputType) === needle);
if (usedInMethodInput || usedInMethodOutput) {
return true;
used = true;
}

@@ -318,0 +319,0 @@ }

{
"name": "@protobuf-ts/plugin-framework",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha.12",
"description": "framework to create protoc plugins",

@@ -36,6 +36,6 @@ "license": "(Apache-2.0 AND BSD-3-Clause)",

"dependencies": {
"@protobuf-ts/runtime": "^2.0.0-alpha.11",
"@protobuf-ts/runtime": "^2.0.0-alpha.12",
"typescript": ">=3.8.3 <4"
},
"gitHead": "7c06b9e18c2f67ae2db001a44e0335125fd6192e"
"gitHead": "00553c29b1e227660fb7ecca9e88506ab1e68a6b"
}
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