Socket
Socket
Sign inDemoInstall

@grpc/proto-loader

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc/proto-loader - npm Package Compare versions

Comparing version 0.7.12 to 0.7.13

2

build/bin/proto-loader-gen-types.js

@@ -536,3 +536,3 @@ #!/usr/bin/env node

const method = serviceType.methods[methodName];
for (const name of [methodName, camelCase(methodName)]) {
for (const name of new Set([methodName, camelCase(methodName)])) {
if (CLIENT_RESERVED_METHOD_NAMES.has(name)) {

@@ -539,0 +539,0 @@ continue;

@@ -86,2 +86,26 @@ /**

}
export declare enum IdempotencyLevel {
IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN",
NO_SIDE_EFFECTS = "NO_SIDE_EFFECTS",
IDEMPOTENT = "IDEMPOTENT"
}
export interface NamePart {
name_part: string;
is_extension: boolean;
}
export interface UninterpretedOption {
name?: NamePart[];
identifier_value?: string;
positive_int_value?: number;
negative_int_value?: number;
double_value?: number;
string_value?: string;
aggregate_value?: string;
}
export interface MethodOptions {
deprecated: boolean;
idempotency_level: IdempotencyLevel;
uninterpreted_option: UninterpretedOption[];
[k: string]: unknown;
}
export interface MethodDefinition<RequestType, ResponseType, OutputRequestType = RequestType, OutputResponseType = ResponseType> {

@@ -98,2 +122,3 @@ path: string;

responseType: MessageTypeDefinition;
options: MethodOptions;
}

@@ -100,0 +125,0 @@ export interface ServiceDefinition {

@@ -20,3 +20,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.loadFileDescriptorSetFromObject = exports.loadFileDescriptorSetFromBuffer = exports.fromJSON = exports.loadSync = exports.load = exports.isAnyExtension = exports.Long = void 0;
exports.loadFileDescriptorSetFromObject = exports.loadFileDescriptorSetFromBuffer = exports.fromJSON = exports.loadSync = exports.load = exports.IdempotencyLevel = exports.isAnyExtension = exports.Long = void 0;
const camelCase = require("lodash.camelcase");

@@ -32,2 +32,8 @@ const Protobuf = require("protobufjs");

exports.isAnyExtension = isAnyExtension;
var IdempotencyLevel;
(function (IdempotencyLevel) {
IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = "IDEMPOTENCY_UNKNOWN";
IdempotencyLevel["NO_SIDE_EFFECTS"] = "NO_SIDE_EFFECTS";
IdempotencyLevel["IDEMPOTENT"] = "IDEMPOTENT";
})(IdempotencyLevel = exports.IdempotencyLevel || (exports.IdempotencyLevel = {}));
const descriptorOptions = {

@@ -87,2 +93,20 @@ longs: String,

}
function mapMethodOptions(options) {
return (options || []).reduce((obj, item) => {
for (const [key, value] of Object.entries(item)) {
switch (key) {
case 'uninterpreted_option':
obj.uninterpreted_option.push(item.uninterpreted_option);
break;
default:
obj[key] = value;
}
}
return obj;
}, {
deprecated: false,
idempotency_level: IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
uninterpreted_option: [],
});
}
function createMethodDefinition(method, serviceName, options, fileDescriptors) {

@@ -105,2 +129,3 @@ /* This is only ever called after the corresponding root.resolveAll(), so we

responseType: createMessageDefinition(responseType, fileDescriptors),
options: mapMethodOptions(method.parsedOptions),
};

@@ -107,0 +132,0 @@ }

{
"name": "@grpc/proto-loader",
"version": "0.7.12",
"version": "0.7.13",
"author": "Google Inc.",

@@ -50,3 +50,3 @@ "contributors": [

"long": "^5.0.0",
"protobufjs": "^7.2.4",
"protobufjs": "^7.2.5",
"yargs": "^17.7.2"

@@ -61,4 +61,6 @@ },

"clang-format": "^1.2.2",
"google-proto-files": "^3.0.2",
"gts": "^3.1.0",
"rimraf": "^3.0.2",
"ts-node": "^10.9.2",
"typescript": "~4.7.4"

@@ -65,0 +67,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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