/packages
:
contracts
: Smart contracts for Data Unions 2.0 and 3.0client
: Data Union clientthegraph-subgraph
: TheGraph subgraph for Data Union smart contractsjoin-server
: Base implementation of a HTTP server for requiring Data Union members to fulfil certain requirements in order to join a Data Uniondefault-join-server
: Simple HTTP server that adds members who know a secret password, and gives them publish rights to the DU's streams. Hosted by the DU DAO at
Monorepo is managed using npm workspaces. Integration tests are run in Streamr docker dev environment and its configs are found in the @streamr/config NPM package.
Important: Do not use npm ci
or npm install
directly in the sub-package directories, only in the root directory.
nvm use
The go to command for most use cases.
To install all required dependencies and build all sub-packages (linking sub-packages together as needed):
# from top level
npm run bootstrap
To install the required dependencies and build a specific sub-package:
# from top level
npm run bootstrap-pkg --package=$PACKAGE_NAME
To only install required dependencies and link sub-packages together (and skip build phase):
# from top level
npm ci
To build all sub-packages:
# from top level
npm run build
To build a specific sub-package:
# from top level
npm run build --workspace=$PACKAGE_NAME
To clear all caches and remove the dist
directory from each sub-package:
# from top level
npm run clean-dist
To removes all caches, built files, and node_modules
of each sub-package, and the
top-level node_modules
:
# from top level
npm run clean
Manually add the entry to the package.json
of the sub-package and
run npm run bootstrap-pkg $PACKAGE_NAME
.
Alternatively:
npm install some-dependency --workspace=$PACKAGE_NAME
Check which sub-packages are currently being symlinked.
# from top level
npm run versions
This lists sub-packages & their versions on the left, linked
sub-packages are columns. If the package on the left links to the package
in the column, it shows a checkmark & the semver range, otherwise it
shows the mismatched semver range and prints a warning at the end. It
prints the version ranges so you can double-check that they're formatted
as you expect e.g. ^X.Y.Z
vs X.Y.Z
Install dependencies:
npm ci
Build client:
cd packages/client
npm run build
Run tests:
npm run test