Bucketeer is an open-source platform created by CyberAgent to help teams make better decisions, reduce deployment lead time and release risk through feature flags. Bucketeer offers advanced features like dark launches and staged rollouts that perform limited releases based on user attributes, devices, and other segments.
Getting started using Bucketeer SDK.
See our documentation to install the SDK.
We would ❤️ for you to contribute to Bucketeer and help improve it! Anyone can use and enjoy it!
Please follow our contribution guide here.
Before building the example, please follow the following steps.
- Ensure that you have the
yarninstalled. - Configure the
apiEndpoint(with URL scheme likehttps://) and theapiKeyinfo in the index.ts. - Move to the example directory
cd example. - Install dependencies
make init.
make startIf you want to use a published SDK instead of a local one, replace the line where it imports the library in the example code
Install the prerequisite tools.
Please look at the .nvmrc file to check the node version.
nvm usemake initmake fmtmake lint
make type-checkmake buildmake testSet the required secrets for E2E tests using environment variables or a .env file in the project root. The following variables are required, except for SCHEME, which is optional and defaults to https:
API_ENDPOINT(e.g. api.example.com, without scheme)SCHEME(optional; e.g. https or http, defaults to https)CLIENT_API_KEY(Client SDK role API key)SERVER_API_KEY(Server SDK role API key for testing with local evaluate)
You can create a .env file in the project root for local development:
API_ENDPOINT=your.api.endpoint
SCHEME=https
CLIENT_API_KEY=your-client-key
SERVER_API_KEY=your-server-key
The E2E test config will automatically load these values.
Then run:
make e2eAdd the version field to package.json, then run the following command.
export NPM_TOKEN=<YOUR_NPM_TOKEN>
make publish- Write tests in the
src/__tests__directory. The test files should following snake_case naming convention. Its differ from the library code which uses camelCase. - Use
avaas the test runner. You can find the configuration in the ava.config.mjs file. - Run all tests using
make testcommand. - Run single test using
make test-single <path-to-test-file>command.
Note: The publishing process is automated using GitHub Actionshttps://github.com/bucketeer-io/node-server-sdk/blob/master/.github/workflows/release.yml to publish it when the released tag is created.