This repository contains the Protobuf definitions used in the Kodus platform. The definitions are used to autogenerate code for various languages and frameworks.
You can also use the provided Docker image to run the code generation process without installing the tools locally.
- Ensure you have the required tools installed.
- Clone the repository:
git clone [email protected]:kodustech/kodus-proto.git cd kodus-proto
- Install dependencies:
yarn install
- Run the following command to generate the code:
or
yarn prepack
yarn docker:prepack
- The generated code will be available in the
gen
directory.
To use the package in your local development, before publishing, you can link the package locally:
- Run the following command in the root of the repository:
yarn link
- In your project where you want to use the package, run:
yarn link @kodus/kodus-proto
- This will create a symlink to the local version of the package, allowing you to use it as if it were installed from npm.
-
Commit all changes to the repository.
-
Update the version in
package.json
.Can be done manually or using the following command:
yarn version
Alternatively, use semantic versioning commands:
yarn version --patch # For patch updates X.Y.Z -> X.Y.Z+1 (e.g X.Y.0 -> X.Y.1 ; X.Y.1 -> X.Y.2) yarn version --minor # For minor updates X.Y.Z -> X.Y+1.0 (e.g X.1.0 -> X.2.0 ; X.2.3 -> X.3.0) yarn version --major # For major updates X.Y.Z -> X+1.0.0 (e.g 1.0.0 -> 2.0.0 ; 2.3.4 -> 3.0.0)
-
Commit the changes to
package.json
, if not done automatically. -
Push the changes to the repository:
-
Publish the package to npm
yarn publish --access public --tag latest # for latest version yarn publish --access public --tag next # for next version yarn publish --access public --tag beta # for beta version yarn publish --access public --tag alpha # for alpha version yarn publish --access public --tag dev # for dev version