{"name":"@grpc/proto-loader","version":"0.6.0-pre10","author":{"name":"Google Inc."},"contributors":[{"name":"Michael Lumish","email":"mlumish@google.com"}],"description":"gRPC utility library for loading .proto files","homepage":"https://grpc.io/","main":"build/src/index.js","typings":"build/src/index.d.ts","scripts":{"build":"npm run compile","clean":"node -e 'require(\"rimraf\")(\"./build\", () => {})'","compile":"tsc -p .","format":"clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts","lint":"tslint -c node_modules/google-ts-style/tslint.json -p . -t codeFrame --type-check","prepare":"npm run compile","test":"gulp test","check":"gts check","fix":"gts fix","pretest":"npm run compile","posttest":"npm run check"},"repository":{"type":"git","url":"git+https://github.com/grpc/grpc-node.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/grpc/grpc-node/issues"},"bin":{"proto-loader-gen-types":"build/bin/proto-loader-gen-types.js"},"dependencies":{"@types/long":"^4.0.1","lodash.camelcase":"^4.3.0","long":"^4.0.0","protobufjs":"^6.9.0","yargs":"^15.3.1"},"devDependencies":{"@types/lodash.camelcase":"^4.3.4","@types/mkdirp":"^1.0.1","@types/mocha":"^7.0.2","@types/node":"^10.17.26","@types/yargs":"^15.0.5","clang-format":"^1.2.2","gts":"^1.1.0","rimraf":"^3.0.2","typescript":"~3.8.3"},"engines":{"node":">=6"},"readme":"# gRPC Protobuf Loader\n\nA utility package for loading `.proto` files for use with gRPC, using the latest Protobuf.js package.\nPlease refer to [protobuf.js' documentation](https://github.com/dcodeIO/protobuf.js/blob/master/README.md)\nto understands its features and limitations.\n\n## Installation\n\n```sh\nnpm install @grpc/proto-loader\n```\n\n## Usage\n\n```js\nconst protoLoader = require('@grpc/proto-loader');\nconst grpcLibrary = require('grpc');\n// OR\nconst grpcLibrary = require('@grpc/grpc-js');\n\nprotoLoader.load(protoFileName, options).then(packageDefinition => {\n  const packageObject = grpcLibrary.loadPackageDefinition(packageDefinition);\n});\n// OR\nconst packageDefinition = protoLoader.loadSync(protoFileName, options);\nconst packageObject = grpcLibrary.loadPackageDefinition(packageDefinition);\n```\n\nThe options parameter is an object that can have the following optional properties:\n\n| Field name | Valid values | Description\n|------------|--------------|------------\n| `keepCase` | `true` or `false` | Preserve field names. The default is to change them to camel case.\n| `longs` | `String` or `Number` | The type to use to represent `long` values. Defaults to a `Long` object type.\n| `enums` | `String` | The type to use to represent `enum` values. Defaults to the numeric value.\n| `bytes` | `Array` or `String` | The type to use to represent `bytes` values. Defaults to `Buffer`.\n| `defaults` | `true` or `false` | Set default values on output objects. Defaults to `false`.\n| `arrays` | `true` or `false` | Set empty arrays for missing array values even if `defaults` is `false` Defaults to `false`.\n| `objects` | `true` or `false` | Set empty objects for missing object values even if `defaults` is `false` Defaults to `false`.\n| `oneofs` | `true` or `false` | Set virtual oneof properties to the present field's name. Defaults to `false`.\n| `json` | `true` or `false` | Represent `Infinity` and `NaN` as strings in `float` fields, and automatically decode `google.protobuf.Any` values. Defaults to `false`\n| `includeDirs` | An array of strings | A list of search paths for imported `.proto` files.\n\nThe following options object closely approximates the existing behavior of `grpc.load`:\n\n```js\nconst options = {\n  keepCase: true,\n  longs: String,\n  enums: String,\n  defaults: true,\n  oneofs: true\n}\n```\n","readmeFilename":"README.md","_id":"@grpc/proto-loader@0.6.0-pre10","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-PDo5ctHwBfSjUXSnrEapjsBRTFaIgGJ0vCWm5KSKQWu5UH4b7tfT1BiNgbl/b4Wx3L5JXXXq39DTwnLF7tbwEA==","shasum":"91b56733f45658eed6946636cc6a3f1ea35b9fd9","tarball":"http://registry-npm.ywwl.com/@grpc/proto-loader/download/@grpc/proto-loader-0.6.0-pre10.tgz","fileCount":9,"unpackedSize":61403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDMCRCRA9TVsSAnZWagAAY+AP/2CNz2EoymYeD+EU6Yna\nIsrHQ6J1m5H4rTW0h/7Ec3rc4LwEKkABeL6w+DY0Pf+XZ1Xvzm+UIIm3hGYY\n+ZfR26r2bIfegD62aRSpRJ/ELjDef9GNYnK1bgAJt6U1HrhigtR9oSB3Uiy1\nqFpKVNt/wXCJ7vy6qu4KZvcYvKih03H01y5ywp9xuRYuLZloxmv0mEuTQhXp\ncTg8UfX8l7ISqVxBC2xmc6QTK4a/63ThJ4RFjGjY36bVRXua2cgwe+2vXN2a\n5rd43XuZCHtvK/B24PMQdZ19REPeOsUS4PIZhrmy7UP9buYeHKUiztxo9nBa\npXzZhli4CzUEzp+68DzIroTd7Z7CWv9VSKNwyaJZ+iDBjyoknKB+BNV/6987\nEHh4wUExge5GskAGDubDtpHUmKA/axoeuypbrcYTaCwrLEFE+BssDL93FfLQ\n92yH+hBtNAnKqxYqp8O1DLWex4rtUiwcJZUGU5rSAyczJ2+rKWxDbeQRyaiw\nt7yK/43cOF+KWnVTGT/zLBAIfwyrAk888uXFaECv7699lLx7TvQwGd/TptG6\na8FqE5EZ8Ze5p0j0jv4cBejfvYJsSy7TBvUfQ1vptzc+nApe+mqKx/ucmxAb\nigU5uNVo8gWaaeQb6vrNPxs9gKEhPs3TO00u+x9rq5VdrXTau2btCHY+SnIS\nCtws\r\n=WmLz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0ke/YhC2jSuHaBrMDOD8jSPaOoHAfhXjG/jGwqx/e1AiB16iZ/dkfOxfbyKUI3yKRTA0B2fxJrJMr3cDumYN1uEQ=="}],"size":14134,"noattachment":false,"key":"/@grpc/proto-loader/-/@grpc/proto-loader-0.6.0-pre10.tgz"},"maintainers":[{"name":"grpc-packages","email":"grpc-packages@google.com"},{"name":"murgatroid99","email":"mlumish@google.com"},{"name":"nicolasnoble","email":"nicolas@nobis-crew.org"}],"_npmUser":{"name":"murgatroid99","email":"mlumish@google.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/proto-loader_0.6.0-pre10_1594671248933_0.8859161460757898"},"_hasShrinkwrap":false,"publish_time":1594671249063,"_cnpm_publish_time":1594671249063,"dist-tags":{"generator-draft":"0.6.0-pre18","latest":"0.8.1","prerelease":"0.7.9-pre.1"}}