Mokhtar Naamani f4cb727dec bump types and metadata npm package version | 2 лет назад | |
---|---|---|
.. | ||
doc | 2 лет назад | |
proto | 2 лет назад | |
scripts | 3 лет назад | |
src | 2 лет назад | |
test | 3 лет назад | |
.eslintignore | 3 лет назад | |
.eslintrc.js | 3 лет назад | |
.gitignore | 3 лет назад | |
.prettierignore | 3 лет назад | |
README.md | 3 лет назад | |
compile.sh | 3 лет назад | |
doc-appendix.md | 3 лет назад | |
generate-md-doc.sh | 3 лет назад | |
package.json | 2 лет назад | |
tsconfig.json | 2 лет назад |
This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in Joystream.
Documented in doc folder
For our usecase we wish to re-use same message to create and update subset of fields. For this reason we need the explicit information about wether a field has been set or not and this is only possible with proto v2.
Background: required/optional feilds are deprecated in proto v3
The custom Joystream types such as License have helper methods to construct pre-defined well known values.
Best place to look at are the tests specs
We use simple ISO_639-1 code representation for Language. useful npm package https://www.npmjs.com/package/iso-639-1
Building will compile the protofiles using protobufjs and build the library from source.
pre-requisists for generating documentation:
protoc-gen-doc to generate docs
yarn && yarn build
yarn generate-docs
yarn test