@sensio/cli v0.4.8-alpha.4
Sensio Network JS SDK
Dev friendly blockchain sdk for Sensio Network. š©āš»ššØāš»
This is the monorepo for ALL Sensio packages. This includes following list:
- Definitions of operations located under
<root>/operations
- Sensio Network API located under
<root>/sdk/api
- Sensio Network CLI located under
<root>/sdk/cli
- Sensio Network Types located under
<root>/sdk/types
- Sensio React hooks and components located under
<root>/react
Development
We are using VSCod as our main IDE and for that reason we are including the recommended extensions and settings that will help you get started. Feel free to change the theme (We all love the Noctis š and we really hope you will too)
The structure is following:
⯠tree -I '.vscode|.git|node_modules|coverage' -d -L 2 .
.
āāā examples
āĀ Ā āāā demo
āĀ Ā āāā woss
āāā misc
āĀ Ā āāā benchmark
āāā operations
āĀ Ā āāā snCid
āĀ Ā āāā snFile
āĀ Ā āāā snInput
āĀ Ā āāā snJsonDec
āĀ Ā āāā snJsonEnc
āĀ Ā āāā snMatchAll
āĀ Ā āāā snMatchNone
āĀ Ā āāā snMultihash
āĀ Ā āāā snSplit
āāā react
āāā sdk
āāā api
āāā cli
āāā types
examples
The place where WIP, PoC and some examples are located. Good place to see very unstable code and maybe future implementations.
misc
Pretty much everything that has no special place, like benchmarking.
operations
HEre you can find Javascript implementation of Sensio Operation. To find out more about Sensio Operation please visit the Operation wiki page
rect
React specific hooks and components.
sdk/api
Main entry point for communicating with Sensio Network. For more info please read the API README.md
sdk/cli
Generic CLI for Sensio Network. Current use is limited only to creation default operations.
sdk/types
Sensio Network has decent amount of custom types, both on the chain and mapped types for Typescript. All these types, interfaces and api augmentations can be found here. This is the repo which should be the first to install when making new implementation of the operation.
Linting
We are using standard JS for formatting and each package contains it and it is in charge of formatting its own code. We are using Husky to make sure that code is formatted properly before we commit anything. In real life you don't have to run this command at all, but it's good to know that it exists.
# this will fix the sdk and operations source files
yarn std
Building && Publishing
This repo is a monorepo for all our packages that are related to the Sensio Network SDK. Each package is in charge of its own build process, which we are tying to standardize.
Sometimes is good to see will the packages build BEFORE the publishing, to do so, run the command below and if it passes then all builds are successful and you should be ready for publishing.
This will build ALL the packages, operations and sdk.
Under the hood lerna will run the build
task in every possible package in this repo.
# this will fix the sdk and operations source files
yarn build
Lerna is awesome when it comes to the publishing BUT it really doesn't like the fact that you are not logged in to the npm. Follow these steps to publish the package:
- run
yarn build
to build ALL packages, even if they are not changed - log in to npm using
npm login
- check that you are logged in using
npm whoami
. you should see your username if not, repeat step 1 - run
yarn lerna publish
, this will run the lerna publish which will determine changed packages - select the package versions, if it's a small change in the code, use
minor
version, if it is the added functionality usepatch
version - repeat 5
- publish
Creating the operation
At the moment we are using the CLI to generate scaffold operation folder under operations/
with decent defaults. One thing that needs manual input is making sure that operations/tsconfig.json
and ./tsconfig.json
are correctly set up.
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago