Gathering detailed insights and metrics for grpc-alt-proto-loader
Gathering detailed insights and metrics for grpc-alt-proto-loader
Gathering detailed insights and metrics for grpc-alt-proto-loader
Gathering detailed insights and metrics for grpc-alt-proto-loader
npm install grpc-alt-proto-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
@grpc/grpc-js 1.12.5
Published on 18 Dec 2024
@grpc/grpc-js 1.12.4
Published on 04 Dec 2024
@grpc/grpc-js 1.12.3
Published on 02 Dec 2024
@grpc/grpc-js 1.12.2
Published on 09 Oct 2024
@grpc/grpc-js 1.12.1
Published on 08 Oct 2024
@grpc/grpc-js-xds 1.12.0
Published on 03 Oct 2024
TypeScript (85.12%)
JavaScript (11.97%)
C++ (1.44%)
Shell (0.97%)
CMake (0.14%)
Batchfile (0.13%)
Dockerfile (0.13%)
PowerShell (0.11%)
Total Downloads
2,814
Last Day
1
Last Week
1
Last Month
6
Last Year
94
4,530 Stars
4,892 Commits
653 Forks
73 Watching
50 Branches
181 Contributors
Latest Version
0.5.0
Package Id
grpc-alt-proto-loader@0.5.0
Unpacked Size
23.80 kB
Size
4.27 kB
File Count
6
NPM Version
6.1.0
Node Version
10.4.1
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-50%
1
Compared to previous week
Last month
0%
6
Compared to previous month
Last year
-29.9%
94
Compared to previous year
4
3
A utility package for loading .proto
files for use with gRPC, using the latest Protobuf.js package.
1npm install @grpc/proto-loader
1const protoLoader = require('@grpc/proto-loader'); 2const grpcLibrary = require('grpc'); 3// OR 4const grpcLibrary = require('@grpc/grpc-js'); 5 6protoLoader.load(protoFileName, options).then(packageDefinition => { 7 const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition); 8}); 9// OR 10const packageDefinition = protoLoader.loadSync(protoFileName, options); 11const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition);
The options parameter is an object that can have the following optional properties:
Field name | Valid values | Description |
---|---|---|
keepCase | true or false | Preserve field names. The default is to change them to camel case. |
longs | String or Number | The type to use to represent long values. Defaults to a Long object type. |
enums | String | The type to use to represent enum values. Defaults to the numeric value. |
bytes | Array or String | The type to use to represent bytes values. Defaults to Buffer . |
defaults | true or false | Set default values on output objects. Defaults to false . |
arrays | true or false | Set empty arrays for missing array values even if defaults is false Defaults to false . |
objects | true or false | Set empty objects for missing object values even if defaults is false Defaults to false . |
oneofs | true or false | Set virtual oneof properties to the present field's name. Defaults to false . |
includeDirs | An array of strings | A list of search paths for imported .proto files. |
The following options object closely approximates the existing behavior of grpc.load
:
1const options = { 2 keepCase: true, 3 longs: String, 4 enums: String, 5 defaults: true, 6 oneofs: true 7}
No vulnerabilities found.
Reason
30 commit(s) and 21 issue activity found in the last 90 days -- score normalized to 10
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 1/12 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More