{"_id":"@blocto/google-protobuf","_rev":"5-6391eecc6e6c4aea9974a68f85687224","name":"@blocto/google-protobuf","dist-tags":{"latest":"3.19.1"},"versions":{"3.19.1":{"name":"@blocto/google-protobuf","version":"3.19.1","description":"Protocol Buffers for JavaScript","main":"google-protobuf.js","dependencies":{},"devDependencies":{"glob":"~7.1.4","google-closure-compiler":"~20190819.0.0","google-closure-deps":"^20210406.0.0","google-closure-library":"~20190819.0.0","gulp":"~4.0.2","jasmine":"~3.4.0"},"scripts":{"test":"node ./node_modules/gulp/bin/gulp.js test"},"repository":{"type":"git","url":"https://github.com/protocolbuffers/protobuf/tree/master/js"},"author":{"name":"Google Protocol Buffers Team"},"license":"BSD-3-Clause","_id":"@blocto/google-protobuf@3.19.1","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-D7exTVYs9oQMF5FiasJV4zYlEVgwdoHFprdpw1lofRDZLw57ZYM9q8qxm/aKpMjdv3vsMN9DjfcnPrCmMZTbTA==","shasum":"e3e589184350b450222f20f77db1138b51aa4e7a","tarball":"https://registry.npmjs.org/@blocto/google-protobuf/-/google-protobuf-3.19.1.tgz","fileCount":15,"unpackedSize":795075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpxe5CRA9TVsSAnZWagAALo4P/RrwK2l/DaxFiXlnghCw\no2PyE4vhY1oJ3PcveI98aD3CFxMyxh4k1UWPdT1ESyQW1rV5RaBUtKpv6DLe\nMMvOty90mMbZ0VTn1bwF6vffe/qwajx0FFq+e9ACdGA883UvjHPuxaBwiKtC\n2y03X0FhrOwpWGb6r8Q/UpzUtChbKYCUs0BdDrV5B6PVk3M0PcYUSGK8TxvH\n3x+fiHFPcxWnoFai3AfuhMZND+hBtnKGtTc1wdATaDwa5IIIW9vcaUvhax9Q\nIdPBbzfbbfIi6sWBZYh+uuMwXKnJrBk6IhIfzZVqgo+UNxwWsi4wL82I/Fw0\nbvxy4cSnrxPX67NMaJ1zqRSpf7Q0BacAQl0tViEaGJhzqrWhDijZUBPsNkwI\nafJG/Ox1DsT/2MhfdulaBED/b0CeWQTVQA4Xj8/E9FQvKSGfv4mHk86Nh/f9\nv3+4oiMIPfz9SIqpGJ51yWUobAM5c/LzfFKXjC7FokwWgqirXt1kxkK6d1ZN\ngbUNVmFS8r2iN7ZZXwJflYhTKLmZ2+TCVasPi+bXg7uF/5kEoO0upiYGL53M\nWLyqoj/EdsA257HXo/Jz4fLX4F6W6BOFnCunXVz2G+8tPGAlTZBYoQ8aQUj2\njq/S8XJuqF1XIY0nelrpUfZYkNS+yDBgrjH0TiZk2H8YsKWIdQs34+2ZYr0y\np7ma\r\n=vh8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGemrfowTfbU3taK8XL2vSmJ7qaSjmuXuGp+WAOMyiYRAiAwrFJF7AVHAYf7xqAWpxZwybhNyv8nR98lVLnLADtMRw=="}]},"_npmUser":{"name":"boczeratul","email":"boczeratul@gmail.com"},"directories":{},"maintainers":[{"name":"scottphc","email":"scott.ph.chou@gmail.com"},{"name":"boczeratul","email":"boczeratul@gmail.com"},{"name":"yang.lin","email":"yang@portto.io"},{"name":"chiakic","email":"akiakira02@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/google-protobuf_3.19.1_1638340537057_0.9658904514084838"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-01T06:35:37.004Z","3.19.1":"2021-12-01T06:35:37.181Z","modified":"2023-11-20T11:38:49.411Z"},"maintainers":[{"email":"q20274982@gmail.com","name":"q20274982"},{"email":"pan831225@gmail.com","name":"sanyu1225"},{"email":"lilynnchi@gmail.com","name":"mordochi"},{"email":"scott.ph.chou@gmail.com","name":"scottphc"},{"email":"boczeratul@gmail.com","name":"boczeratul"},{"email":"akiakira02@gmail.com","name":"chiakic"}],"description":"Protocol Buffers for JavaScript","repository":{"type":"git","url":"https://github.com/protocolbuffers/protobuf/tree/master/js"},"author":{"name":"Google Protocol Buffers Team"},"license":"BSD-3-Clause","readme":"Protocol Buffers - Google's data interchange format\n===================================================\n\nCopyright 2008 Google Inc.\n\nThis directory contains the JavaScript Protocol Buffers runtime library.\n\nThe library is currently compatible with:\n\n1. CommonJS-style imports (eg. `var protos = require('my-protos');`)\n2. Closure-style imports (eg. `goog.require('my.package.MyProto');`)\n\nSupport for ES6-style imports is not implemented yet.  Browsers can\nbe supported by using Browserify, webpack, Closure Compiler, etc. to\nresolve imports at compile time.\n\nTo use Protocol Buffers with JavaScript, you need two main components:\n\n1. The protobuf runtime library.  You can install this with\n   `npm install google-protobuf`, or use the files in this directory.\n    If npm is not being used, as of 3.3.0, the files needed are located in binary subdirectory;\n    arith.js, constants.js, decoder.js, encoder.js, map.js, message.js, reader.js, utils.js, writer.js\n2. The Protocol Compiler `protoc`.  This translates `.proto` files\n   into `.js` files.  The compiler is not currently available via\n   npm, but you can download a pre-built binary\n   [on GitHub](https://github.com/protocolbuffers/protobuf/releases)\n   (look for the `protoc-*.zip` files under **Downloads**).\n\n\nSetup\n=====\n\nFirst, obtain the Protocol Compiler.  The easiest way is to download\na pre-built binary from [https://github.com/protocolbuffers/protobuf/releases](https://github.com/protocolbuffers/protobuf/releases).\n\nIf you want, you can compile `protoc` from source instead.  To do this\nfollow the instructions in [the top-level\nREADME](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md).\n\nOnce you have `protoc` compiled, you can run the tests provided along with our project to examine whether it can run successfully. In order to do this, you should download the Protocol Buffer source code from the release page with the link above. Then extract the source code and navigate to the folder named `js` containing a `package.json` file and a series of test files. In this folder, you can run the commands below to run the tests automatically.\n\n    $ npm install\n    $ npm test\n\n    # If your protoc is somewhere else than ../src/protoc, instead do this.\n    # But make sure your protoc is the same version as this (or compatible)!\n    $ PROTOC=/usr/local/bin/protoc npm test\n\nThis will run two separate copies of the tests: one that uses\nClosure Compiler style imports and one that uses CommonJS imports.\nYou can see all the CommonJS files in `commonjs_out/`.\nIf all of these tests pass, you know you have a working setup.\n\n\nUsing Protocol Buffers in your own project\n==========================================\n\nTo use Protocol Buffers in your own project, you need to integrate\nthe Protocol Compiler into your build system.  The details are a\nlittle different depending on whether you are using Closure imports\nor CommonJS imports:\n\nClosure Imports\n---------------\n\nIf you want to use Closure imports, your build should run a command\nlike this:\n\n    $ protoc --js_out=library=myproto_libs,binary:. messages.proto base.proto\n\nFor Closure imports, `protoc` will generate a single output file\n(`myproto_libs.js` in this example).  The generated file will `goog.provide()`\nall of the types defined in your .proto files.  For example, for the unit\ntests the generated files contain many `goog.provide` statements like:\n\n    goog.provide('proto.google.protobuf.DescriptorProto');\n    goog.provide('proto.google.protobuf.DescriptorProto.ExtensionRange');\n    goog.provide('proto.google.protobuf.DescriptorProto.ReservedRange');\n    goog.provide('proto.google.protobuf.EnumDescriptorProto');\n    goog.provide('proto.google.protobuf.EnumOptions');\n\nThe generated code will also `goog.require()` many types in the core library,\nand they will require many types in the Google Closure library.  So make sure\nthat your `goog.provide()` / `goog.require()` setup can find all of your\ngenerated code, the core library `.js` files in this directory, and the\nGoogle Closure library itself.\n\nOnce you've done this, you should be able to import your types with\nstatements like:\n\n    goog.require('proto.my.package.MyMessage');\n\n    var message = proto.my.package.MyMessage();\n\nIf unfamiliar with Closure or its compiler, consider reviewing\n[Closure documentation](https://developers.google.com/closure/library).\n\nCommonJS imports\n----------------\n\nIf you want to use CommonJS imports, your build should run a command\nlike this:\n\n    $ protoc --js_out=import_style=commonjs,binary:. messages.proto base.proto\n\nFor CommonJS imports, `protoc` will spit out one file per input file\n(so `messages_pb.js` and `base_pb.js` in this example).  The generated\ncode will depend on the core runtime, which should be in a file called\n`google-protobuf.js`.  If you are installing from `npm`, this file should\nalready be built and available.  If you are running from GitHub, you need\nto build it first by running:\n\n    $ gulp dist\n\nOnce you've done this, you should be able to import your types with\nstatements like:\n\n    var messages = require('./messages_pb');\n\n    var message = new messages.MyMessage();\n\nThe `--js_out` flag\n-------------------\n\nThe syntax of the `--js_out` flag is:\n\n    --js_out=[OPTIONS:]output_dir\n\nWhere `OPTIONS` are separated by commas.  Options are either `opt=val` or\njust `opt` (for options that don't take a value).  The available options\nare specified and documented in the `GeneratorOptions` struct in\n[src/google/protobuf/compiler/js/js_generator.h](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/js/js_generator.h#L53).\n\nSome examples:\n\n- `--js_out=library=myprotos_lib.js,binary:.`: this contains the options\n  `library=myprotos.lib.js` and `binary` and outputs to the current directory.\n  The `import_style` option is left to the default, which is `closure`.\n- `--js_out=import_style=commonjs,binary:protos`: this contains the options\n  `import_style=commonjs` and `binary` and outputs to the directory `protos`.\n  `import_style=commonjs_strict` doesn't expose the output on the global scope.\n\nAPI\n===\n\nThe API is not well-documented yet.  Here is a quick example to give you an\nidea of how the library generally works:\n\n    var message = new MyMessage();\n\n    message.setName(\"John Doe\");\n    message.setAge(25);\n    message.setPhoneNumbers([\"800-555-1212\", \"800-555-0000\"]);\n\n    // Serializes to a UInt8Array.\n    var bytes = message.serializeBinary();\n\n    var message2 = MyMessage.deserializeBinary(bytes);\n\nFor more examples, see the tests.  You can also look at the generated code\nto see what methods are defined for your generated messages.\n","readmeFilename":"README.md"}