Installations
npm install grpc-alt-proto-loader
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6
Node Version
10.4.1
NPM Version
6.1.0
Releases
@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
Contributors
Languages
TypeScript (85.12%)
JavaScript (11.97%)
C++ (1.44%)
Shell (0.97%)
CMake (0.14%)
Batchfile (0.13%)
Dockerfile (0.13%)
PowerShell (0.11%)
Developer
Download Statistics
Total Downloads
2,814
Last Day
1
Last Week
1
Last Month
6
Last Year
94
GitHub Statistics
4,530 Stars
4,892 Commits
653 Forks
73 Watching
50 Branches
181 Contributors
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
2,814
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
4
Dev Dependencies
3
gRPC Protobuf Loader
A utility package for loading .proto
files for use with gRPC, using the latest Protobuf.js package.
Installation
1npm install @grpc/proto-loader
Usage
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
- Info: topLevel 'contents' permission set to 'read': .github/workflows/grpc-tools-build.yml:12
- Info: no jobLevel write permissions found
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: SECURITY.md:1
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
- Warn: no fuzzer integrations found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/grpc-tools-build.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/grpc/grpc-node/grpc-tools-build.yml/master?enable=pin
- Warn: containerImage not pinned by hash: packages/grpc-js-xds/interop/Dockerfile:19
- Warn: containerImage not pinned by hash: packages/grpc-js-xds/interop/Dockerfile:32: pin your Docker image by updating gcr.io/distroless/nodejs18-debian11:latest to gcr.io/distroless/nodejs18-debian11:latest@sha256:c3627dd28e9e031c6b562eb7cb77c324b9c4635a1c05eaf8e89d2eaa364fa6f0
- Warn: containerImage not pinned by hash: tools/release/native/Dockerfile:6: pin your Docker image by updating ubuntu:22.04 to ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/interop/Dockerfile:26
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/interop/Dockerfile:28
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/interop/Dockerfile:30
- Warn: downloadThenRun not pinned by hash: tools/release/native/Dockerfile:23
- Warn: downloadThenRun not pinned by hash: packages/grpc-js-xds/scripts/xds.sh:22
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/scripts/xds.sh:38
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/scripts/xds.sh:41
- Warn: npmCommand not pinned by hash: packages/grpc-js-xds/scripts/xds.sh:46
- Warn: downloadThenRun not pinned by hash: run-tests.sh:20
- Warn: npmCommand not pinned by hash: run-tests.sh:42
- Warn: npmCommand not pinned by hash: run-tests.sh:67
- Warn: npmCommand not pinned by hash: setup_interop.sh:16
- Warn: npmCommand not pinned by hash: setup_interop.sh:17
- Warn: npmCommand not pinned by hash: setup_interop_purejs.sh:16
- Warn: npmCommand not pinned by hash: setup_interop_purejs.sh:17
- Warn: npmCommand not pinned by hash: test/client-libraries-integration/init.sh:16
- Warn: npmCommand not pinned by hash: test/client-libraries-integration/init.sh:23
- Warn: npmCommand not pinned by hash: test/distrib/run-distrib-test.sh:29
- Warn: npmCommand not pinned by hash: test/distrib/run-distrib-test.sh:30
- Warn: npmCommand not pinned by hash: test/distrib/run-distrib-test.sh:31
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 3 containerImage dependencies pinned
- Info: 0 out of 17 npmCommand dependencies pinned
- Info: 0 out of 3 downloadThenRun dependencies pinned
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
6.5
/10
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