Compare commits

..

No commits in common. "main" and "openfeature-v0.0.2" have entirely different histories.

223 changed files with 31224 additions and 16398 deletions

View File

@ -4,65 +4,32 @@
##
###############################################
# Options: true, false
NEW_WELCOME_MESSAGE=false
# Options: recursive, memo, loop, binet, default
FIB_ALGO=default
###############################################
##
## Feature Flag SDK keys (server)
##
###############################################
# Options: {000000-FFFFFF}
HEX_COLOR=000000
# Split IO server-side API key
SPLIT_KEY=
###############################################
##
## Feature Flag SDK keys
##
###############################################
# CloudBees App Key
CLOUDBEES_APP_KEY=
# LaunchDarkly SDK Key
LD_KEY=
# Flagsmith Environment key (v2)
# Flagsmith Environment key
FLAGSMITH_ENV_KEY=
# Harness SDK Key
HARNESS_KEY=
# ConfigCat SDK Key
CONFIGCAT_SDK_KEY=
###############################################
##
## Feature Flag SDK keys (web)
##
###############################################
# LaunchDarkly SDK Key
LD_KEY=
# Split IO server-side API key
SPLIT_KEY_WEB=
# CloudBees App Key
CLOUDBEES_APP_KEY_WEB=
# LaunchDarkly SDK Key
LD_KEY_WEB=
# Flagsmith Environment key (v2)
FLAGSMITH_ENV_KEY_WEB=
# Harness SDK Key
HARNESS_KEY_WEB=
# The domain name or IP address of flagd
# @default localhost
FLAGD_HOST_WEB=
# The port at which the flagd gRPC service is exposed
# @default 8013
FLAGD_PORT_WEB=
# Determines if TLS (https) should be used
# @default false
FLAGD_TLS_WEB=
# ConfigCat SDK Key
CONFIGCAT_SDK_KEY_WEB=
SPLIT_KEY=

View File

@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
@ -14,15 +14,7 @@
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": [
"*"
]
},
{
"sourceTag": "shared",
"allowedExternalImports": [
"@openfeature/core"
]
"onlyDependOnLibsWithTags": ["*"]
}
]
}
@ -31,12 +23,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]

View File

@ -1,34 +1,21 @@
name: CI
on:
push:
branches:
- 'main'
- 'renovate/**'
branches: ["main"]
pull_request:
branches:
- 'main'
merge_group:
branches: ["main"]
jobs:
main:
runs-on: equinix-4cpu-16gb
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@v2
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 18
cache: 'npm'
# Mark your git directory as safe for self-hosted runners
# https://github.com/nrwl/nx-set-shas?tab=readme-ov-file#self-hosted-runners
- name: Set Directory as Safe
run: |
git config --add safe.directory "$GITHUB_WORKSPACE"
shell: bash
- uses: nrwl/nx-set-shas@e2e6dc8bce4b0387a05eb687735c39c41580b792 # v4
- uses: nrwl/nx-set-shas@v2
- run: npm ci
- run: npx nx workspace-lint
- run: if ! npx nx format:check ; then echo "Format check failed. Please run 'npx nx format:write'."; fi
- run: npx nx affected --target=lint --parallel=3
- run: npx nx affected --target=build --parallel=3 --ci
- run: npx nx affected --target=test --parallel=3 --ci --code-coverage

View File

@ -1,15 +0,0 @@
# based on https://github.com/onnx/onnx/blob/main/.github/workflows/dco_merge_group.yml
name: DCO
on:
merge_group:
permissions: # set top-level default permissions as security best practice
contents: read # Check https://github.com/ossf/scorecard/blob/7ce8609469289d5f3b1bf5ee3122f42b4e3054fb/docs/checks.md#token-permissions
jobs:
DCO:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- run: echo "dummy DCO workflow (it won't run any check actually) to trigger by merge_group in order to enable merge queue"

View File

@ -12,6 +12,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -13,13 +13,12 @@ jobs:
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>"
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
@ -30,12 +29,12 @@ jobs:
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
ref: ${{ steps.release.outputs.tag_name }}
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@ -43,50 +42,29 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3
with:
platforms: linux/amd64,linux/arm64
- name: Build App Container
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4
- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./packages/app/Dockerfile
push: true
provenance: false
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}-app:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}-app:${{ needs.release-please.outputs.release_tag_name }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.meta.outputs.tags }}
COMMIT=${{ github.sha }}
DATE=${{ steps.date.outputs.date }}
- name: Build Fibonacci Service Container
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4
with:
context: .
file: ./packages/fibonacci-service/Dockerfile
push: true
provenance: false
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}-fib-service:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}-fib-service:${{ needs.release-please.outputs.release_tag_name }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release-please.outputs.release_tag_name }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.meta.outputs.tags }}

7
.gitignore vendored
View File

@ -33,7 +33,6 @@ npm-debug.log
yarn-error.log
testem.log
/typings
.nx
# System Files
.DS_Store
@ -41,9 +40,3 @@ Thumbs.db
# Environment vars
.env
# yalc stuff
.yalc
yalc.lock
config/flipt/flipt.db

View File

@ -2,4 +2,3 @@
/dist
/coverage
/.nx

View File

@ -1,3 +1,3 @@
{
".": "0.16.0"
".": "0.0.2"
}

View File

@ -1,703 +1,5 @@
# Changelog
## [0.16.0](https://github.com/open-feature/playground/compare/v0.15.2...v0.16.0) (2024-05-22)
### 🐛 Bug Fixes
* **deps:** update dependency flagsmith-nodejs to v3.3.0 ([d4a4468](https://github.com/open-feature/playground/commit/d4a446886a908451afd3c2d415e2c45a0895b95c))
### ✨ New Features
* add Flipt to playground ([#293](https://github.com/open-feature/playground/issues/293)) ([ab99a8e](https://github.com/open-feature/playground/commit/ab99a8e5bc8e788c053bc675b8ff442696031d76))
## [0.15.2](https://github.com/open-feature/playground/compare/v0.15.1...v0.15.2) (2024-04-21)
### 🐛 Bug Fixes
* **deps:** update dependency @openfeature/flagd-web-provider to ^0.7.0 ([#288](https://github.com/open-feature/playground/issues/288)) ([b26b52d](https://github.com/open-feature/playground/commit/b26b52dbbb38eaa1d1ff2090d49da70cd4e1d93b))
* goff ofrep provider in UI ([#289](https://github.com/open-feature/playground/issues/289)) ([3ed5edd](https://github.com/open-feature/playground/commit/3ed5edd5bfd5cc164d5316463e4c6910120520e3))
## [0.15.1](https://github.com/open-feature/playground/compare/v0.15.0...v0.15.1) (2024-04-21)
### 🐛 Bug Fixes
* **deps:** update dependency @openfeature/flagd-provider to ^0.13.0 ([#286](https://github.com/open-feature/playground/issues/286)) ([7426774](https://github.com/open-feature/playground/commit/7426774c5f6ede5c96b1d0234a21e3819ece3ed6))
* **deps:** update dependency @openfeature/web-sdk to v1.0.3 ([73937f2](https://github.com/open-feature/playground/commit/73937f240044185487c948843c482c404cd0b55d))
* **deps:** update nest monorepo to v10.3.8 ([8c3869c](https://github.com/open-feature/playground/commit/8c3869c588624877150ccbb56aeb79fdf851a0ba))
* make goff url for web configurable ([#287](https://github.com/open-feature/playground/issues/287)) ([3ccc862](https://github.com/open-feature/playground/commit/3ccc8620996d747c95388338f03990eb906d2191))
### 🧹 Chore
* **deps:** update actions/checkout action to v4 ([86b10b4](https://github.com/open-feature/playground/commit/86b10b443d9944e1fef19f2da31f6962688b4eeb))
* **deps:** update dependency core-js to v3.37.0 ([13d8c58](https://github.com/open-feature/playground/commit/13d8c583ce4175cb0faa7144ac92f18447228784))
* **deps:** update dependency typescript to v5.4.5 ([017a037](https://github.com/open-feature/playground/commit/017a037c6a70224375ed03801412ba0ea175c53b))
* **deps:** update dependency webpack to v5.91.0 ([4f08be3](https://github.com/open-feature/playground/commit/4f08be3e8be365614dcd8f6407d4e68ac0c6d072))
* **deps:** update eslint ([12855bb](https://github.com/open-feature/playground/commit/12855bb495fc7d627fb78f7b6607c0918ac16e0f))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.10.1 ([42b13ef](https://github.com/open-feature/playground/commit/42b13efcc60186bebdcd3a243cff6e57c1938e86))
* **deps:** update node.js to v20.12.2 ([492700d](https://github.com/open-feature/playground/commit/492700ddeebd46b3004bbc8e1b697adbed4323ca))
* **deps:** update nrwl monorepo to v17.3.2 ([5203862](https://github.com/open-feature/playground/commit/52038627f812ebcfed754f021b8eb5e565a8abf6))
* **deps:** update prom/prometheus docker tag to v2.51.2 ([a1d37dc](https://github.com/open-feature/playground/commit/a1d37dca618ee0630c2655eebd1e56637d13ae33))
* **deps:** update thomaspoignant/go-feature-flag docker tag to v1.26.0 ([854cf8a](https://github.com/open-feature/playground/commit/854cf8a7d882545014228b8617fe6dd80e44237d))
* **deps:** update types ([4e702be](https://github.com/open-feature/playground/commit/4e702be79513bf17505bb2f2b136510273c614c1))
## [0.15.0](https://github.com/open-feature/playground/compare/v0.14.0...v0.15.0) (2024-04-16)
### 🐛 Bug Fixes
* **deps:** update dependency express to v4.19.2 [security] ([4c41fb9](https://github.com/open-feature/playground/commit/4c41fb9614886e1f34f74265a2eca1e340c7ea01))
### ✨ New Features
* add OFREP and update dependencies ([#280](https://github.com/open-feature/playground/issues/280)) ([e25a169](https://github.com/open-feature/playground/commit/e25a169c3c87138d8e1def37cbf0f3ef88fa0f71))
### 🧹 Chore
* **deps:** update dependency @mui/material to v5.15.10 ([129402c](https://github.com/open-feature/playground/commit/129402c94fa6dad8f9e9939540feac0f8ca656df))
* **deps:** update dependency core-js to v3.35.1 ([0170cfd](https://github.com/open-feature/playground/commit/0170cfdc0579ed40dabf0de444a2eb9370e4aa50))
* **deps:** update dependency ts-jest to v29.1.2 ([7aa6dc6](https://github.com/open-feature/playground/commit/7aa6dc6de26c360971f0b3d6b68859fa5df780d5))
* **deps:** update eslint ([8a15364](https://github.com/open-feature/playground/commit/8a15364bd7107d347579e3b3014fd2ed906b9ea6))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.8.1 ([be8778e](https://github.com/open-feature/playground/commit/be8778e929ef0198e1f93ed5ecd4f18fdc269a1d))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.8.2 ([5c1c758](https://github.com/open-feature/playground/commit/5c1c758cdaa560ddd66e89f7d81db813fa003bb0))
* **deps:** update jaegertracing/all-in-one docker tag to v1.53.0 ([489edaa](https://github.com/open-feature/playground/commit/489edaabd6007b1dd0a3b05a19eefa2191e2fa2b))
* **deps:** update node.js to v20.11.0 ([1655635](https://github.com/open-feature/playground/commit/1655635fb5f023f832a8a3d1bfb8796927924df0))
* **deps:** update prom/prometheus docker tag to v2.49.1 ([5da9932](https://github.com/open-feature/playground/commit/5da9932b49d2c28183006897766952eec2a53589))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.21.0 ([cd44fb8](https://github.com/open-feature/playground/commit/cd44fb81a36f2ba40d6df52452481a46e4506b49))
* **deps:** update types ([86b797e](https://github.com/open-feature/playground/commit/86b797e1d85a5cc40b356003e9635c5e9e522f4a))
* **deps:** update types ([085de92](https://github.com/open-feature/playground/commit/085de92f125e3dd7049ee419194a9b05bbebd71d))
## [0.14.0](https://github.com/open-feature/playground/compare/v0.13.4...v0.14.0) (2024-01-22)
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-javascript-client-sdk to v1.21.0 ([1ae889f](https://github.com/open-feature/playground/commit/1ae889fd124850177a7f578b753687961ddc911c))
* **deps:** update dependency @openfeature/open-telemetry-hooks to ^0.3.0 ([#264](https://github.com/open-feature/playground/issues/264)) ([10ec74b](https://github.com/open-feature/playground/commit/10ec74b98d9501061dec7857a2dd415387822101))
* **deps:** update dependency flagsmith-nodejs to v3 ([#226](https://github.com/open-feature/playground/issues/226)) ([ddaba6d](https://github.com/open-feature/playground/commit/ddaba6d5c6249a995314238889c95ac0e71cb4e3))
* **deps:** update dependency react-router-dom to v6.20.1 ([e233ccb](https://github.com/open-feature/playground/commit/e233ccb5943cf002ecba98a90f59c606f11f34a7))
* docker-compose.yaml image instead of build ([#274](https://github.com/open-feature/playground/issues/274)) ([2fc3ccb](https://github.com/open-feature/playground/commit/2fc3ccbe998d18c62fbf49ecac4529362233cffa))
### ✨ New Features
* client-side flags in e2e k8s demo ([#267](https://github.com/open-feature/playground/issues/267)) ([c782315](https://github.com/open-feature/playground/commit/c782315c6cc4a99554a6bf76413fde05e430681f))
* use Nest.js SDK in backend ([#273](https://github.com/open-feature/playground/issues/273)) ([d4b18d8](https://github.com/open-feature/playground/commit/d4b18d88afc38accc201329c2a5eb72e63b6f78c))
### 🧹 Chore
* **deps:** update dependency @emotion/react to v11.11.3 ([f44f35c](https://github.com/open-feature/playground/commit/f44f35c3f891c9c88f7108d22a26cdbc1acb58d7))
* **deps:** update dependency @mui/material to v5.14.20 ([8a0a90b](https://github.com/open-feature/playground/commit/8a0a90bbcb27e93d80a3d70d419f1634fa728800))
* **deps:** update dependency @mui/material to v5.15.6 ([919102d](https://github.com/open-feature/playground/commit/919102d1dd6da5b61a3fcf5360d0bcb2cd093650))
* **deps:** update dependency @types/node to v18.19.3 ([75da9ab](https://github.com/open-feature/playground/commit/75da9abd9c9168a2f2ed710add6c7304f5cb20d3))
* **deps:** update dependency core-js to v3.34.0 ([d6133d4](https://github.com/open-feature/playground/commit/d6133d440e603db039cbb63c8809137196951c3c))
* **deps:** update dependency ts-node to v10.9.2 ([fba8985](https://github.com/open-feature/playground/commit/fba89858dd4ae16d2ed6f6e8ada469706f857ebf))
* **deps:** update dependency typescript to v5.3.3 ([58e00be](https://github.com/open-feature/playground/commit/58e00bea46cbe74c458c6d80dc1f754be00fde92))
* **deps:** update eslint ([a32d0fd](https://github.com/open-feature/playground/commit/a32d0fd9deaaa5b880e12d7d652205c43827783a))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.7.2 ([424fe2f](https://github.com/open-feature/playground/commit/424fe2f36fa831c0aec2fc8971fcc78181518151))
* **deps:** update jaegertracing/all-in-one docker tag to v1.52.0 ([aa2afbe](https://github.com/open-feature/playground/commit/aa2afbe0a3424ed7be6bf108db34dec421156469))
* **deps:** update prom/prometheus docker tag to v2.48.1 ([1827862](https://github.com/open-feature/playground/commit/1827862ea61f0f07ce968f1fd13ee9efe7f17698))
* **deps:** update types ([721b4e8](https://github.com/open-feature/playground/commit/721b4e8fcc2a601e43fb9ba32894330366cbdada))
* various dep updates ([#271](https://github.com/open-feature/playground/issues/271)) ([9764184](https://github.com/open-feature/playground/commit/9764184ef0afd62e9ee2235b73c941b585a69ad5))
## [0.13.4](https://github.com/open-feature/playground/compare/v0.13.3...v0.13.4) (2023-12-01)
### 🐛 Bug Fixes
* fix docker metadat for arm image ([#265](https://github.com/open-feature/playground/issues/265)) ([1c40f4e](https://github.com/open-feature/playground/commit/1c40f4e8ca966a9914f98bc290e23c98de36726d))
## [0.13.3](https://github.com/open-feature/playground/compare/v0.13.2...v0.13.3) (2023-12-01)
### 🧹 Chore
* **deps:** update node.js to v20.10 ([bc94bcc](https://github.com/open-feature/playground/commit/bc94bcc037198a7bac5883971c47cc5b0636da2b))
* **deps:** update prom/prometheus docker tag to v2.48.0 ([e27584c](https://github.com/open-feature/playground/commit/e27584c09da9605df9e9c9ef5d1e28b920b48b6d))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.19.0 ([0358b4f](https://github.com/open-feature/playground/commit/0358b4ff1f7a9544d5e02283c2c7a68313fdac41))
* **deps:** update types ([22bb451](https://github.com/open-feature/playground/commit/22bb45182cec97e1a5add3556d4cb7a04c157723))
* support arm image ([#261](https://github.com/open-feature/playground/issues/261)) ([b895a4c](https://github.com/open-feature/playground/commit/b895a4cc1e7fb0ef675f9fabc137cca28af7cfec))
## [0.13.2](https://github.com/open-feature/playground/compare/v0.13.1...v0.13.2) (2023-11-30)
### 🐛 Bug Fixes
* fix dependencies ([#260](https://github.com/open-feature/playground/issues/260)) ([6606d14](https://github.com/open-feature/playground/commit/6606d1434e2dcce50036820674c8018dd9c43758))
### 🧹 Chore
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.7.1 ([ce9ea0e](https://github.com/open-feature/playground/commit/ce9ea0e8203d9e08fe25383aae88975d21c22193))
* **deps:** update jaegertracing/all-in-one docker tag to v1.51.0 ([60134dc](https://github.com/open-feature/playground/commit/60134dc9bbb635e119bdfe1ed9a9072d911d8238))
* migrate from js-sdk to server-sdk ([#258](https://github.com/open-feature/playground/issues/258)) ([b537c90](https://github.com/open-feature/playground/commit/b537c902aca495302672967b637db0181c08b3e4))
## [0.13.1](https://github.com/open-feature/playground/compare/v0.13.0...v0.13.1) (2023-11-30)
### 🐛 Bug Fixes
* remove workspace yaml in docker container ([#256](https://github.com/open-feature/playground/issues/256)) ([76610a6](https://github.com/open-feature/playground/commit/76610a60a2c563b5dc5aa4607544a13bac0578ea))
### 🧹 Chore
* **deps:** update dependency typescript to v5.3.2 ([55a7625](https://github.com/open-feature/playground/commit/55a762506a1b07d5f048f6cc102bd9ee9b03e925))
* **deps:** update eslint ([266ea33](https://github.com/open-feature/playground/commit/266ea3316eba47c9aeedb4811b11898dcbbf985f))
## [0.13.0](https://github.com/open-feature/playground/compare/v0.12.1...v0.13.0) (2023-11-30)
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.3.4 ([e8c6ff5](https://github.com/open-feature/playground/commit/e8c6ff5b92b3cd68342d95f17f471ccd9b678d71))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.3.7 ([8bf8d55](https://github.com/open-feature/playground/commit/8bf8d55d0fb26000b2333e986a3d814f284382f5))
* ts error regarding NodeJS.Timer in frontend ([#254](https://github.com/open-feature/playground/issues/254)) ([d4d0a38](https://github.com/open-feature/playground/commit/d4d0a38ccbe8778e27a80d31db7e94a4f9df4c68))
### ✨ New Features
* update demo app and documentation ([#255](https://github.com/open-feature/playground/issues/255)) ([eaa770d](https://github.com/open-feature/playground/commit/eaa770db6f947ff5837c888e66cd75832f9d019b))
### 🧹 Chore
* **deps:** update dependency @babel/preset-react to v7.23.3 ([7ee6e8a](https://github.com/open-feature/playground/commit/7ee6e8a278f29fa34eb0896ae71eb5579ca73957))
* **deps:** update dependency @mui/material to v5.14.13 ([fe2a386](https://github.com/open-feature/playground/commit/fe2a3864594aeab8ca8805398ee108e4060b6c41))
* **deps:** update dependency @mui/material to v5.14.17 ([c535a07](https://github.com/open-feature/playground/commit/c535a07686a4d7d88f61a8ad3727220193dd66a8))
* **deps:** update dependency core-js to v3.33.2 ([658e2dc](https://github.com/open-feature/playground/commit/658e2dcb2f5fc16ebc2beace4dd41de9365b06b5))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.6.7 ([a61a286](https://github.com/open-feature/playground/commit/a61a286010caf6da49f82288c306ef4330e603f0))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.6.8 ([5d1f9d0](https://github.com/open-feature/playground/commit/5d1f9d0ad4339246d8342063a944c8146709819b))
* **deps:** update prom/prometheus docker tag to v2.47.1 ([93ea09d](https://github.com/open-feature/playground/commit/93ea09ded66315976378d68fa0955e180cdaa668))
* **deps:** update prom/prometheus docker tag to v2.47.2 ([795ebfd](https://github.com/open-feature/playground/commit/795ebfd6871968ec3eaebbee93f285c111fff5ac))
* **deps:** update types ([18bf413](https://github.com/open-feature/playground/commit/18bf413877cf53663d7aaac32a4ee1257245eb44))
* **deps:** update types ([84d7f6c](https://github.com/open-feature/playground/commit/84d7f6c15cb95cc937346e86cec205d1f01bd48e))
* fix package-log.json ([f6a02d1](https://github.com/open-feature/playground/commit/f6a02d1f80e1767ac81556148e1611581afd6ce1))
## [0.12.1](https://github.com/open-feature/playground/compare/v0.12.0...v0.12.1) (2023-09-24)
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.3.2 ([731a00c](https://github.com/open-feature/playground/commit/731a00caa886b0ee655536267738146e66f1c98a))
* **deps:** update dependency @openfeature/js-sdk to v1.4.2 ([60a4faf](https://github.com/open-feature/playground/commit/60a4faf4488793c2dbda50cd63b78528d65bef59))
* **deps:** update dependency flagsmith to v3.19.1 ([79f0f8c](https://github.com/open-feature/playground/commit/79f0f8c193aae2831b317c76303c1b63f468f1f6))
* **deps:** update dependency launchdarkly-js-client-sdk to v3.1.4 ([90a6b4e](https://github.com/open-feature/playground/commit/90a6b4e415b5e56f2d50cb23fd25bea8829e80db))
* **deps:** update dependency launchdarkly-node-server-sdk to v7.0.3 ([6101ea9](https://github.com/open-feature/playground/commit/6101ea95e061ee08c8403dc826a97448cc76bc06))
* **deps:** update dependency rox-browser to v5.4.8 ([2807aca](https://github.com/open-feature/playground/commit/2807acaf4acb893da41ed76780cbbd206861915b))
* **deps:** update dependency rox-node to v5.4.8 ([cbf2510](https://github.com/open-feature/playground/commit/cbf2510f00ba4373f5abe9da2673f512d1a5b897))
* update jaeger config to use otlp ([#246](https://github.com/open-feature/playground/issues/246)) ([da8bd9e](https://github.com/open-feature/playground/commit/da8bd9e449ed958b09ac412ef8eab7859ab6e0fd))
### 🧹 Chore
* **deps:** update dependency @babel/preset-react to v7.22.15 ([a28ac6f](https://github.com/open-feature/playground/commit/a28ac6fc0975275c7aaa64db9cc50639df29da7b))
* **deps:** update dependency @mui/material to v5.14.10 ([c46499d](https://github.com/open-feature/playground/commit/c46499d7d73aea849c45d0adcfe132c21c266432))
* **deps:** update dependency @reactour/tour to v3.6.1 ([d0ffff6](https://github.com/open-feature/playground/commit/d0ffff6580670a51b0a23504b85963cd6e5437f7))
* **deps:** update dependency @svgr/webpack to v8.1.0 ([5328906](https://github.com/open-feature/playground/commit/5328906a229321afeb612bf8b4b36bd0910f58c6))
* **deps:** update dependency @types/node to v18.17.18 ([5f68f18](https://github.com/open-feature/playground/commit/5f68f18fd41a24ae09483cdb8e79d21b11241d4c))
* **deps:** update dependency core-js to v3.32.2 ([cd05029](https://github.com/open-feature/playground/commit/cd050291d5f28e38978a163d0132654747320606))
* **deps:** update dependency tslib to v2.6.2 ([10046ba](https://github.com/open-feature/playground/commit/10046ba1e8ee2af465f46a9784be52cd69ceb05c))
* **deps:** update types ([7ee3fcc](https://github.com/open-feature/playground/commit/7ee3fcc4ee50914045bfa1e9ce29e59b259b5133))
## [0.12.0](https://github.com/open-feature/playground/compare/v0.11.0...v0.12.0) (2023-09-19)
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-javascript-client-sdk to v1.13.0 ([940fc04](https://github.com/open-feature/playground/commit/940fc044da21ce7e44bd683b8af06d9363c82b4f))
* **deps:** update dependency @harnessio/ff-javascript-client-sdk to v1.14.0 ([6affd52](https://github.com/open-feature/playground/commit/6affd525b1d2da25f093a23583c320901258632d))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.2.17 ([b06ead0](https://github.com/open-feature/playground/commit/b06ead0697c42ebdea9e47be7f8649eeed046eca))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.3.0 ([7fd3f7b](https://github.com/open-feature/playground/commit/7fd3f7b7c7837a519fef844c728f05700091e45a))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.3.1 ([89dd904](https://github.com/open-feature/playground/commit/89dd904b262bc15dfbc66bc9bfe4c2e824e4becb))
* **deps:** update dependency @openfeature/open-telemetry-hooks to v0.2.4 ([#239](https://github.com/open-feature/playground/issues/239)) ([90bd03d](https://github.com/open-feature/playground/commit/90bd03d11fb7239bdb9527dab636e87b9de01b5c))
* **deps:** update dependency flagsmith to v3.19.0 ([5a98304](https://github.com/open-feature/playground/commit/5a98304d46c166a09bb9130a5fea549211b3bbcd))
* **deps:** update dependency launchdarkly-node-server-sdk to v7.0.2 ([4b562e5](https://github.com/open-feature/playground/commit/4b562e51a6331f864afebb4ecb5f68b7130b4033))
* **deps:** update dependency nestjs-pino to v3.3.0 ([2a297df](https://github.com/open-feature/playground/commit/2a297dffc71dc8deb3b69f515167f8b0adc674f5))
* **deps:** update dependency react-router-dom to v6.13.0 ([2a91bbf](https://github.com/open-feature/playground/commit/2a91bbfbdd8c6b2558ca03cfe3b87629796fc8c2))
* **deps:** update dependency react-router-dom to v6.14.0 ([0bf616c](https://github.com/open-feature/playground/commit/0bf616cef12f97e25ee1fbddac46fa50cef596b2))
* **deps:** update dependency rox-browser to v5.4.5 ([a54358f](https://github.com/open-feature/playground/commit/a54358f595726f8f62842a83f4ba31c08f13d26f))
* **deps:** update dependency rox-browser to v5.4.6 ([39b1e13](https://github.com/open-feature/playground/commit/39b1e13ee378e97ce4ad8c170adddae665b58342))
* **deps:** update dependency rox-node to v5.4.5 ([49fd47f](https://github.com/open-feature/playground/commit/49fd47f0a8ad2069a36a3275c36bdca5665d9d37))
* **deps:** update dependency rox-node to v5.4.6 ([e9db3b3](https://github.com/open-feature/playground/commit/e9db3b3a2810babf33ce499a140876c8d88856cd))
* **deps:** update nest monorepo to v9.4.3 ([6a2ab0f](https://github.com/open-feature/playground/commit/6a2ab0fdaa73ec6f01638860eefada3f725ef461))
### ✨ New Features
* add otel collector and otlp support ([#238](https://github.com/open-feature/playground/issues/238)) ([427ebd6](https://github.com/open-feature/playground/commit/427ebd6abc99648e267f0a465b6917662ef94cfd))
### 🧹 Chore
* **config:** migrate renovate config ([#232](https://github.com/open-feature/playground/issues/232)) ([d6cd502](https://github.com/open-feature/playground/commit/d6cd5025fb4b46603619d20de89b3dacc497f4d3))
* **deps-dev:** bump word-wrap from 1.2.3 to 1.2.4 ([#236](https://github.com/open-feature/playground/issues/236)) ([50d8688](https://github.com/open-feature/playground/commit/50d8688775cff59249954d4638a4fa3483648376))
* **deps:** Bump protobufjs from 7.2.3 to 7.2.5 ([#240](https://github.com/open-feature/playground/issues/240)) ([bc55f0f](https://github.com/open-feature/playground/commit/bc55f0face7edeed12da250d0116513255d8297f))
* **deps:** bump tough-cookie from 4.1.2 to 4.1.3 ([#231](https://github.com/open-feature/playground/issues/231)) ([ca308da](https://github.com/open-feature/playground/commit/ca308da9cd5c487c697de774b743f3b23a657ddd))
* **deps:** update dependency @babel/preset-react to v7.22.5 ([ab18c92](https://github.com/open-feature/playground/commit/ab18c9220085607068640b74e41f7292e0d5ece5))
* **deps:** update dependency @mui/material to v5.13.5 ([6c48ee3](https://github.com/open-feature/playground/commit/6c48ee334e551d459f0c68f4208d34678f88a3d2))
* **deps:** update dependency @mui/material to v5.13.6 ([aed7db5](https://github.com/open-feature/playground/commit/aed7db504b80bc148289777d123b393031d2d232))
* **deps:** update dependency @nx/eslint-plugin to v16.4.0 ([fc8c84c](https://github.com/open-feature/playground/commit/fc8c84c0a088e0c53a68e9e104967ce0864b573f))
* **deps:** update dependency @types/react to v18.2.14 ([2b0493b](https://github.com/open-feature/playground/commit/2b0493bb90b72886bc0aeb09c03c6d6abcc649b8))
* **deps:** update dependency core-js to v3.31.0 ([ba1ae5d](https://github.com/open-feature/playground/commit/ba1ae5dddbda5c1459e0c5da7c2738b42bd4ac43))
* **deps:** update dependency core-js to v3.31.1 ([6c7fc9b](https://github.com/open-feature/playground/commit/6c7fc9ba1dd6f51ee3c72e1c2f929d1a8cb7cdb4))
* **deps:** update dependency css-loader to v6.8.1 ([16ca721](https://github.com/open-feature/playground/commit/16ca7217d42d951bbc0ebc88e92486eb97e61bce))
* **deps:** update dependency styled-components to v5.3.11 ([70c3ca4](https://github.com/open-feature/playground/commit/70c3ca456bd207387e972e30d721d02888f22a47))
* **deps:** update dependency stylus-loader to v7.1.3 ([d9bf78a](https://github.com/open-feature/playground/commit/d9bf78af8852f73a7e4a428680508fc86a5e45ad))
* **deps:** update dependency ts-jest to v29.1.1 ([c992c44](https://github.com/open-feature/playground/commit/c992c44f04ccfa5feedd5a13c049c9ee03c26c60))
* **deps:** update dependency tslib to v2.5.3 ([0ed7b0c](https://github.com/open-feature/playground/commit/0ed7b0cafd6f45201fd173f45b5d25ebd60c1b95))
* **deps:** update dependency tslib to v2.6.0 ([b059777](https://github.com/open-feature/playground/commit/b05977792d39f7f6af140b33d21ac418e2423c72))
* **deps:** update dependency tslib to v2.6.1 ([259feb0](https://github.com/open-feature/playground/commit/259feb0347f8f13123dad1d07f5677a1de8e2012))
* **deps:** update dependency typescript to v5.1.3 ([2a74140](https://github.com/open-feature/playground/commit/2a74140cdcacfef9a856282a8a9b9b4736600bd7))
* **deps:** update dependency typescript to v5.1.5 ([31e35ce](https://github.com/open-feature/playground/commit/31e35ce3170035c5e99265d5faddc8246dabde0f))
* **deps:** update dependency typescript to v5.1.6 ([396be3c](https://github.com/open-feature/playground/commit/396be3cd81b7f2e1a6d0f18d771b87a47a1a831e))
* **deps:** update dependency webpack to v5.87.0 ([5d1aff2](https://github.com/open-feature/playground/commit/5d1aff2cc499c0a5adc34e30981976764b9aabf7))
* **deps:** update dependency webpack to v5.88.0 ([5e3ca93](https://github.com/open-feature/playground/commit/5e3ca936998edcd0db79ec44a730a61059786370))
* **deps:** update dependency webpack to v5.88.1 ([e436274](https://github.com/open-feature/playground/commit/e436274dbb11905c4000219061c66592b814b42c))
* **deps:** update dependency webpack to v5.88.2 ([80031a6](https://github.com/open-feature/playground/commit/80031a6d38e481cefd304d89db15907e77dca247))
* **deps:** update dependency webpack-merge to v5.9.0 ([41ec554](https://github.com/open-feature/playground/commit/41ec554e3f838e0bc26a50111e6b53591ffc6340))
* **deps:** update eslint ([50108f0](https://github.com/open-feature/playground/commit/50108f0d4ef2fc36ce2c19fd721cf28c7c385c54))
* **deps:** update eslint to v5.60.0 ([bc76e9b](https://github.com/open-feature/playground/commit/bc76e9b86c69eb2409d25c84b1d8f9536f22e9df))
* **deps:** update eslint to v5.60.1 ([113f276](https://github.com/open-feature/playground/commit/113f276de6a50e07d2b7b607573a9f571d4a8dae))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.5.4 ([ca0fc6e](https://github.com/open-feature/playground/commit/ca0fc6e8a5b6dffd6a5eb7be5ebde553ed6e76bf))
* **deps:** update jaegertracing/all-in-one docker tag to v1.46 ([87e147e](https://github.com/open-feature/playground/commit/87e147e46d26ba8c19b8b00a3766a1df279500cf))
* **deps:** update nrwl monorepo to v16.3.2 ([f47ee77](https://github.com/open-feature/playground/commit/f47ee77c69ae1bbb5fa7d559f619bceb54610636))
* **deps:** update nrwl monorepo to v16.4.0 ([9bd8445](https://github.com/open-feature/playground/commit/9bd844572cf8e970b41f40ed2caa9ad9461a41ca))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.11.0 ([a4ffd03](https://github.com/open-feature/playground/commit/a4ffd034f056e319a79b9c2f1020c9c8a395c78a))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.12.0 ([ccdd8dc](https://github.com/open-feature/playground/commit/ccdd8dc68c6e8752f2add92582ac030423ccd0b5))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.12.1 ([0dc8641](https://github.com/open-feature/playground/commit/0dc8641c3d560aa8f249b16b4279f143eea0ec34))
* **deps:** update types ([2f37825](https://github.com/open-feature/playground/commit/2f378259f3c41816bc028aacc830e8ec7a63dbbe))
* **deps:** update types ([50fd4d1](https://github.com/open-feature/playground/commit/50fd4d159b7cfde6ebe1f79d234331ad7d6ec050))
* **deps:** update types ([#222](https://github.com/open-feature/playground/issues/222)) ([d0b2d45](https://github.com/open-feature/playground/commit/d0b2d45405db40818fe809e6e416ce530fe8f028))
* update to tracing hook, fix nx:serve ([#235](https://github.com/open-feature/playground/issues/235)) ([868214f](https://github.com/open-feature/playground/commit/868214f4d261b3fd383ded2813e4d1490fb00bfd))
### 📚 Documentation
* update links and fix typos ([#234](https://github.com/open-feature/playground/issues/234)) ([566e96d](https://github.com/open-feature/playground/commit/566e96d8ca46d445ffb1279a2523a3840ac27ec0))
## [0.11.0](https://github.com/open-feature/playground/compare/v0.10.0...v0.11.0) (2023-06-16)
### 🐛 Bug Fixes
* **deps:** update dependency @openfeature/go-feature-flag-provider to v0.5.10 ([#214](https://github.com/open-feature/playground/issues/214)) ([690cf0f](https://github.com/open-feature/playground/commit/690cf0fe99905765efddbe8b93a74d8d67037584))
* **deps:** update dependency @splitsoftware/splitio to v10.22.5 ([dddbd7a](https://github.com/open-feature/playground/commit/dddbd7a9b9958b21d348bc48404b0237fe1622c2))
* **deps:** update dependency @splitsoftware/splitio-browserjs to v0.9.4 ([#203](https://github.com/open-feature/playground/issues/203)) ([e679af3](https://github.com/open-feature/playground/commit/e679af3a0c8ad8f47aa9e9f6c13c732204d40ac7))
* **deps:** update dependency @splitsoftware/splitio-browserjs to v0.9.5 ([#215](https://github.com/open-feature/playground/issues/215)) ([f63aaa3](https://github.com/open-feature/playground/commit/f63aaa3bdf3da3028424167c7201b33454628be7))
* **deps:** update dependency express-validator to v6.15.0 ([6156b38](https://github.com/open-feature/playground/commit/6156b38c2bc94ee06c237fbb2afbf3c3a859a320))
* **deps:** update dependency express-validator to v7 ([#217](https://github.com/open-feature/playground/issues/217)) ([8620e88](https://github.com/open-feature/playground/commit/8620e88e7e67001efd6ff7c669804d23704fe792))
* **deps:** update dependency flagsmith to v3.18.3 ([48ea3e2](https://github.com/open-feature/playground/commit/48ea3e21ff0ad933862a076b8e251f864003dd45))
* **deps:** update dependency launchdarkly-js-client-sdk to v3.1.3 ([32f13f0](https://github.com/open-feature/playground/commit/32f13f0ecc273f7e167b01dc1220cd6f95990b90))
* **deps:** update dependency nestjs-pino to v3.2.0 ([1f7463c](https://github.com/open-feature/playground/commit/1f7463c923045b7ff168b20f9b5edcff862e8410))
* **deps:** update dependency rox-browser to v5.4.3 ([f3ddb24](https://github.com/open-feature/playground/commit/f3ddb24e597955610100a366ef62b70bfb99256b))
* **deps:** update dependency rox-browser to v5.4.4 ([9dc63c7](https://github.com/open-feature/playground/commit/9dc63c77daa243cd9744ef9f95586e496e97e550))
* **deps:** update dependency rox-node to v5.4.4 ([202294a](https://github.com/open-feature/playground/commit/202294a355b9cb281464105394389f64d6510d1e))
* **deps:** update dependency rxjs to v7.8.1 ([b5961c3](https://github.com/open-feature/playground/commit/b5961c328069a8549289617dcb49e0c46033de7b))
* **deps:** update nest monorepo to v9.4.0 ([3ac33f0](https://github.com/open-feature/playground/commit/3ac33f079f8d22530d9ee146c16ec0825b70b6d7))
### ✨ New Features
* add logged in user to header ([#220](https://github.com/open-feature/playground/issues/220)) ([1fbffcf](https://github.com/open-feature/playground/commit/1fbffcfb9c0c61d40938e2930213e339b8c97e7e))
### 🧹 Chore
* bump js sdk versions ([#218](https://github.com/open-feature/playground/issues/218)) ([ad9a329](https://github.com/open-feature/playground/commit/ad9a3298309fedb931e884e1a501886c6b30e236))
* **deps:** update dependency @emotion/react to v11.11.1 ([318dc28](https://github.com/open-feature/playground/commit/318dc283fc65a5b4f3191c75b94413451f3e7da7))
* **deps:** update dependency @mui/material to v5.13.0 ([ad81f5f](https://github.com/open-feature/playground/commit/ad81f5f30ef1fd8c0f0784248fa3d6d422940d24))
* **deps:** update dependency @mui/material to v5.13.1 ([f86d116](https://github.com/open-feature/playground/commit/f86d11617fa9f0f88380e37f52127c9407e0f76f))
* **deps:** update dependency @reactour/tour to v3.4.0 ([9a8fe96](https://github.com/open-feature/playground/commit/9a8fe96563b1863db1f4018f2cb2618527b9bd87))
* **deps:** update dependency @svgr/webpack to v8 ([#207](https://github.com/open-feature/playground/issues/207)) ([bdc00f1](https://github.com/open-feature/playground/commit/bdc00f1bd88e5ba46b93a259afa05cfff9993573))
* **deps:** update dependency @types/node to v18.16.13 ([e0f8aaa](https://github.com/open-feature/playground/commit/e0f8aaabd4b7e39a5d205f2449a1f1d79423d51c))
* **deps:** update dependency core-js to v3.30.2 ([2d60f79](https://github.com/open-feature/playground/commit/2d60f790a43af0a3036d7e5e251f9da4b64e2393))
* **deps:** update dependency css-loader to v6.7.4 ([2233459](https://github.com/open-feature/playground/commit/22334594f09934acf2fdb2d31998eed924fa96f0))
* **deps:** update dependency style-loader to v3.3.3 ([5c7e58e](https://github.com/open-feature/playground/commit/5c7e58e926b790632fc7f8e6e574d684d6eae0e1))
* **deps:** update dependency ts-jest to v29.1.0 ([694fe31](https://github.com/open-feature/playground/commit/694fe31178683513478a6303b346a8e5b355930e))
* **deps:** update dependency tslib to v2.5.2 ([256e1e6](https://github.com/open-feature/playground/commit/256e1e69390591720143aedefd0674de170d0831))
* **deps:** update dependency webpack to v5.82.1 ([9fc0dc3](https://github.com/open-feature/playground/commit/9fc0dc3a24c0b3e510a016dca72dea0f4844f163))
* **deps:** update dependency webpack to v5.83.1 ([da8c19c](https://github.com/open-feature/playground/commit/da8c19cb9b012a5e6a31a4f0884c2b3a10888f67))
* **deps:** update emotion monorepo to v11.11.0 ([7a5fd1f](https://github.com/open-feature/playground/commit/7a5fd1f15b2b23c1f61560ad71b5f47dd76bee86))
* **deps:** update eslint ([#196](https://github.com/open-feature/playground/issues/196)) ([d659a69](https://github.com/open-feature/playground/commit/d659a6962008eff33be797a4a900fcd8f4409646))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.5.3 ([3e964bd](https://github.com/open-feature/playground/commit/3e964bdfb4d1aa26d41b89606179690b28908709))
* **deps:** update jaegertracing/all-in-one docker tag to v1.45 ([8f6ef37](https://github.com/open-feature/playground/commit/8f6ef374dd21c6dadc0cc71e631b499de79b09f4))
* **deps:** update node.js to v16.20 ([a89835e](https://github.com/open-feature/playground/commit/a89835e13e8c57f42b36c298fe224e2120d08875))
* **deps:** update node.js to v20 ([#210](https://github.com/open-feature/playground/issues/210)) ([de4c6c3](https://github.com/open-feature/playground/commit/de4c6c3cfa26ec54293bdd5305d567be80abbce9))
* **deps:** update nrwl monorepo ([f94c69f](https://github.com/open-feature/playground/commit/f94c69fcbee0c66c63a4fcc9d4f6a277b62ec17e))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.10.2 ([8d1cecd](https://github.com/open-feature/playground/commit/8d1cecdae5f8dc603ab6e6ad0a0d321d4718884b))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.10.3 ([863182d](https://github.com/open-feature/playground/commit/863182d25b4b5c84695afcaed59dad19528dd66b))
* **deps:** update types ([7144dc2](https://github.com/open-feature/playground/commit/7144dc21eeec53903983d6ca3803f7473f43de04))
* refactor to support 2 demos ([#213](https://github.com/open-feature/playground/issues/213)) ([e1a55e3](https://github.com/open-feature/playground/commit/e1a55e3ce375d4583d4b4c55367d8868854ddbd4))
## [0.10.0](https://github.com/open-feature/playground/compare/v0.9.0...v0.10.0) (2023-05-10)
### 📚 Documentation
* update license in package json ([#197](https://github.com/open-feature/playground/issues/197)) ([fc218fc](https://github.com/open-feature/playground/commit/fc218fccf4e2bab44fb4c880358b68e3a6d0b240))
### 🧹 Chore
* **deps:** update dependency jest-environment-jsdom to v29.5.0 ([2398577](https://github.com/open-feature/playground/commit/2398577f80e3dea8ceb7720ce7baa606fecc07b0))
* **deps:** update dependency prettier to v2.8.7 ([aeebbdc](https://github.com/open-feature/playground/commit/aeebbdc2ffbd63b37b32a7eb9d15acd2b02e3b4d))
* **deps:** update dependency prettier to v2.8.8 ([083b00f](https://github.com/open-feature/playground/commit/083b00fea8c750fc97be5354c4fed243331d32d2))
* **deps:** update dependency react-json-editor-ajrm to v2.5.14 ([a812076](https://github.com/open-feature/playground/commit/a81207633027eaba99bc54d5c4a093a399af7c1f))
* **deps:** update dependency style-loader to v3.3.2 ([f9a3197](https://github.com/open-feature/playground/commit/f9a31970b21408415daf67fdef1f86cc905bb3b7))
* **deps:** update dependency styled-components to v5.3.10 ([5ebe580](https://github.com/open-feature/playground/commit/5ebe580904e2b4f9c6ecf31cc3ecd6ff241a889a))
* **deps:** update dependency webpack to v5.77.0 ([2b6c1c6](https://github.com/open-feature/playground/commit/2b6c1c68c10ef5cdd618f2753a4d1aa08ff5467c))
* **deps:** update emotion monorepo to v11.10.8 ([4694d93](https://github.com/open-feature/playground/commit/4694d938dd0fe03d1bb5d864487cf7514fca7159))
* **deps:** update types ([de2276b](https://github.com/open-feature/playground/commit/de2276b4d84491ca42cc31f3cf6ccb893caba0c9))
* **deps:** update types ([f47b140](https://github.com/open-feature/playground/commit/f47b140d5f0b66f56f40d2eef31774e86320cf58))
### ✨ New Features
* migrate to official env var provider ([#180](https://github.com/open-feature/playground/issues/180)) ([bab6383](https://github.com/open-feature/playground/commit/bab6383013937660d88443904757b2d41bcb9d46))
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.2.14 ([efebf1c](https://github.com/open-feature/playground/commit/efebf1c0fd300053fc6ff228ffa93a42f03ab8e7))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.2.15 ([6f5ac7e](https://github.com/open-feature/playground/commit/6f5ac7eeb39c39cdf6d9604880bdcd478dac4b4c))
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.2.16 ([636ae5a](https://github.com/open-feature/playground/commit/636ae5a2f6a7c021e997d39390a87db5c3f796e5))
* **deps:** update dependency @nestjs/axios to v2 ([#174](https://github.com/open-feature/playground/issues/174)) ([a550a95](https://github.com/open-feature/playground/commit/a550a9565f7a384588689f83558c7c2c35148251))
* **deps:** update dependency @nestjs/serve-static to v3.0.1 ([e4914ff](https://github.com/open-feature/playground/commit/e4914ff86b240a8ebc0c929cea0159b91bc78060))
* **deps:** update dependency @openfeature/go-feature-flag-provider to v0.5.8 ([#200](https://github.com/open-feature/playground/issues/200)) ([3a714ae](https://github.com/open-feature/playground/commit/3a714aedab957936be25a25b65cb517c7418404b))
* **deps:** update dependency @openfeature/open-telemetry-hook to v6 ([#164](https://github.com/open-feature/playground/issues/164)) ([dd7f5de](https://github.com/open-feature/playground/commit/dd7f5de4b519e30cb35c784d82acb5d7108d91bb))
* **deps:** update dependency @opentelemetry/auto-instrumentations-node to ^0.36.0 ([#156](https://github.com/open-feature/playground/issues/156)) ([a832f63](https://github.com/open-feature/playground/commit/a832f63569f7bcab438058d1070f32b3d3b40942))
* **deps:** update dependency @splitsoftware/openfeature-js-split-provider to v1.0.7 ([ead5e80](https://github.com/open-feature/playground/commit/ead5e80fd1011d55b399b064eb12d3f2a40ff4d1))
* **deps:** update dependency pino-pretty to v10 ([#181](https://github.com/open-feature/playground/issues/181)) ([3dc2e24](https://github.com/open-feature/playground/commit/3dc2e24b359c36d8ca5a5f37525e48482786e4c8))
* **deps:** update nest monorepo ([25170f4](https://github.com/open-feature/playground/commit/25170f487bd01ab49bc57eedbf8ba4e3418501ad))
* **deps:** update opentelemetry-js monorepo ([#150](https://github.com/open-feature/playground/issues/150)) ([ea0b929](https://github.com/open-feature/playground/commit/ea0b929f08d23797c012aad3f6daa1114e36adf6))
* error with missing port, dep updates ([#202](https://github.com/open-feature/playground/issues/202)) ([8712cee](https://github.com/open-feature/playground/commit/8712ceea204ee55fb17d896d4ccb888ffa3cc494))
## [0.9.0](https://github.com/open-feature/playground/compare/v0.8.0...v0.9.0) (2023-03-29)
### 🧹 Chore
* **deps:** update dependency @mui/material to v5.11.15 ([198682b](https://github.com/open-feature/playground/commit/198682b2998525ef9b4b9762f690b5f861f4ddc4))
* **deps:** update dependency json-schema-to-typescript to v11.0.5 ([fff467d](https://github.com/open-feature/playground/commit/fff467d0b4c973efeb3a1f042c8ec6fdeb9f437f))
### 🐛 Bug Fixes
* use more secure images ([#192](https://github.com/open-feature/playground/issues/192)) ([ddd3d35](https://github.com/open-feature/playground/commit/ddd3d354ad7f2da077246d4da420807f1dac3c26))
### ✨ New Features
* enable all cors origins in flagd ([#193](https://github.com/open-feature/playground/issues/193)) ([d633233](https://github.com/open-feature/playground/commit/d633233038601a2bf87dbea097bc530becb139c5))
## [0.8.0](https://github.com/open-feature/playground/compare/v0.7.1...v0.8.0) (2023-03-29)
### 🧹 Chore
* removed tbuild from docker compose ([7b634d1](https://github.com/open-feature/playground/commit/7b634d121669f69b1a810ab048c06f37cadb0499))
### ✨ New Features
* add additional flagd web config options ([#190](https://github.com/open-feature/playground/issues/190)) ([e826815](https://github.com/open-feature/playground/commit/e82681591243f3af9d8db4e74020df58474c6c14))
## [0.7.1](https://github.com/open-feature/playground/compare/v0.7.0...v0.7.1) (2023-03-28)
### 🐛 Bug Fixes
* import in fib service ([cb45bca](https://github.com/open-feature/playground/commit/cb45bca5e2c2be33713fccdbf9aeb389deff4220))
## [0.7.0](https://github.com/open-feature/playground/compare/v0.6.3...v0.7.0) (2023-03-28)
### 🐛 Bug Fixes
* **deps:** update dependency @harnessio/ff-nodejs-server-sdk to v1.2.12 ([6031ae9](https://github.com/open-feature/playground/commit/6031ae9def99afc966f4139bb9da8f679ebdfa7b))
* **deps:** update dependency @nestjs/serve-static to v3.0.1 ([fd701c2](https://github.com/open-feature/playground/commit/fd701c2d267c0db2d199293a7b43f1a4a76d0182))
* **deps:** update nest monorepo to v9.3.1 ([8b77ca3](https://github.com/open-feature/playground/commit/8b77ca379ffa01fed2af42f093f780833435600c))
* **deps:** update nest monorepo to v9.3.2 ([54876e5](https://github.com/open-feature/playground/commit/54876e549bf9d737de68726ce42cad6a10152024))
* **deps:** update nest monorepo to v9.3.3 ([efafb4a](https://github.com/open-feature/playground/commit/efafb4a75c13f296ae166e4df34ae635ad806be6))
* **deps:** update nest monorepo to v9.3.5 ([c2c7f87](https://github.com/open-feature/playground/commit/c2c7f879f5bcf286c1e3635f251d276edcd864cf))
* **deps:** update nest monorepo to v9.3.7 ([572e211](https://github.com/open-feature/playground/commit/572e21187f04181990d058ee70f19321a62da912))
* **deps:** update nest monorepo to v9.3.8 ([52daa53](https://github.com/open-feature/playground/commit/52daa5324abbb3649a5748c44b801e536f6817cb))
* **deps:** update nest monorepo to v9.3.9 ([0d25517](https://github.com/open-feature/playground/commit/0d25517e5a4ed458095d198b580f39cc090347a9))
### ✨ New Features
* add support for a configurable flagd host ([#185](https://github.com/open-feature/playground/issues/185)) ([d10f58e](https://github.com/open-feature/playground/commit/d10f58ea09fca7415e0edca26133ad3ccafd6b21))
* client side flags ([#131](https://github.com/open-feature/playground/issues/131)) ([4685b17](https://github.com/open-feature/playground/commit/4685b17b38b5c889abe5d1b6fd49daa949b88434))
### 🧹 Chore
* Bump ua-parser-js from 0.7.32 to 0.7.33 ([#166](https://github.com/open-feature/playground/issues/166)) ([dd7261e](https://github.com/open-feature/playground/commit/dd7261e870958751e9f4751d70dee0666fa49650))
* **deps:** update amannn/action-semantic-pull-request action to v5 ([98ec1b2](https://github.com/open-feature/playground/commit/98ec1b2a9cf3cd2644120725cfcb5dc043361388))
* **deps:** update dependency @mui/material to v5.11.13 ([72828b3](https://github.com/open-feature/playground/commit/72828b344dfc3115ef05197774da02eccbaa146a))
* **deps:** update dependency @nrwl/eslint-plugin-nx to v15.7.1 ([c0eec94](https://github.com/open-feature/playground/commit/c0eec942a7de69feb2f7f3f6907c1f33934ea6e0))
* **deps:** update dependency @nrwl/eslint-plugin-nx to v15.7.2 ([3992e70](https://github.com/open-feature/playground/commit/3992e70d5c98b6e223f373e22209fe829a507e58))
* **deps:** update dependency @nrwl/eslint-plugin-nx to v15.8.1 ([86d0091](https://github.com/open-feature/playground/commit/86d00917b632d42d479c2413eaf44ae904ad3232))
* **deps:** update dependency @nrwl/eslint-plugin-nx to v15.8.3 ([72cd00f](https://github.com/open-feature/playground/commit/72cd00f96a33271eac457d4076d762ab09575b23))
* **deps:** update dependency @nrwl/eslint-plugin-nx to v15.8.5 ([246213e](https://github.com/open-feature/playground/commit/246213e9aaeb641d46c09f46c649b1fb95007ec8))
* **deps:** update dependency @types/express to v4.17.16 ([7892c50](https://github.com/open-feature/playground/commit/7892c50d1b0e8b7002e1aabdd7b7c875500d92b6))
* **deps:** update dependency @types/express to v4.17.17 ([d63b951](https://github.com/open-feature/playground/commit/d63b951c025e3c939af207e6b848547ea6ae7ca6))
* **deps:** update dependency @types/jest to v29.4.4 ([2721052](https://github.com/open-feature/playground/commit/27210523c5e3812f6df3668f77c0efda63af3f4e))
* **deps:** update dependency @types/node to v18.11.19 ([c58c7f7](https://github.com/open-feature/playground/commit/c58c7f740ba0e07ae6cf5cb8cb5d720cee40698f))
* **deps:** update dependency @types/node to v18.13.0 ([f03b3a7](https://github.com/open-feature/playground/commit/f03b3a73aa67fede0d298105523b89a830a640af))
* **deps:** update dependency @types/node to v18.14.0 ([5fbf20c](https://github.com/open-feature/playground/commit/5fbf20cf650de6f2e0754c2188e727ea0401b5ed))
* **deps:** update dependency @types/node to v18.14.1 ([87b6783](https://github.com/open-feature/playground/commit/87b67832ae7cec7942f2d301652ac3af4d7b5487))
* **deps:** update dependency @types/node to v18.14.2 ([cb3c9c9](https://github.com/open-feature/playground/commit/cb3c9c95766af7563d79f51a767b8ba23bd6b278))
* **deps:** update dependency @types/node to v18.14.4 ([59aba58](https://github.com/open-feature/playground/commit/59aba58999d0c1ea958333c1443bfcdc8eca103e))
* **deps:** update dependency @types/node to v18.14.5 ([0b74b12](https://github.com/open-feature/playground/commit/0b74b12fe84421f2d12dd14767e77fb3450ee539))
* **deps:** update dependency @types/node to v18.14.6 ([e1d2ac2](https://github.com/open-feature/playground/commit/e1d2ac2b85841b0e9e146b1cdac743b55b2b908c))
* **deps:** update dependency @types/node to v18.15.0 ([2d005eb](https://github.com/open-feature/playground/commit/2d005eb5e928595f80290483c4e3e2528c04f14f))
* **deps:** update dependency @types/node to v18.15.1 ([3a7a557](https://github.com/open-feature/playground/commit/3a7a557d3dfd7556aa055081330b262a2521a036))
* **deps:** update dependency @types/node to v18.15.2 ([337777d](https://github.com/open-feature/playground/commit/337777d47427d4cd96177faa960baec7e4dc5ed7))
* **deps:** update dependency @types/node to v18.15.3 ([31d339b](https://github.com/open-feature/playground/commit/31d339b590c9509b8f4a761d98023526455ba563))
* **deps:** update dependency @types/react to v18.0.27 ([72814f8](https://github.com/open-feature/playground/commit/72814f87cb0bd51a97b2bce3d88eeafcaae4ade4))
* **deps:** update dependency @types/react to v18.0.28 ([4b4fa49](https://github.com/open-feature/playground/commit/4b4fa49aed6b3746e283a8f770de1af6378297e7))
* **deps:** update dependency @types/react-dom to v18.0.11 ([fc19e2f](https://github.com/open-feature/playground/commit/fc19e2f97c94c7e76eba49245f9a76b7d3d60ee4))
* **deps:** update dependency eslint to v8.34.0 ([444ed1a](https://github.com/open-feature/playground/commit/444ed1af3d23023f0660913bde702f720269da96))
* **deps:** update dependency eslint to v8.35.0 ([8a76055](https://github.com/open-feature/playground/commit/8a760552d5b3588b5483f6f267b332aacd6b40bb))
* **deps:** update dependency eslint-config-prettier to v8.7.0 ([68cff54](https://github.com/open-feature/playground/commit/68cff546ed31012af4b03634a70fb7937beec1e3))
* **deps:** update dependency json-schema-to-typescript to v11.0.5 ([366bd09](https://github.com/open-feature/playground/commit/366bd096edca42e341c3e3dbf9efa9ca36e19f97))
* **deps:** update dependency prettier to v2.8.2 ([e14e163](https://github.com/open-feature/playground/commit/e14e16347a7773264b366ccfa57f22bef36432ea))
* **deps:** update dependency prettier to v2.8.3 ([df5089e](https://github.com/open-feature/playground/commit/df5089ec767a2bd9a50bb9a8e92448cab42c1794))
* **deps:** update dependency prettier to v2.8.4 ([af39aa7](https://github.com/open-feature/playground/commit/af39aa7cf08ce7179f4fdd1edd45621c799f6e5b))
* **deps:** update dependency style-loader to v3.3.2 ([de33b20](https://github.com/open-feature/playground/commit/de33b20e451ea0c51642d1a72c88a69ca760c4f2))
* **deps:** update dependency styled-components to v5.3.8 ([eef6d4d](https://github.com/open-feature/playground/commit/eef6d4dc8a5a6c62c24865aa1220ef4138d2d6ee))
* **deps:** update dependency styled-components to v5.3.9 ([fbb5873](https://github.com/open-feature/playground/commit/fbb5873d91f90858df67e0acbc38f2ee464fc30c))
* **deps:** update dependency typescript to v4.9.5 ([5239461](https://github.com/open-feature/playground/commit/5239461ddec2719b8d15db0bce84551d0684c0bd))
* **deps:** update docker/build-push-action action to v4 ([51bbcee](https://github.com/open-feature/playground/commit/51bbcee87d3f70a35695c3f64a2f19be2ad67fe7))
* **deps:** update emotion monorepo to v11.10.6 ([9266948](https://github.com/open-feature/playground/commit/92669484c4c71b51f37c80f959f6767d194e75c6))
* **deps:** update eslint ([5a5f109](https://github.com/open-feature/playground/commit/5a5f109e61fbe8acaafe43bfd96f046a8cf42d13))
* **deps:** update eslint ([#158](https://github.com/open-feature/playground/issues/158)) ([f8a24aa](https://github.com/open-feature/playground/commit/f8a24aae5519acc362a676848d1ec59e6d0d81b6))
* **deps:** update eslint ([#175](https://github.com/open-feature/playground/issues/175)) ([518e909](https://github.com/open-feature/playground/commit/518e909d969eb23b256879e0a90bc55fe47897f8))
* **deps:** update eslint to v5.51.0 ([4dd0a8f](https://github.com/open-feature/playground/commit/4dd0a8f6112ad7de4a79e92493671a79bf3ea1fb))
* **deps:** update eslint to v5.53.0 ([afdde9d](https://github.com/open-feature/playground/commit/afdde9d7b226320ebdb508df1b4589fbebf2e4dd))
* **deps:** update eslint to v5.54.0 ([445e5ec](https://github.com/open-feature/playground/commit/445e5ec8af2feb1a91b4a271285b5ceb28f7cb43))
* **deps:** update eslint to v5.54.1 ([cab475c](https://github.com/open-feature/playground/commit/cab475c2fc173d3d828bb1b067c293c47d08d529))
* **deps:** update eslint to v5.55.0 ([e4888c7](https://github.com/open-feature/playground/commit/e4888c75c70ab33fe0a92fec78dd57508260c759))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.3.1 ([bc39fea](https://github.com/open-feature/playground/commit/bc39fea661aa488cfad91dcb898a3badf20e6466))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.3.2 ([faf26c4](https://github.com/open-feature/playground/commit/faf26c4fd719f45948b824e987817269cac0eade))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.3.4 ([a239e0b](https://github.com/open-feature/playground/commit/a239e0b8b1ff8ad6613be1994295e883f74413ff))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.3.6 ([175cbc5](https://github.com/open-feature/playground/commit/175cbc5ea7a323f194e7ff468542e39bf1fd813d))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.3.7 ([4f78715](https://github.com/open-feature/playground/commit/4f78715a6bb600e64a1c7fc170ee234b5e9f6515))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.4.0 ([9e0592f](https://github.com/open-feature/playground/commit/9e0592fd04d49b2c6c1a84deceadc17bf2e75e6c))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.4.1 ([a504538](https://github.com/open-feature/playground/commit/a5045387bc4cf982c3ea871844ad343cc2f0af4d))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.4.2 ([4ddcdfb](https://github.com/open-feature/playground/commit/4ddcdfb03d6091632e91d9084b197a77612dba9a))
* **deps:** update ghcr.io/open-feature/flagd docker tag to v0.4.4 ([8bb447a](https://github.com/open-feature/playground/commit/8bb447a77ca35513b782ac594c0cc7454f2b228f))
* **deps:** update jaegertracing/all-in-one docker tag to v1.41 ([b63d20e](https://github.com/open-feature/playground/commit/b63d20ebf5040f5d26a4555e11bbc79477efb566))
* **deps:** update jaegertracing/all-in-one docker tag to v1.42 ([921ff58](https://github.com/open-feature/playground/commit/921ff58e6d034f050fccd66db387149070699711))
* **deps:** update nrwl monorepo to v15.7.0 ([7d59a49](https://github.com/open-feature/playground/commit/7d59a492fad75ab3c0dd1c1a723ef48ca1d4a729))
* **deps:** update nrwl monorepo to v15.7.1 ([c881357](https://github.com/open-feature/playground/commit/c8813578ca47a817690cea379db23907ee7cf20e))
* **deps:** update nrwl monorepo to v15.7.2 ([c417451](https://github.com/open-feature/playground/commit/c4174519811fb5485905ef849addf19d458c123e))
* **deps:** update nrwl monorepo to v15.8.1 ([419bbc4](https://github.com/open-feature/playground/commit/419bbc45008c070c1c5c7a1a36e2d90ff366efa1))
* **deps:** update nrwl monorepo to v15.8.5 ([a480a14](https://github.com/open-feature/playground/commit/a480a14dfbd81364077cb08d29e041239f84d29a))
* **deps:** update nrwl monorepo to v15.8.6 ([3091ab8](https://github.com/open-feature/playground/commit/3091ab8606dd4e35023879c356a9692aa09b2c0d))
* **deps:** update nrwl/nx-set-shas action to v3 ([cdd412b](https://github.com/open-feature/playground/commit/cdd412b6fb52e95848e902efc499bb9887725070))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1 ([#169](https://github.com/open-feature/playground/issues/169)) ([d7630e9](https://github.com/open-feature/playground/commit/d7630e942373c96d5f9cb3baea62ab7624158ae3))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.0.1 ([06280a9](https://github.com/open-feature/playground/commit/06280a968c4ab90f40961a195341bdee0752efaa))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.1.0 ([2257b7a](https://github.com/open-feature/playground/commit/2257b7a8071d1f29de818323199890a020e710d9))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.2.1 ([04c48ad](https://github.com/open-feature/playground/commit/04c48ad3d723d22c16a23fd52923fb9825892fb4))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.2.2 ([eb7429d](https://github.com/open-feature/playground/commit/eb7429d2f46714e6b6e980d8c3e2464b864616d0))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.3.0 ([352e1b9](https://github.com/open-feature/playground/commit/352e1b93e439d136c0160a9bcea702643418c517))
* **deps:** update thomaspoignant/go-feature-flag-relay-proxy docker tag to v1.4.0 ([1814017](https://github.com/open-feature/playground/commit/18140176f36563fc4c7b7c3b1410f0c4cb3872ef))
* **deps:** update types ([acdb800](https://github.com/open-feature/playground/commit/acdb800f08d953c925c84aedc9fa810ee8608d52))
* disable k8s upgrade ([#186](https://github.com/open-feature/playground/issues/186)) ([573e6c8](https://github.com/open-feature/playground/commit/573e6c8c2e9612b381d13e8e4982897b77d0e23e))
* Remove unused flag.json file ([#163](https://github.com/open-feature/playground/issues/163)) ([4a5c9d6](https://github.com/open-feature/playground/commit/4a5c9d6e526c27e2531533736d5bc25372006fa1))
* update nx dependencies ([#168](https://github.com/open-feature/playground/issues/168)) ([3fd123b](https://github.com/open-feature/playground/commit/3fd123b07823d42ba8e0820b9179ef49b797b6d7))
* updated deprecated annotation ([#162](https://github.com/open-feature/playground/issues/162)) ([826987d](https://github.com/open-feature/playground/commit/826987d51b7f14a1a8823f3461e2c8a9050f6068))
* updated release please config to include emojis ([9d4076a](https://github.com/open-feature/playground/commit/9d4076a1f39a2c8376250e66994a73f0a3df53cb))
## [0.6.3](https://github.com/open-feature/playground/compare/v0.6.2...v0.6.3) (2023-01-12)
### Bug Fixes
* revert otel hook to the span based version ([#154](https://github.com/open-feature/playground/issues/154)) ([c2ad387](https://github.com/open-feature/playground/commit/c2ad3878bc0bb0db626b5de30dd2563abe34f12d))
## [0.6.2](https://github.com/open-feature/playground/compare/v0.6.1...v0.6.2) (2023-01-05)
### Bug Fixes
* package lock issue ([2b6e7c5](https://github.com/open-feature/playground/commit/2b6e7c5d4858cdf030891e98935d6392e6dfd4ea))
## [0.6.1](https://github.com/open-feature/playground/compare/v0.6.0...v0.6.1) (2023-01-05)
### Bug Fixes
* **deps:** update dependencies ([#148](https://github.com/open-feature/playground/issues/148)) ([e0a9c37](https://github.com/open-feature/playground/commit/e0a9c37421f0cbee8df0f3e0b333a5c3f80b3b74))
## [0.6.0](https://github.com/open-feature/playground/compare/v0.5.0...v0.6.0) (2023-01-05)
### Features
* Add feature flag support in the fib service ([#142](https://github.com/open-feature/playground/issues/142)) ([81c133b](https://github.com/open-feature/playground/commit/81c133b686ae9e9dc213b3c7daf12f2ec474ed56))
### Bug Fixes
* **docker-compose:** update sync provider flagd argument ([#146](https://github.com/open-feature/playground/issues/146)) ([c9fb7e8](https://github.com/open-feature/playground/commit/c9fb7e820bb2a301ef882014d063275f85205301))
## [0.5.0](https://github.com/open-feature/playground/compare/v0.4.0...v0.5.0) (2022-12-07)
### Features
* show error icon on calc error ([#124](https://github.com/open-feature/playground/issues/124)) ([7f9accc](https://github.com/open-feature/playground/commit/7f9acccdcb23824e7530c16f34104a8a54ecfa2c))
### Bug Fixes
* mounted volumes use relative paths ([#118](https://github.com/open-feature/playground/issues/118)) ([bb5957e](https://github.com/open-feature/playground/commit/bb5957e2c79564416db54877b64e74a79cad44ef))
* openfeature hook log level ([#115](https://github.com/open-feature/playground/issues/115)) ([e77364d](https://github.com/open-feature/playground/commit/e77364d4d2e2ad47f6d9bb5d7a0c097c90c9f6fa))
## [0.4.0](https://github.com/open-feature/playground/compare/v0.3.0...v0.4.0) (2022-11-08)
### Features
* add pino logger support ([#112](https://github.com/open-feature/playground/issues/112)) ([2f5b22a](https://github.com/open-feature/playground/commit/2f5b22a3cbde8d8a266bc132a0bf8369bce11043))
## [0.3.0](https://github.com/open-feature/playground/compare/v0.2.0...v0.3.0) (2022-11-02)
### Features
* Slim down playground container images ([#110](https://github.com/open-feature/playground/issues/110)) ([d006ee7](https://github.com/open-feature/playground/commit/d006ee799a4a4a9f1a9cc28f067b0cf8bfb7f815))
## [0.2.0](https://github.com/open-feature/playground/compare/v0.1.1...v0.2.0) (2022-10-19)
### Features
* hide editor when flags config is not editable ([#101](https://github.com/open-feature/playground/issues/101)) ([d1cefeb](https://github.com/open-feature/playground/commit/d1cefeb048b8bffc8f206ebcac24adc28114d27c))
### Bug Fixes
* auth guard returns proper error code ([#102](https://github.com/open-feature/playground/issues/102)) ([7dd5c9c](https://github.com/open-feature/playground/commit/7dd5c9c4c586e0eb329c75ff7f4ba4a7e86c8167))
## [0.1.1](https://github.com/open-feature/playground/compare/v0.1.0...v0.1.1) (2022-10-11)
### Bug Fixes
* disable auth in fib service when env var aren't defined ([#95](https://github.com/open-feature/playground/issues/95)) ([18eff6b](https://github.com/open-feature/playground/commit/18eff6b75eb7bce6dbe07f52308cc9cfa0b3e307))
* improve timing of fib demo ([#96](https://github.com/open-feature/playground/issues/96)) ([b4106df](https://github.com/open-feature/playground/commit/b4106df0203f55ad1f1fd2aa3c54c6e7d9bc7868))
## [0.1.0](https://github.com/open-feature/playground/compare/v0.0.12...v0.1.0) (2022-10-11)
### Features
* add flagsmith support to the playground ([#80](https://github.com/open-feature/playground/issues/80)) ([ef85b84](https://github.com/open-feature/playground/commit/ef85b84710592c5e1a0a4d916ebd4df3720f92f3))
* add optional remote fib service ([#85](https://github.com/open-feature/playground/issues/85)) ([d5c9120](https://github.com/open-feature/playground/commit/d5c9120e2f9355b7d28e2dedab47cc2ea9300838))
* use image in docker compose ([#72](https://github.com/open-feature/playground/issues/72)) ([66c554e](https://github.com/open-feature/playground/commit/66c554ee702971429219330d8db3d3bdd1a97b9a))
### Bug Fixes
* add qemu ([f2991b7](https://github.com/open-feature/playground/commit/f2991b7ee56ff52e460b6477ba92fe06c694724f))
* address grammatical issues discovered in the tutorial ([#77](https://github.com/open-feature/playground/issues/77)) ([4834fcf](https://github.com/open-feature/playground/commit/4834fcf11037d656543068dd5f198d89622c6184)), closes [#74](https://github.com/open-feature/playground/issues/74)
* bump ci step versions ([#92](https://github.com/open-feature/playground/issues/92)) ([23aaddf](https://github.com/open-feature/playground/commit/23aaddff89a4bf173844dd7b5e92f5dc33c0cd49))
* container build process ([74f67b2](https://github.com/open-feature/playground/commit/74f67b25da9f0f18cf4a1480576bf837ec7169b4))
* disable monorepo tags in release please ([3a64a68](https://github.com/open-feature/playground/commit/3a64a68e5def97e8291c9f29fe84f792048ca5ca))
* disable QEMU ([#70](https://github.com/open-feature/playground/issues/70)) ([ecfcf84](https://github.com/open-feature/playground/commit/ecfcf8469287faae1d311c4d965a3d360545b35c))
* fix images ([eff82c3](https://github.com/open-feature/playground/commit/eff82c3459f1c12d35e190762ac9350ee5df3e44))
* remove component from tag ([febd5c0](https://github.com/open-feature/playground/commit/febd5c07d2667a0141b20bfea61ceb2e2c61c12d))
* remove unused asset option from the build target ([c940a3e](https://github.com/open-feature/playground/commit/c940a3e35b26ee144b04ad05486d8600b6ea5cd1))
* set default fib value to 45 ([1ec403a](https://github.com/open-feature/playground/commit/1ec403a69b6827daf80f43c1134161af75f85b3f))
## [0.0.12](https://github.com/open-feature/playground/compare/openfeature-v0.0.11...openfeature-v0.0.12) (2022-10-11)
### Bug Fixes
* bump ci step versions ([#92](https://github.com/open-feature/playground/issues/92)) ([23aaddf](https://github.com/open-feature/playground/commit/23aaddff89a4bf173844dd7b5e92f5dc33c0cd49))
## [0.0.11](https://github.com/open-feature/playground/compare/openfeature-v0.0.10...openfeature-v0.0.11) (2022-10-11)
### Bug Fixes
* disable monorepo tags in release please ([3a64a68](https://github.com/open-feature/playground/commit/3a64a68e5def97e8291c9f29fe84f792048ca5ca))
## [0.0.10](https://github.com/open-feature/playground/compare/openfeature-v0.0.9...openfeature-v0.0.10) (2022-10-11)
### Bug Fixes
* remove unused asset option from the build target ([c940a3e](https://github.com/open-feature/playground/commit/c940a3e35b26ee144b04ad05486d8600b6ea5cd1))
## [0.0.9](https://github.com/open-feature/playground/compare/openfeature-v0.0.8...openfeature-v0.0.9) (2022-10-11)
### Bug Fixes
* container build process ([74f67b2](https://github.com/open-feature/playground/commit/74f67b25da9f0f18cf4a1480576bf837ec7169b4))
## [0.0.8](https://github.com/open-feature/playground/compare/openfeature-v0.0.7...openfeature-v0.0.8) (2022-10-11)
### Features
* add optional remote fib service ([#85](https://github.com/open-feature/playground/issues/85)) ([d5c9120](https://github.com/open-feature/playground/commit/d5c9120e2f9355b7d28e2dedab47cc2ea9300838))
### Bug Fixes
* set default fib value to 45 ([1ec403a](https://github.com/open-feature/playground/commit/1ec403a69b6827daf80f43c1134161af75f85b3f))
## [0.0.7](https://github.com/open-feature/playground/compare/openfeature-v0.0.6...openfeature-v0.0.7) (2022-10-06)
### Features
* add flagsmith support to the playground ([#80](https://github.com/open-feature/playground/issues/80)) ([ef85b84](https://github.com/open-feature/playground/commit/ef85b84710592c5e1a0a4d916ebd4df3720f92f3))
## [0.0.6](https://github.com/open-feature/playground/compare/openfeature-v0.0.5...openfeature-v0.0.6) (2022-10-05)
### Bug Fixes
* address grammatical issues discovered in the tutorial ([#77](https://github.com/open-feature/playground/issues/77)) ([4834fcf](https://github.com/open-feature/playground/commit/4834fcf11037d656543068dd5f198d89622c6184)), closes [#74](https://github.com/open-feature/playground/issues/74)
## [0.0.5](https://github.com/open-feature/playground/compare/openfeature-v0.0.4...openfeature-v0.0.5) (2022-10-04)
### Features
* use image in docker compose ([#72](https://github.com/open-feature/playground/issues/72)) ([66c554e](https://github.com/open-feature/playground/commit/66c554ee702971429219330d8db3d3bdd1a97b9a))
## [0.0.4](https://github.com/open-feature/playground/compare/openfeature-v0.0.3...openfeature-v0.0.4) (2022-10-04)
### Bug Fixes
* disable QEMU ([#70](https://github.com/open-feature/playground/issues/70)) ([ecfcf84](https://github.com/open-feature/playground/commit/ecfcf8469287faae1d311c4d965a3d360545b35c))
## [0.0.3](https://github.com/open-feature/playground/compare/openfeature-v0.0.2...openfeature-v0.0.3) (2022-10-04)
### Bug Fixes
* add qemu ([f2991b7](https://github.com/open-feature/playground/commit/f2991b7ee56ff52e460b6477ba92fe06c694724f))
## [0.0.2](https://github.com/open-feature/playground/compare/openfeature-v0.0.1...openfeature-v0.0.2) (2022-10-04)

View File

@ -1,12 +1,12 @@
FROM node:20.18-bullseye AS builder
FROM node:16-bullseye AS builder
WORKDIR /tmp/playground/
COPY package*.json tsconfig*.json nx.json babel.config.json ./
COPY package*.json workspace.json tsconfig*.json nx.json babel.config.json ./
COPY schemas/ ./schemas/
RUN npm ci
RUN npm install
COPY packages/ ./packages/
RUN npm run build:app
RUN npm run build
FROM node:20-alpine as app
FROM node:16-bullseye as app
WORKDIR /opt/playground/
COPY package*.json ./
@ -17,7 +17,7 @@ COPY --from=builder /tmp/playground/dist ./dist
COPY scripts ./scripts
COPY schemas ./schemas
LABEL org.opencontainers.image.source=https://github.com/open-feature/playground
LABEL org.opencontainers.image.source=https://github.com/open-feature/open-feature-demo
EXPOSE 30000

220
README.md
View File

@ -6,8 +6,8 @@
## Welcome to the OpenFeature playground
The OpenFeature playground is a great place to familiarize yourself with the core concepts and features available in OpenFeature.
If you're brand new to feature flagging, consider reviewing the [What are feature flags?](https://openfeature.dev/docs/reference/intro/#what-are-feature-flags) section in our documentation before running the demo.
The OpenFeature playground is a great place to familiarize with the core concepts and features available in OpenFeature.
If you're brand new to feature flagging, consider reviewing the [What are feature flags?](https://docs.openfeature.dev/docs/reference/intro/#what-are-feature-flags) section in our documentation before running the demo.
<!-- Can be updated automatically by running `npm run markdown-toc` >
@ -21,21 +21,19 @@ If you're brand new to feature flagging, consider reviewing the [What are featur
- [Test in production](#test-in-production)
- [Available providers](#available-providers)
- [Environment Variable](#environment-variable)
- [flagd](#flagd)
- [FlagD](#flagd)
- [Flag Configuration in FlagD](#flag-configuration-in-flagd)
- [Go Feature Flag](#go-feature-flag)
- [CloudBees Feature Management](#cloudbees-feature-management)
- [Split](#split)
- [Harness](#harness)
- [LaunchDarkly](#launchdarkly)
- [Flagsmith](#flagsmith)
- [Flipt](#flipt)
- [ConfigCat](#configcat)
- [Flagsmith Provider Demo](#flagsmith-provider-demo)
- [Experimenting beyond the demo](#experimenting-beyond-the-demo)
- [Evaluation context](#evaluation-context)
- [Troubleshooting](#troubleshooting)
- [Ports are not available](#ports-are-not-available)
- [Vendor isn't listed in the dropdown](#vendor-isnt-listed-in-the-dropdown)
- [The UI is always grey](#the-ui-is-always-grey)
<!-- tocstop -->
@ -78,52 +76,51 @@ In order to run the demo, you'll need the following tools available on your syst
## What's in the demo?
The demo consists of three different scenarios where feature flags are used. They help the fictional company Fib3r safely test and release new features. Two of the flags are `client-side` flags, which are evaluated in the web browser. One is a `server-side` flag, which is evaluated on the web server.
The demo consists of three different scenarios where feature flags are used. They help the fictional company Fib3r safely test and release new features.
### Rebranding
As we all know, naming is hard! In this scenario, the team at Fib3r is in the process of rebranding from `FaaS` to `Fib3r`. This may seem like a situation where a feature flag is unnecessary. However, many times, a rebranding needs to correspond with a press release or blog post. Of course, you could time a deployment moments before the announcement, but that's potentially risky and may require coordination across multiple teams. Using a feature flag would allow you to deploy when it's convenient, test in production by enabling the feature for a subset of users, and then enable it instantly for everyone.
As we all know, naming is hard! In this scenario, the team at Fib3r is in the process of rebranding from `FaaS` to `Fib3r`. This may seem like a situation where a feature flag is unnecessary. However, may times a rebranding needs to correspond with a press release or blog post. Of course, you could time a deployment moments before the announcement but that's potentially risky and may require coordination across multiple teams. Using a feature flag would allow you to deploy when it's convent, tests in production by enabled the feature for a subset of users, and then enable the feature instantly for everyone.
For the rebranding effort, we're only interested in being able to toggle the new welcome message on and off. A boolean value is exactly what we need! That can be accomplished in OpenFeature like [this](https://github.com/open-feature/playground/blob/main/packages/ui/src/app/demos/fib3r/fib3r-demo.tsx#:~:text=getBooleanValue).
For the rebranding effort, we're only interested in being able to toggle the new welcome message on and off. A boolean value is exactly what we need! That can be accomplished in OpenFeature like [this](https://github.com/open-feature/playground/blob/main/packages/app/src/app/message/message.service.ts).
### Experimenting with color
The team at Fib3r has a hypothesis. They feel that the reason Fib3r hasn't achieved unicorn status is that the current color of the landing page is responsible for high bounce rates. This is a great opportunity to use feature flags for experimentation. With feature flags, it's possible to measure the impact a change has on the metrics that are important to your business.
The team at Fib3r has a hypothesis. They feel that the reason Fib3r hasn't achieved unicorn status is because the current color of the landing page is responsible for high bounce rates. This is a great opportunity to use feature flags for experimentation. With feature flags, it's possible to measure the impact a change has on the metrics that are important to your business.
[Diving into the code](https://github.com/open-feature/playground/blob/main/packages/ui/src/app/demos/fib3r/fib3r-demo.tsx#:~:text=getStringValue), you may notice that an `after` hook has been defined. [Hooks](https://openfeature.dev/docs/reference/concepts/hooks) are a powerful feature that can be used to extend OpenFeature capabilities. In this case, the code expects a valid CSS hex color value. However, _the person configuring the feature flag in a remote feature flag management tool may not be aware of this requirement_. That's where a validation hook could be used to ensure only valid CSS values are returned. In this hook, the evaluated value is tested against a regular expression. If it doesn't match, a warning message is logged, and the hook throws an error. OpenFeature will catch the error and return the default value.
[Diving into the code](https://github.com/open-feature/playground/blob/main/packages/app/src/app/hex-color/hex-color.service.ts), you may notice that an `after` hook has been defined. [Hooks](https://docs.openfeature.dev/docs/reference/concepts/hooks) are a powerful feature that can be used to extend OpenFeature capabilities. In this case, the code is expecting a valid css hex color value. However, _the person configuring the feature flag in a remote feature flag management tool may not be aware of this requirement_. That's where a validation hook could be used to ensure only valid CSS values are returned. In this hook, the evaluated value is tested against a regular expression. If it doesn't match, a warning messaged is logged and the hook throws an error. OpenFeature will catch the error and return the default value.
### Test in production
Fib3r is on a mission to help the world calculate the nth digit of Fibonacci more efficiently. According to a Stack Overflow article the team recently found, it's possible to use Binet's Formula to calculate Fibonacci more efficiently. While the initial tests look promising, changing the underlying algorithm Fib3r has used for years is risky. The team decided that it would be safer put the new feature behind a context-dependant feature flag so that only employees could use it initially. If the test goes well, the feature could be slowly rolled out to everyone or quickly reverted if an issue is discovered.
Fib3r is on a mission to help the world calculate the nth digit a Fibonacci more efficiently. According to a Stack Overflow article the team recently found, it's possible to use the Binet's Formula to calculate Fibonacci more efficiently. While the initial tests look promising, changing the underlying algorithm Fib3r has used for years is risky. The team decided that it would be safer put the new feature behind a context-dependant feature flag so that only employees could use it, initially. If the test goes well, the feature could be slowly rolled out to everyone or quickly revert if an issue is discovered.
Let's see how this could be done using OpenFeature. [Here](https://github.com/open-feature/playground/blob/main/packages/fibonacci/src/lib/fibonacci.ts) is where the Fib3r team adds a feature flag that returns the name of the algorithm to run. Looking closely at the `getStringValue` method, you'll notice [evaluation context](https://openfeature.dev/docs/reference/concepts/evaluation-context) is not being defined. Evaluation context is commonly used in feature flagging to determine the flag value dynamically. For example, the Fib3r team may want to test the `binet` algorithm on employees only. This can be done by setting the user's email address as evaluation context and defining a rule that returns `binet` only when the email address ends with `@faas.com`. Simple enough, but remember that the evaluation context wasn't explicitly set during the flag evaluation linked above. That's because OpenFeature allows developers to set evaluation context at various points in their application. In this case, evaluation context is set [on each transaction](https://github.com/open-feature/playground/blob/main/packages/app/src/app/transaction-context.middleware.ts) and automatically used during flag evaluation.
Let's see how this could be done using OpenFeature. [Here](https://github.com/open-feature/playground/blob/main/packages/fibonacci/src/lib/fibonacci.ts) is where the Fib3r team add a feature flag that returns the name of the algorithm to run. Looking closely at the `getStringValue` method, you'll notice [evaluation context](https://docs.openfeature.dev/docs/reference/concepts/evaluation-context) is not being defined. Evaluation context is commonly used in feature flagging to dynamically determine the flag value. For example, the Fib3r team may want to test the `binet` algorithm on employees only. This can be done by setting the user's email address as evaluation context and defining a rule that returns `binet` only when the email address ends with `@faas.com`. Simple enough, but remember that evaluation context wasn't explicitly set during the flag evaluation linked above. That's because OpenFeature allows developers to set evaluation context at various points in their application. In this case, evaluation context is set [on each transaction](https://github.com/open-feature/playground/blob/main/packages/app/src/app/transaction-context.middleware.ts) and automatically used during flag evaluation.
## Available providers
The following [providers](https://openfeature.dev/docs/reference/concepts/provider) can be used in the demo. Locate the provider you're interested in using to learn more.
The following [providers](https://docs.openfeature.dev/docs/reference/concepts/provider) can be used in the demo. Locate the provider you're interested in using to learn more.
### Environment Variable
The environment variable provider is a simple demo showing how environment
variables could be used to make flag evaluations. Its purpose is to show how a basic
variables could be used make flag evaluations. Its purpose is to show how a basic
provider **could** be [implemented](https://github.com/open-feature/playground/blob/main/packages/js-env-provider/src/lib/js-env-provider.ts).
To get started, follow the instructions in the [How to run the demo](#how-to-run-the-demo) section. Once in the demo app, select `env` from the dropdown located at the bottom-right of the screen. To change a flag value, open the `.env` file in your favorite text editor. Update the flag values based on the options defined as comments above the flag key. When you're ready, save the file and restart the demo.
Using environment variables like this can be a good way to get started with feature flagging. However, the approach only supports basic use cases and is quite cumbersome.
Using environment variables like this can be a good way to get started with feature flagging. However, the approach only support basic use cases and is quite cumbersome.
### flagd
### FlagD
[flagd](https://github.com/open-feature/flagd) is an OpenFeature compliant flag evaluation daemon.
Following the Unix philosophy, it provides one component of a full feature flagging solution: a service for storing and evaluating flags.
It supports the ability to define flag configurations in various locations, including a local file, an HTTP service, or in the case you're using Kubernetes, directly from the Kubernetes API.
[FlagD](https://github.com/open-feature/flagd) is a OpenFeature compliant flag evaluation daemon.
Following the unix philosophy, it provides one component of a full feature flagging solution: a service for storing and evaluating flags.
It supports the ability to define flag configurations in various locations include a local file, a HTTP service, or in the case you're using Kubernetes, directly from the Kubernetes API.
In this demo, FlagD starts automatically as part of the Docker Compose file. It's configured to watch a local file `/config/flagd/flags.json` for flag configurations. Feel free to modify this file and see how it affects the demo. Valid configuration changes should be reflected almost immediately.
In this demo, FlagD starts automatically as part of the Docker Compose file. It's configured to watch a local file `/config/flagd/flags.json` for flag configurations. Feel free to modify this file and see how it affects the demo. Valid configurations changes should be reflected almost immediately.
<details>
<summary>Flag Configuration in FlagD</summary>
#### Flag Configuration in FlagD
A FlagD configuration is represented as a JSON object. Feature flag configurations can be found under `flags`, and each item within `flags` represents a flag key (the unique identifier for a flag) and its corresponding configuration.
A FlagD configuration is represented as a JSON object. Feature flag configurations can be found under `flags` and each item within `flags` represents a flag key (the unique identifier for a flag) and its corresponding configuration.
Valid flag configuration options include:
@ -139,7 +136,7 @@ Example:
##### Variants
`variants` is a **required** property. It is an object containing the possible variations supported by the flag. All the object's values **must** be the same type (e.g. boolean, numbers, string, JSON). The type used as the variant value will directly affect how the flag is accessed in OpenFeature. For example, to use a flag configured with boolean values, the `getBooleanValue` or `getBooleanDetails` methods should be used. If another method, such as `getStringValue` is called, a type mismatch occurs and the default value is returned.
`variants` is a **required** property. It is an object containing the possible variations supported by the flag. All the values of the object **must** but the same type (e.g. boolean, numbers, string, JSON). The type used as the variant value will correspond directly affects how the flag is accessed in OpenFeature. For example, to use a flag configured with boolean values the `getBooleanValue` or `getBooleanDetails` methods should be used. If another method such as `getStringValue` is called, a type mismatch occurred and the default value is returned.
Example:
@ -207,12 +204,12 @@ Example of an invalid configuration:
##### Targeting Rules
`targeting` is an **optional** property. A targeting rule **must** be valid JSON. FlagD uses a modified version of [JSON Logic](https://jsonlogic.com/), as well as some custom pre-processing, to evaluate these rules. The output of the targeting rule **must** match the name of one of the variants defined above. If an invalid or null value is returned by the targeting rule, the `defaultVariant` value is used.
`targeting` is an **optional** property. A targeting rule **must** be valid JSON. FlagD uses a modified version of [JSON Logic](https://jsonlogic.com/), as well as some custom pre-processing, to evaluate these rules. The output of the targeting rule **must** match the name of one of the variants defined above. If an invalid or null value is is returned by the targeting rule, the `defaultVariant` value is used.
The [JSON Logic playground](https://jsonlogic.com/play.html) is a great way to experiment with new targeting rules. The following example shows how a rule could be configured to return `binet` when the email (which comes from the evaluation context) contains `@faas.com`. If the email wasn't included in the evaluation context or didn't contain `@faas.com`, null is returned, and the `defaultVariant` is used instead. Let's see how this targeting rule would look in the JSON Logic playground.
The [JSON Logic playground](https://jsonlogic.com/play.html) is a great way to experiment with new targeting rules. The following example shows how a rule could be configured to return `binet` when the email (which comes from evaluation context) contains `@faas.com`. If the email wasn't included in the evaluation context or doesn't contain `@faas.com`, null is returned and the `defaultVariant` is used instead. Let's see how this targeting rule would look in the JSON Logic playground.
1. Open the [JSON Logic playground](https://jsonlogic.com/play.html) in your favorite browser
2. Add the following JSON as the `Rule`:
2. Add the follow JSON as the `Rule`:
```json
{
@ -243,22 +240,19 @@ The [JSON Logic playground](https://jsonlogic.com/play.html) is a great way to e
5. confirm the output show `"binet"`
6. Optionally, experiment with different rules and data
</details>
### Go Feature Flag
[Go Feature Flag](https://gofeatureflag.org/) is a open source feature flagging solution. It can define flag configurations in various locations (HTTP, S3, GitHub, file, Google Cloud Storage, Kubernetes). OpenFeature is able to integrate with Go Feature Flag by using the [Go Feature Flag Relay Proxy](https://github.com/thomaspoignant/go-feature-flag-relay-proxy).
[Go Feature Flag](https://gofeatureflag.org/) is a open source feature flagging solution. It provides the ability to define flag configurations in various locations (HTTP, S3, GitHub, file, Google Cloud Storage, Kubernetes). OpenFeature is able to integrate with Go Feature Flag by using the [Go Feature Flag Relay Proxy](https://github.com/thomaspoignant/go-feature-flag-relay-proxy).
In this demo, Go Feature Flag starts automatically as part of the Docker Compose file. It's configured to watch a local file `/config/go-feature-flag/flags.yaml` for flag configurations. Feel free to modify this file and see how it affects the demo. Valid configuration changes should be reflected almost immediately. Documentation on how to configure a flag can be found [here](https://docs.gofeatureflag.org/v0.28.0/flag_format/).
In this demo, Go Feature Flag starts automatically as part of the Docker Compose file. It's configured to watch a local file `/config/go-feature-flag/flags.yaml` for flag configurations. Feel free to modify this file and see how it affects the demo. Valid configurations changes should be reflected almost immediately. Documentation on how to configure a flag can be found [here](https://docs.gofeatureflag.org/v0.28.0/flag_format/).
### CloudBees Feature Management
[CloudBees Feature Management](https://www.cloudbees.com/capabilities/feature-management) is an advanced feature flagging solution that lets your development teams quickly build and deploy applications without compromising on safety. By providing a gradual release mechanism and a simple way to define target audiences, CloudBees Feature Management allows developers and product managers to optimize feature releases and customize the user experience. CloudBees Feature Management gives teams control over features that are in staging, production, or any environment in the deployment pipeline.
[CloudBees Feature Management](https://www.cloudbees.com/capabilities/feature-management) is an advanced feature flagging solution that lets your development teams quickly build and deploy applications without compromising on safety.
<details>
<summary>Follow these steps to set up CloudBees for the demo:</summary>
Follow these steps to setup CloudBees for the demo:
1. Sign in to your CloudBees Feature Management account. If you don't already have an account, you can use the [free community edition](https://www.cloudbees.com/c/feature-management-free-trial-sign-up).
1. Sign-in to your CloudBees Feature Management account. If you don't already have an account, you can use the [free community edition](https://www.cloudbees.com/c/feature-management-free-trial-sign-up).
1. Within the CloudBees Feature Management UI, add a new application called `OpenFeature playground`. You can keep the default environment of `production`.
1. In `App Settings` add a new custom STRING property called `email` as shown below. This is used in the `fib-algo` configuration to control the flag value via the email of the user logging into the playground application.
@ -274,28 +268,26 @@ In this demo, Go Feature Flag starts automatically as part of the Docker Compose
<img src="./images/cloudbees/cb-fib-algo.png" width="50%">
1. Ensure for each flag, the configuration switch is set to ON, as shown below
1. Ensure for each flag, the configuration switch is set to ON as shown below
<img src="./images/cloudbees/cb-config-on.png" width="20%">
1. Ensure the completed list of flags looks as follows
1. Ensure the completed list of flags look as follows
<img src="./images/cloudbees/cb-flag-list.png" width="50%">
1. Copy the production environment key found under `App settings` > `Environments`
1. Open the `.env` file and make the value of `CLOUDBEES_APP_KEY` the key copied above
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `cloudbees` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via CloudBees! Note that for "UI" flags (`hex-color`, `new-welcome-message`) you have to select `Platform: Browser` in the platform dropdown when modifying flag values.
</details>
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `cloudbees` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via CloudBees!
### Split
[Split](https://www.split.io/) is a unified feature flagging and experimentation platform enabling product and engineering teams to reduce cycle times, mitigate release risk, and maximize business impact throughout the [Feature Delivery Lifecycle](https://www.split.io/product/feature-delivery-lifecycle/).
[Split](https://www.split.io/) is a feature delivery platform that powers feature flag management, software experimentation, and continuous delivery.
<details>
<summary>Follow these steps to set up Split for the demo:</summary>
Follow these steps to setup Split for the demo:
1. Sign in to your Split account. If you don't already have an account, you can use the [Split Free Edition](https://www.split.io/signup/).
1. Sign-in to your Split account. If you don't already have an account, you can use the [Split Free Edition](https://www.split.io/signup/).
1. Create a new split called `new-welcome-message` and use the default treatments.
<img src="./images/split/new-welcome-message.png" width="50%">
@ -312,21 +304,18 @@ Now that everything is configured, you should be able to [start the demo](#how-t
<img src="./images/split/fib-algo-targeting.png" width="50%">
1. Create a new [server-side](https://help.split.io/hc/en-us/articles/360019916211-API-keys) and client side API keys. This can be done by navigating to `Admin settings` > `API keys` > `Create API key`.
1. Open the `.env` file and set the values of `SPLIT_KEY` and `SPLIT_KEY_WEB` to the keys copied above.
1. Create a new [server-side API key](https://help.split.io/hc/en-us/articles/360019916211-API-keys). This can be done by navigating to `Admin settings` > `API keys` > `Create API key`
1. Open the `.env` file and make the value of `SPLIT_KEY` the key copied above
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `split` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via Split!
</details>
### Harness
[Harness Feature Flags](https://harness.io/products/feature-flags) is a new approach to feature management that empowers teams to move faster and have more control at the same time. Templatize feature rollouts, automate release workflows, build using GitOps and config as code, and get complete control over what gets released and when, without sacrificing velocity.
[Harness Feature Flags](https://harness.io/products/feature-flags) provides automate progressive delivery and feature release pipelines to ship more features with less risk.
<details>
<summary>Follow these steps to set up Harness for the demo:</summary>
Follow these steps to setup Harness for the demo:
1. Sign in to your Harness account. If you don't already have an account, you can use the [free plan](https://harness.io/pricing?module=ff#).
1. Sign-in to your Harness account. If you don't already have an account, you can use the [free plan](https://harness.io/pricing?module=ff#).
1. Use an existing organization and project or [create a new one](https://docs.harness.io/article/36fw2u92i4-create-an-organization).
1. Create a new boolean feature flag called `new-welcome-message` and confirm the ID is `newwelcomemessage`.
@ -346,131 +335,29 @@ Now that everything is configured, you should be able to [start the demo](#how-t
<img src="./images/harness/target-rules.png" width="50%">
1. Create new server and client SDK keys. This can be done by navigating to `Environments` > `Development` > `New SDK Key`.
1. Open the `.env` file and set the values of `HARNESS_KEY` and `HARNESS_KEY_WEB` to the keys copied above.
1. Create a new server-side SDK key. This can be done by navigating to `Environments` > `Development` > `New SDK Key`
1. Open the `.env` file and make the value of `HARNESS_KEY` the key copied above
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `harness` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via Harness!
</details>
### LaunchDarkly
[LaunchDarkly](https://launchdarkly.com/) unleashes developer productivity for the software-powered world by fundamentally changing how you deliver software to your customers. With LaunchDarkly's feature management platform, empowered developers can empower the business to release new features faster and more efficiently than ever.
Documentation coming soon
<details>
<summary>Follow these steps to set up LaunchDarkly for the demo:</summary>
### Flagsmith Provider Demo
1. Sign in to your LaunchDarkly account. If you don't already have an account, you can sign up for a [free trial](https://launchdarkly.com/pricing/).
1. Create a new feature flag with the key `new-welcome-message` using the default boolean flag variation.
1. Go to "Settings" for this flag and ensure that `"SDKs using Client-side ID"` is checked under `"Client-side SDK availability"`.
<img src="./images/launchdarkly/new-welcome-message.png" width="50%">
1. Create a new feature flag with the key `hex-color`. Set the flag variations to `string` and add three variations with the following variation and name: `c05543` - red, `2f5230` - green, and `0d507b` - blue.
1. Go to the "Settings" for this flag and ensure that `"SDKs using Client-side ID"` is checked under `"Client-side SDK availability"`.
<img src="./images/launchdarkly/hex-color.png" width="50%">
1. Create a new feature flag with the key `fib-algo`. Set the flag variations to `string` and add these variants to both the variation and name: `recursive`, `memo`, `loop`, `binet`, and `default`.
<img src="./images/launchdarkly/fib-algo.png" width="50%">
1. Select the `fib-algo` flag and add a targeting rule that looks for the `email` to end with `@faas.com` and serves `binet`.
<img src="./images/launchdarkly/target-rules.png" width="50%">
1. Navigate to `Account settings` > `Environments` and copy the `SDK Key` and `Client-side ID` associated with the environment you would like to use.
1. Open the `.env` file and set the values of `LD_KEY` and `LD_KEY_WEB` to the `SDK Key` and `Client-side ID` of the key copied above.
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `launchdarkly` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via LaunchDarkly!
</details>
### Flagsmith
[Flagsmith](https://flagsmith.com/) is an open source, fully featured, Feature Flag and Remote Config service. They support a low latency hosted Edge API, deployment to your own private cloud, or running on-premise. Flagsmith makes it easy to create and manage features across web, mobile, and server side applications.
<details>
<summary>Follow these steps to set up Flagsmith for the demo:</summary>
1. Sign in to your Flagsmith account. If you don't already have an account, you can sign up for the [free plan](https://flagsmith.com/pricing/).
1. Navigate to `Environment` > `Development` > `Features`.
1. Create a new feature with the id `new-welcome-message`. Enabled the feature and add a `true` and `false` variation values. Confirm that `true` is the control value and set it to 100%.
<img src="./images/flagsmith/new-welcome-message.png" width="50%">
1. Create a new feature with the id `hex-color`. Enabled the feature and add a `c05543`, `2f5230`, and `0d507b` variation values. Confirm that `c05543` is the control value and set it to 100%.
<img src="./images/flagsmith/hex-color.png" width="50%">
1. Create a new feature with the id `fib-algo`. Enabled the feature and add a `recursive`, `memo`, `loop`, `binet`, and `default` variation values. Confirm that `recursive` is the control value and set it to 100%.
<img src="./images/flagsmith/fib-algo.png" width="50%">
1. Create a new segment called `fib3r_employees` and add a rule that checks if email trait `email` contains `@faas.com`.
<img src="./images/flagsmith/segment-config.png" width="50%">
1. Select the `fib-algo` feature under the development environment and add a segment override. Select the `fib3r_employees` override, enable the override, and confirm the control is set to `binet`.
<img src="./images/flagsmith/segment-override.png" width="50%">
1. Navigate to `Environments` > `Development` > `Settings` and create a new server-side environment key.
<img src="./images/flagsmith/server-side-key.png" width="50%">
1. Open the `.env` file and set the values of `FLAGSMITH_ENV_KEY` the key copied above, and `FLAGSMITH_ENV_KEY_WEB` to the value of the `"Client-side Environment Key"` shown in the Flagsmith UI.
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `flagsmith` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via Flagsmith!
</details>
### Flipt
[Flipt](https://www.flipt.io/) is an open-source feature management platform that's fully self-hosted.
It's easy to set up, has no seat limits, and is built for developers from scale-ups to enterprises.
After [starting the demo](#how-to-run-the-demo), the Flipt UI is available at [http://localhost:8080](http://localhost:8080).
### ConfigCat
[ConfigCat](https://configcat.com/) is a user-friendly, scalable and secure feature flagging solution with clear [pricing](https://configcat.com/#pricing). ConfigCat allows for unlimited team members and MAUs across all plans, including the free tier. All ConfigCat plans come with all security measures, including audit logs, two-factor authentication, SSO, SAML and SCIM for secure feature management. ConfigCat offers users the choice to keep data within the EU to comply with GDPR more easily. ConfigCat provides SDKs for all major programming languages and platforms.
<details>
<summary>Follow these steps to set up ConfigCat for the demo:</summary>
1. Sign in to your ConfigCat account. If you don't already have an account, you can [sign up](https://app.configcat.com/auth/signup) for free.
1. Create a new feature flag with the key `new-welcome-message`.
<img src="./images/configcat/new-welcome-message.png">
1. Create a new text setting with the key `hex-color`. Add three percentage options (`+ %` button) with the following values: `c05543`, `2f5230`, and `0d507b`. Set `c05543` to 100%. Set the `To unindentified` value to `c05543`.
<img src="./images/configcat/hex-color.png">
1. Create a new text setting with the key `fib-algo`.
- Add a targeting rule (`+ IF` button) that looks for the `Email` user attribute to end with `@faas.com` and serves `binet`.
- Add five percentage options (`+ %` button) with the following values: `recursive`, `memo`, `loop`, `binet`, and `default`. Set `recursive` to 100%.
- Set the `To unindentified` value to `default`.
<img src="./images/configcat/fib-algo.png">
1. Click on `VIEW SDK KEY` and copy the `SDK Key`.
<img src="./images/configcat/sdk-key.png">
1. Open the `.env` file and set the values of `CONFIGCAT_SDK_KEY` and `CONFIGCAT_SDK_KEY_WEB` to the key copied above.
Now that everything is configured, you should be able to [start the demo](#how-to-run-the-demo). Once it's started, select `configcat` from the provider list located at the bottom right of your screen. You should now be able to control the demo app via ConfigCat!
</details>
Documentation coming soon
## Experimenting beyond the demo
### Evaluation context
The following evaluation context is available during flag evaluation. That means any of these properties can be used when defining a rule in the feature flag manager of your choosing.
The follow evaluation context is available during flag evaluation. That means any of these properties can be used when defining rule in the feature flag manager of your choosing.
| Name | Description |
| ------------ | -------------------------------------------------------------------------------------- |
| ip | The IP address sent from the browser. This comes from the `x-forwarded-for` header. |
| email | The email address of the logged-in user. Returns `anonymous` if the user is logged out |
| email | The email address of the logged in user. Returns `anonymous` if the user is logged out |
| targetingKey | Same as email |
| method | The HTTP method used (e.g. GET, POST, PUT) |
| path | The HTTP path of the request (e.g. /hex-color) |
@ -480,13 +367,8 @@ The following evaluation context is available during flag evaluation. That means
### Ports are not available
Confirm that the following ports are available `30000`, `8013`, and `16686`.
Confirm that the follow ports are available `30000` and `16686`.
### Vendor isn't listed in the dropdown
To add a vendor to the demo, follow the vendor-specific section in the documentation. An SDK key **must** be added to the appropriate property in the `.env` file and the demo needs to be restarted.
### The UI is always grey
This means that the provider you've select either doesn't support client-side (see [what's in the demo](#whats-in-the-demo) section) or it's not working properly.
Ensure you've correctly configured the respective client-side provider, including the credentials.
To add a vendor to the demo, follow the vendor specific section in the documentation. An SDK key **must** be added to the appropriate property in the `.env` file and the demo needs to be restarted.

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View File

@ -1,6 +1,3 @@
{
"babelrcRoots": ["*"],
"presets": [
"@babel/preset-react"
]
"babelrcRoots": ["*"]
}

View File

@ -13,34 +13,9 @@
"variants": {
"red": "c05543",
"green": "2f5230",
"blue": "0d507b",
"yellow": "d4ac0d"
"blue": "0d507b"
},
"defaultVariant": "blue",
"targeting": {
"if": [
{
"in": [
"@faas.com",
{
"var": [
"email"
]
}
]
},
"yellow",
null
]
}
},
"use-remote-fib-service": {
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
"defaultVariant": "blue"
},
"fib-algo": {
"state": "ENABLED",

View File

@ -1,79 +0,0 @@
version: "1.2"
namespace: default
flags:
- key: new-welcome-message
name: new-welcome-message
type: BOOLEAN_FLAG_TYPE
description: Controls the welcome banner message
enabled: true
rollouts:
- threshold:
percentage: 100
value: true
- key: hex-color
name: hex-color
type: VARIANT_FLAG_TYPE
description: Controls the UI color
enabled: true
variants:
- key: c05543
name: red
- key: 2f5230
name: green
- key: 0d507b
name: blue
- key: d4ac0d
name: yellow
rules:
- segment: Signed-In-Users
distributions:
- variant: d4ac0d
rollout: 100
- segment: All-Users
distributions:
- variant: 2f5230
rollout: 100
- key: use-remote-fib-service
name: use-remote-fib-service
type: BOOLEAN_FLAG_TYPE
description: Controls whether the remote fib service is used
enabled: true
rollouts:
- segment:
key: Signed-In-Users
value: true
- segment:
key: All-Users
- key: fib-algo
name: fib-algo
type: VARIANT_FLAG_TYPE
description: The algorithm to calculate the fibbonaci sequence
enabled: true
variants:
- key: binet
name: binet
- key: memo
name: memo
- key: loop
name: loop
- key: recursive
name: recursive
rules:
- segment: All-Users
distributions:
- variant: memo
rollout: 100
segments:
- key: All-Users
name: All Users
description: All users are matched
match_type: ALL_MATCH_TYPE
- key: Signed-In-Users
name: Signed In Users
description: Users that are signed in
constraints:
- type: STRING_COMPARISON_TYPE
property: email
operator: suffix
value: '@faas.com'
match_type: ALL_MATCH_TYPE

View File

@ -22,15 +22,6 @@ hex-color:
default: 2f5230
percentage: 100
# Controls whether the remote fib service is used
# - true
# - false
use-remote-fib-service:
true: true
false: false
default: true
percentage: 100
# Must be a valid algorithm name
# - recurive
# - memo

View File

@ -1,131 +0,0 @@
# Flags for our UI
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
name: ui-flags
labels:
app: open-feature-demo
spec:
flagSpec:
flags:
new-welcome-message:
state: ENABLED
variants:
'on': true
'off': false
defaultVariant: 'off'
hex-color:
variants:
red: c05543
green: 2f5230
blue: 0d507b
yellow: d4ac0d
defaultVariant: blue
state: ENABLED
targeting:
if:
- in:
- '@faas.com'
- var:
- email
- yellow
- null
---
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag CRDs
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlagSource
metadata:
name: ui-flag-source
labels:
app: open-feature-demo
spec:
sources:
- source: ui-flags
provider: kubernetes
---
# Standalone flagd for serving UI
apiVersion: core.openfeature.dev/v1beta1
kind: Flagd
metadata:
name: flagd-ui
spec:
replicas: 1
serviceAccountName: default
featureFlagSource: ui-flag-source
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/force-ssl-redirect: 'false'
hosts:
- localhost
- ''
ingressClassName: nginx
pathType: Prefix
---
# Deployment of a demo-app using our custom resources
apiVersion: apps/v1
kind: Deployment
metadata:
name: open-feature-demo-deployment
labels:
app: open-feature-demo
spec:
replicas: 1
selector:
matchLabels:
app: open-feature-demo
template:
metadata:
labels:
app: open-feature-demo
annotations:
openfeature.dev/enabled: 'true'
openfeature.dev/inprocessconfiguration: 'in-process-config'
spec:
containers:
- name: open-feature-demo
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
ports:
- containerPort: 30000
args:
- flagd
env:
- name: FLAGD_PORT_WEB
value: '80'
- name: FLAGD_OFREP_PORT_WEB
value: '80'
---
# Service to expose our application
apiVersion: v1
kind: Service
metadata:
name: open-feature-demo-app-service
labels:
app: open-feature-demo
spec:
type: NodePort
selector:
app: open-feature-demo
ports:
- port: 30000
targetPort: 30000
nodePort: 30000
---
# Ingress for our application
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: open-feature-demo-ingress
spec:
ingressClassName: nginx
rules:
- host: localhost
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: open-feature-demo-app-service
port:
number: 30000

View File

@ -1,144 +0,0 @@
# Flags for our UI
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
name: ui-flags
labels:
app: open-feature-demo
spec:
flagSpec:
flags:
new-welcome-message:
state: ENABLED
variants:
'on': true
'off': false
defaultVariant: 'off'
hex-color:
variants:
red: c05543
green: 2f5230
blue: 0d507b
yellow: d4ac0d
defaultVariant: blue
state: ENABLED
targeting:
if:
- in:
- '@faas.com'
- var:
- email
- yellow
- null
---
# Flags for our backend application
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
name: app-flags
labels:
app: open-feature-demo
spec:
flagSpec:
flags:
fib-algo:
variants:
recursive: recursive
memo: memo
loop: loop
binet: binet
defaultVariant: recursive
state: ENABLED
targeting:
if:
- in:
- '@faas.com'
- var:
- email
- binet
- null
use-remote-fib-service:
state: ENABLED
variants:
'on': true
'off': false
defaultVariant: 'off'
---
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag CRDs
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlagSource
metadata:
name: flag-sources
labels:
app: open-feature-demo
spec:
sources:
- source: app-flags
provider: kubernetes
- source: ui-flags
provider: kubernetes
---
# Deployment of a demo-app using our custom resources
apiVersion: apps/v1
kind: Deployment
metadata:
name: open-feature-demo-deployment
labels:
app: open-feature-demo
spec:
replicas: 1
selector:
matchLabels:
app: open-feature-demo
template:
metadata:
labels:
app: open-feature-demo
annotations:
openfeature.dev/enabled: 'true'
openfeature.dev/featureflagsource: 'flag-sources'
spec:
containers:
- name: open-feature-demo
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
args:
- flagd
ports:
- containerPort: 30000
env:
- name: FLAGD_PORT_WEB
value: '30002'
---
# Service to expose our application
apiVersion: v1
kind: Service
metadata:
name: open-feature-demo-app-service
labels:
app: open-feature-demo
spec:
type: NodePort
selector:
app: open-feature-demo
ports:
- port: 30000
targetPort: 30000
nodePort: 30000
---
# Service to expose flagd for client-side evaluations
# Note that in production, it's recommended to run a dedicated flagd deployment to serve client-side evaluations.
apiVersion: v1
kind: Service
metadata:
name: open-feature-demo-ui-service
labels:
app: open-feature-demo
spec:
type: NodePort
selector:
app: open-feature-demo
ports:
- port: 30002
targetPort: 8013
nodePort: 30002

View File

@ -1,125 +0,0 @@
# Flags for our backend application
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
name: app-flags
labels:
app: open-feature-demo
spec:
flagSpec:
flags:
fib-algo:
variants:
recursive: recursive
memo: memo
loop: loop
binet: binet
defaultVariant: recursive
state: ENABLED
use-remote-fib-service:
state: ENABLED
variants:
'on': true
'off': false
defaultVariant: 'off'
---
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag CRDs
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlagSource
metadata:
name: app-flag-source
labels:
app: open-feature-demo
spec:
sources:
- source: app-flags
provider: kubernetes
---
# Standalone flagd for serving in-process provider
apiVersion: core.openfeature.dev/v1beta1
kind: Flagd
metadata:
name: flagd-in-process
spec:
replicas: 1
serviceType: ClusterIP
serviceAccountName: default
featureFlagSource: app-flag-source
---
# In-process provider configuration
apiVersion: core.openfeature.dev/v1beta1
kind: InProcessConfiguration
metadata:
name: in-process-config
spec:
host: flagd-in-process
---
# Deployment of a demo-app using our custom resources
apiVersion: apps/v1
kind: Deployment
metadata:
name: open-feature-demo-deployment
labels:
app: open-feature-demo
spec:
replicas: 1
selector:
matchLabels:
app: open-feature-demo
template:
metadata:
labels:
app: open-feature-demo
annotations:
openfeature.dev/enabled: 'true'
openfeature.dev/inprocessconfiguration: 'in-process-config'
spec:
containers:
- name: open-feature-demo
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
ports:
- containerPort: 30000
args:
- flagd
env:
- name: FLAGD_PORT_WEB
value: '80'
- name: FLAGD_PATH_PREFIX
value: 'flagd'
- name: FLAGD_OFREP_PORT_WEB
value: '80'
---
# Service to expose our application
apiVersion: v1
kind: Service
metadata:
name: open-feature-demo-app-service
labels:
app: open-feature-demo
spec:
type: NodePort
selector:
app: open-feature-demo
ports:
- port: 30000
targetPort: 30000
nodePort: 30000
---
# Ingress for our application
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: open-feature-demo-ingress
spec:
ingressClassName: nginx
rules:
- host: localhost
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: open-feature-demo-app-service
port:
number: 30000

View File

@ -1,23 +0,0 @@
receivers:
otlp:
protocols:
grpc:
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
otlp/jaeger:
endpoint: jaeger:4317
tls:
insecure: true
processors:
batch:
service:
pipelines:
traces:
receivers: [ otlp ]
processors: [ batch ]
exporters: [ otlp/jaeger ]
metrics:
receivers: [ otlp ]
processors: [ batch ]
exporters: [ prometheus ]

View File

@ -1,18 +0,0 @@
global:
scrape_interval: 5s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "playground"
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: [ 'otel-collector:8889' ]
- targets: [ 'otel-collector:8888' ]

View File

@ -1,10 +1,8 @@
version: '3.8'
services:
demo:
image: ghcr.io/open-feature/playground-app:v0.16.0 # x-release-please-version
# build:
# dockerfile: ./packages/app/Dockerfile
# context: .
# image: ghcr.io/open-feature/open-feature-demo:latest
build: .
ports:
- '30000:30000'
command:
@ -13,156 +11,48 @@ services:
depends_on:
- flagd
- jaeger
- fib-service
volumes:
- ./config/flagd/flags.json:/opt/playground/config/flagd/flags.json
- ${PWD}/config/flagd/flags.json:/opt/playground/config/flagd/flags.json
environment:
- FLAGD_HOST=flagd
- OTEL_EXPORTER_JAEGER_AGENT_HOST=jaeger
- OTEL_EXPORTER_JAEGER_AGENT_PORT=6832
- GO_FEATURE_FLAG_URL=http://go-feature-flag:1031
- GO_FEATURE_FLAG_WEB_URL=http://localhost:1031
- FIB_SERVICE_URL=http://fib-service:30001
- FLIPT_URL=http://flipt:8080
- FLIPT_WEB_URL=http://localhost:8080
- FIB_SERVICE_USER
- FIB_SERVICE_PASS
- FLAGD_HOST=flagd
- OTEL_EXPORTER_JAEGER_AGENT_HOST=jaeger
- OTEL_EXPORTER_JAEGER_AGENT_PORT=6832
- GO_FEATURE_FLAG_URL=http://go-feature-flag:1031
# Provider values come from the .env
- NEW_WELCOME_MESSAGE
- FIB_ALGO
- HEX_COLOR
# Feature Flag Vendor Keys come from the .env
## Server
- HARNESS_KEY
- SPLIT_KEY
- LD_KEY
- FLAGSMITH_ENV_KEY
- CLOUDBEES_APP_KEY
- CONFIGCAT_SDK_KEY
## Web
- HARNESS_KEY_WEB
- SPLIT_KEY_WEB
- LD_KEY_WEB
- FLAGSMITH_ENV_KEY_WEB
- CLOUDBEES_APP_KEY_WEB
- FLAGD_HOST_WEB
- FLAGD_PORT_WEB
- FLAGD_TLS_WEB
- CONFIGCAT_SDK_KEY_WEB
fib-service:
image: ghcr.io/open-feature/playground-fib-service:v0.16.0 # x-release-please-version
# build:
# dockerfile: ./packages/fibonacci-service/Dockerfile
# context: .
expose:
- '30001'
environment:
- FLAGD_HOST=flagd
- OTEL_EXPORTER_JAEGER_AGENT_HOST=jaeger
- OTEL_EXPORTER_JAEGER_AGENT_PORT=6832
- OTEL_SERVICE_NAME=fibonacci-service
- GO_FEATURE_FLAG_URL=http://go-feature-flag:1031
- FLIPT_URL=http://flipt:8080
- FIB_SERVICE_USER
- FIB_SERVICE_PASS
# Provider values come from the .env
- NEW_WELCOME_MESSAGE
- FIB_ALGO
- HEX_COLOR
# Feature Flag Vendor Keys come from the .env
- HARNESS_KEY
- SPLIT_KEY
- LD_KEY
- FLAGSMITH_ENV_KEY
- CLOUDBEES_APP_KEY
- CONFIGCAT_SDK_KEY
- NEW_WELCOME_MESSAGE
- FIB_ALGO
- HEX_COLOR
# Feature Flag Vendor Keys come from the .env
- HARNESS_KEY
- SPLIT_KEY
- LD_KEY
- FLAGSMITH_ENV_KEY
- CLOUDBEES_APP_KEY
jaeger:
image: jaegertracing/all-in-one:1.60
image: jaegertracing/all-in-one:1.38
expose:
- '6832/udp'
- '4317'
- "6832/udp"
ports:
- '16686:16686'
otel-collector:
image: otel/opentelemetry-collector-contrib:0.105.0
restart: always
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- ./config/otel/collector.yaml:/etc/otel-collector-config.yaml
expose:
- "1888" # pprof extension
- "8888" # Prometheus metrics exposed by the collector
- "8889" # Prometheus exporter metrics
- "4317" # OTLP gRPC receiver
depends_on:
- jaeger
- prometheus
prometheus:
container_name: prometheus
image: prom/prometheus:v2.55.1
restart: always
volumes:
- ./config/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
- "16686:16686"
flagd:
image: ghcr.io/open-feature/flagd:v0.11.5
image: ghcr.io/open-feature/flagd:v0.2.2
command:
- start
- --cors-origin
- '*'
- --sources
- '[{"uri":"etc/flagd/flags.json","provider":"file","selector":"etc/flagd/flags.json"}]'
- --metrics-exporter
- otel
- --otel-collector-uri
- otel-collector:4317
- --uri
- /etc/flagd/flags.json
volumes:
- ./config/flagd/flags.json:/etc/flagd/flags.json
ports:
- '8013:8013'
- '8016:8016'
- ${PWD}/config/flagd/flags.json:/etc/flagd/flags.json
expose:
- "8013"
go-feature-flag:
image: thomaspoignant/go-feature-flag:v1.40.0
image: thomaspoignant/go-feature-flag-relay-proxy:v0.3.0
volumes:
- ./config/go-feature-flag:/goff/
ports:
- "1031:1031"
init_flipt:
image: docker.flipt.io/flipt/flipt:v1.53.2
command: ["./flipt", "import", "/var/opt/flipt/flipt.yml"]
environment:
FLIPT_LOG_LEVEL: debug
FLIPT_META_TELEMETRY_ENABLED: false
FLIPT_DB_URL: "/var/opt/flipt/flipt.db"
volumes:
- "./config/flipt/flipt.yml:/var/opt/flipt/flipt.yml"
- "flipt:/var/opt/flipt"
flipt:
image: docker.flipt.io/flipt/flipt:v1.53.2
command: ["./flipt", "--force-migrate"]
environment:
FLIPT_CORS_ENABLED: true
FLIPT_TRACING_ENABLED: true
FLIPT_TRACING_EXPORTER: otlp
FLIPT_TRACING_OTLP_ENDPOINT: "otel-collector:4317"
FLIPT_DB_URL: "/var/opt/flipt/flipt.db"
volumes:
- "./config/flipt/flipt.yml:/var/opt/flipt/flipt.yml"
- "flipt:/var/opt/flipt"
depends_on:
- init_flipt
ports:
- '8080:8080'
- ${PWD}/config/go-feature-flag:/goff/
expose:
- 1031
volumes:
flagd-flags:
flipt:

48
flags.json Normal file
View File

@ -0,0 +1,48 @@
{
"flags": {
"new-welcome-message": {
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"hex-color": {
"variants": {
"red": "CC0000",
"green": "00CC00",
"blue": "0000CC",
"yellow": "yellow"
},
"defaultVariant": "red",
"state": "ENABLED"
},
"fib-algo": {
"variants": {
"recursive": "recursive",
"memo": "memo",
"loop": "loop",
"binet": "binet"
},
"defaultVariant": "recursive",
"state": "ENABLED",
"targeting": {
"if": [
{
"in": [
"@faas.com",
{
"var": [
"email"
]
}
]
},
"binet",
null
]
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1,4 +1,4 @@
const { getJestProjects } = require('@nx/jest');
const { getJestProjects } = require('@nrwl/jest');
export default {
projects: getJestProjects(),

View File

@ -1,3 +1,3 @@
const nxPreset = require('@nx/jest/preset').default;
const nxPreset = require('@nrwl/jest/preset').default;
module.exports = { ...nxPreset };

View File

@ -2,18 +2,235 @@
"migrations": [
{
"cli": "nx",
"version": "17.2.1-beta.0",
"description": "Add webpack.config.js file when webpackConfig is not defined",
"implementation": "./src/migrations/update-17-2-1/webpack-config-setup",
"package": "@nx/webpack",
"name": "update-17-2-1-webpack-config-setup"
"version": "14.0.6",
"description": "Remove root property from project.json files",
"implementation": "./src/migrations/update-14-0-6/remove-roots",
"package": "nx",
"name": "14-0-6-remove-root"
},
{
"version": "17.2.0-beta.0",
"description": "Simplify eslintFilePatterns",
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
"package": "@nx/linter",
"name": "simplify-eslint-patterns"
"cli": "nx",
"version": "14.2.0-beta.0",
"description": "Add JSON Schema to Nx configuration files",
"implementation": "./src/migrations/update-14-2-0/add-json-schema",
"package": "nx",
"name": "14-2-0-add-json-schema"
},
{
"cli": "nx",
"version": "14.2.0-beta.0",
"description": "Remove default collection from configuration to switch to prompts for collection",
"implementation": "./src/migrations/update-14-2-0/remove-default-collection",
"package": "nx",
"name": "14-2-0-remove-default-collection"
},
{
"cli": "nx",
"version": "14.2.0-beta.5",
"description": "Replace all ./ and ../ in outputs with absolute paths",
"implementation": "./src/migrations/update-14-2-0/replace-all-relative-outputs-with-absolute",
"package": "nx",
"name": "14-2-0-replace-relative-outputs-with-absolute"
},
{
"cli": "nx",
"version": "14.3.4-beta.1",
"description": "Replace targetDependencies with targetDefaults",
"implementation": "./src/migrations/update-14-3-4/create-target-defaults",
"package": "nx",
"name": "14.3.4-create-target-defaults"
},
{
"version": "13.10.0-beta.0",
"description": "Update the decorate-angular-cli script to require nx instead of @nrwl/cli",
"cli": "nx",
"implementation": "./src/migrations/update-13-10-0/update-decorate-cli",
"package": "@nrwl/workspace",
"name": "13-10-0-update-decorate-cli"
},
{
"version": "13.10.0-beta.0",
"description": "Update the tasks runner property to import it from the nx package instead of @nrwl/worksapce",
"cli": "nx",
"implementation": "./src/migrations/update-13-10-0/update-tasks-runner",
"package": "@nrwl/workspace",
"name": "13-10-0-update-tasks-runner"
},
{
"version": "14.0.0-beta.0",
"description": "Changes the presets in nx.json to come from the nx package",
"cli": "nx",
"implementation": "./src/migrations/update-14-0-0/change-nx-json-presets",
"package": "@nrwl/workspace",
"name": "14-0-0-change-nx-json-presets"
},
{
"version": "14.0.0-beta.0",
"description": "Migrates from @nrwl/workspace:run-script to nx:run-script",
"cli": "nx",
"implementation": "./src/migrations/update-14-0-0/change-npm-script-executor",
"package": "@nrwl/workspace",
"name": "14-0-0-change-npm-script-executor"
},
{
"version": "14.2.0",
"description": "Explicitly enable sourceAnalysis for all workspaces extending from npm.json or core.json (this was default behavior prior to 14.2)",
"cli": "nx",
"implementation": "./src/migrations/update-14-2-0/enable-source-analysis",
"package": "@nrwl/workspace",
"name": "14-2-0-enable-source-analysis"
},
{
"cli": "nx",
"version": "14.6.1-beta.0",
"description": "Change Cypress e2e and component testing presets to use __filename instead of __dirname and include a devServerTarget for component testing.",
"factory": "./src/migrations/update-14-6-1/update-cypress-configs-presets",
"package": "@nrwl/cypress",
"name": "update-cypress-configs-preset"
},
{
"cli": "nx",
"version": "14.7.0-beta.0",
"description": "Update Cypress if using v10 to support latest component testing features",
"factory": "./src/migrations/update-14-7-0/update-cypress-version-if-10",
"package": "@nrwl/cypress",
"name": "update-cypress-if-v10"
},
{
"cli": "nx",
"version": "14.2.0-beta.0",
"description": "Adjusts calls to createTreeWithEmptyWorkspace to reflect new API",
"factory": "./src/migrations/update-14-2-0/split-create-empty-tree",
"package": "@nrwl/devkit",
"name": "split-create-tree"
},
{
"version": "14.0.0-beta.2",
"cli": "nx",
"description": "Update move jest config files to .ts files.",
"factory": "./src/migrations/update-14-0-0/update-jest-config-ext",
"package": "@nrwl/jest",
"name": "update-jest-config-extensions"
},
{
"version": "14.1.5-beta.0",
"cli": "nx",
"description": "Update to export default in jest config and revert jest.preset.ts to jest.preset.js",
"factory": "./src/migrations/update-14-1-5/update-exports-jest-config",
"package": "@nrwl/jest",
"name": "update-to-export-default"
},
{
"version": "14.5.5-beta.0",
"cli": "nx",
"description": "Exclude jest.config.ts from tsconfig where missing.",
"factory": "./src/migrations/update-14-0-0/update-jest-config-ext",
"package": "@nrwl/jest",
"name": "exclude-jest-config-from-ts-config"
},
{
"version": "14.6.0-beta.0",
"cli": "nx",
"description": "Update jest configs to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28#configuration-options)",
"factory": "./src/migrations/update-14-6-0/update-configs-jest-28",
"package": "@nrwl/jest",
"name": "update-configs-jest-28"
},
{
"version": "14.6.0-beta.0",
"cli": "nx",
"description": "Update jest test files to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28)",
"factory": "./src/migrations/update-14-6-0/update-tests-jest-28",
"package": "@nrwl/jest",
"name": "update-tests-jest-28"
},
{
"cli": "nx",
"version": "14.1.9-beta.0",
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them",
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed",
"package": "@nrwl/linter",
"name": "add-swc-deps"
},
{
"cli": "nx",
"version": "14.2.3-beta.0",
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them (repeated due to prior mistake)",
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed",
"package": "@nrwl/linter",
"name": "add-swc-deps-again"
},
{
"cli": "nx",
"version": "14.4.4",
"description": "Adds @typescript-eslint/utils as a dev dep",
"factory": "./src/migrations/update-14-4-4/experimental-to-utils-deps",
"package": "@nrwl/linter",
"name": "experimental-to-utils-deps"
},
{
"cli": "nx",
"version": "14.4.4",
"description": "Switch from @typescript-eslint/experimental-utils to @typescript-eslint/utils in all rules and rules.spec files",
"factory": "./src/migrations/update-14-4-4/experimental-to-utils-rules",
"package": "@nrwl/linter",
"name": "experimental-to-utils-rules"
},
{
"cli": "nx",
"version": "14.7.6-beta.1",
"description": "Update usages of webpack executors to @nrwl/webpack",
"factory": "./src/migrations/update-14-7-6/update-webpack-executor",
"package": "@nrwl/node",
"name": "update-webpack-executor"
},
{
"cli": "nx",
"version": "14.1.0-beta.0",
"description": "Update external option in projects for Emotion",
"factory": "./src/migrations/update-14-1-0/update-external-emotion-jsx-runtime",
"package": "@nrwl/react",
"name": "update-external-emotion-jsx-runtime-14.1.0"
},
{
"cli": "nx",
"version": "14.6.0-beta.0",
"description": "Update babel-jest to include the @nrwl/react/babel preset in project jest config",
"factory": "./src/migrations/update-14-6-0/add-preset-jest-config",
"package": "@nrwl/react",
"name": "update-babel-jest-transform-option"
},
{
"cli": "nx",
"version": "14.7.6-beta.1",
"description": "Update usages of webpack executors to @nrwl/webpack",
"factory": "./src/migrations/update-14-7-6/update-webpack-executor",
"package": "@nrwl/web",
"name": "update-webpack-executor"
},
{
"cli": "nx",
"version": "13.10.1-beta.1",
"description": "Update .lib.swcrc to exclude missing test files",
"factory": "./src/migrations/update-13-10-1/update-lib-swcrc-exclude",
"package": "@nrwl/js",
"name": "update-swcrc-exclude"
},
{
"cli": "nx",
"version": "14.0.0-beta.2",
"description": "Exclude jest config from .lib.swcrc",
"factory": "./src/migrations/update-14-0-0/exclude-jest-config-swcrc",
"package": "@nrwl/js",
"name": "exclude-jest-config-swcrc"
},
{
"cli": "nx",
"version": "14.1.5-beta.0",
"description": "Rename option swcrcPath to swcrc, and resolve relative to workspace root",
"factory": "./src/migrations/update-14-1-5/update-swcrc-path",
"package": "@nrwl/js",
"name": "update-swcrc-path"
}
]
}

45
nx.json
View File

@ -1,21 +1,23 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "@nx/workspace/tasks-runners/default",
"options": {}
}
},
"extends": "nx/presets/core.json",
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"npmScope": "openfeature",
"affected": {
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nrwl/express"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
}
},
"defaultProject": "app",
"generators": {
"@nx/react": {
"@nrwl/react": {
"application": {
"style": "css",
"linter": "eslint",
@ -33,29 +35,12 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"cache": true
},
"lint": {
"cache": true
},
"test": {
"cache": true
},
"e2e": {
"cache": true
"dependsOn": ["^build"]
}
},
"pluginsConfig": {
"@nx/js": {
"@nrwl/js": {
"analyzeSourceFiles": true
}
},
"nxCloudAccessToken": "MzczOGQ0MDAtNTU1MC00NzMzLTk0YmMtMzQ5ZWYyMTQzNmRjfHJlYWQtd3JpdGU=",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [],
"production": ["default"]
}
}

40232
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,152 +1,112 @@
{
"name": "openfeature",
"version": "0.16.0",
"license": "Apache-2.0",
"version": "0.0.2",
"license": "MIT",
"scripts": {
"no-op-demo": "nx serve app",
"cloudbees-demo": "nx run app:cloudbees-demo",
"env-var-demo": "nx run app:env-var-demo",
"split-demo": "nx run app:split-demo",
"launchdarkly-demo": "nx run app:launchdarkly-demo",
"flagsmith-demo": "nx run app:flagsmith-demo",
"go-feature-flag-demo": "nx run app:go-feature-flag-demo",
"flagd-demo": "nx run app:flagd-demo",
"ui": "nx run ui:serve",
"app": "nx run app:serve",
"fib-service": "nx run fibonacci-service:serve",
"build": "nx run-many --all --target=build",
"build:app": "nx build app && nx build ui",
"build:fib-service": "nx build fibonacci-service",
"temp": "nx build",
"build": "nx build app && nx build ui && cp -R dist/packages/ui/* dist/packages/app/assets/public/",
"docker-build": "docker buildx build --platform=\"linux/ppc64le,linux/s390x,linux/amd64,linux/arm64\" . -t ghcr.io/open-feature/open-feature-demo:latest",
"docker-build-push": "docker buildx build --push --platform=\"linux/ppc64le,linux/s390x,linux/amd64,linux/arm64\" . -t ghcr.io/open-feature/open-feature-demo:latest",
"lint": "nx run-many --all --target=lint",
"test": "nx run-many --all --target=test",
"markdown-toc": "markdown-toc --bullets='-' --no-first-h1 --no-stripHeadingTags --maxdepth 4 -i README.md",
"flagd": "docker run -p 8013:8013 -v $(pwd)/config/flagd:/etc/flagd/ -it --pull=always ghcr.io/open-feature/flagd:latest start --uri file:./etc/flagd/flags.json"
"markdown-toc": "markdown-toc --bullets='-' --no-first-h1 --no-stripHeadingTags --maxdepth 4 -i README.md"
},
"private": true,
"dependencies": {
"@harnessio/ff-javascript-client-sdk": "^1.21.0",
"@harnessio/ff-nodejs-server-sdk": "^1.4.0",
"@nestjs/axios": "^3.0.2",
"@nestjs/common": "10.4.15",
"@nestjs/core": "10.4.15",
"@nestjs/platform-express": "10.4.15",
"@nestjs/serve-static": "^4.0.2",
"@openfeature/config-cat-web-provider": "^0.1.3",
"@openfeature/config-cat-provider": "^0.7.2",
"@openfeature/env-var-provider": "^0.3.0",
"@openfeature/flagd-provider": "^0.13.0",
"@openfeature/flagd-web-provider": "^0.7.0",
"@openfeature/flipt-provider": "^0.1.0",
"@openfeature/flipt-web-provider": "^0.1.0",
"@openfeature/go-feature-flag-provider": "^0.7.0",
"@openfeature/go-feature-flag-web-provider": "^0.2.0",
"@openfeature/nestjs-sdk": "^0.1.3-experimental",
"@openfeature/ofrep-provider": "^0.1.3",
"@openfeature/ofrep-web-provider": "^0.1.3",
"@openfeature/open-telemetry-hooks": "^0.4.0",
"@openfeature/web-sdk": "1.0.3",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/auto-instrumentations-node": "^0.44.0",
"@opentelemetry/core": "^1.23.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.50.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.50.0",
"@opentelemetry/resources": "^1.23.0",
"@opentelemetry/sdk-metrics": "^1.23.0",
"@opentelemetry/sdk-node": "^0.50.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"@splitsoftware/openfeature-js-split-provider": "^1.0.7",
"@splitsoftware/splitio": "^10.24.1",
"@splitsoftware/splitio-browserjs": "^0.14.0",
"@types/rox-browser": "^5.0.7",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@harnessio/ff-nodejs-server-sdk": "^1.2.8",
"@mui/material": "^5.10.7",
"@nestjs/common": "9.1.2",
"@nestjs/core": "9.1.2",
"@nestjs/platform-express": "9.1.2",
"@nestjs/serve-static": "^3.0.0",
"@openfeature/flagd-provider": "^0.6.0",
"@openfeature/go-feature-flag-provider": "^0.4.0",
"@openfeature/js-sdk": "^0.5.0",
"@openfeature/open-telemetry-hook": "^4.0.0",
"@opentelemetry/api": "~1.2.0",
"@opentelemetry/auto-instrumentations-node": "^0.33.1",
"@opentelemetry/exporter-jaeger": "^1.7.0",
"@opentelemetry/sdk-node": "^0.33.0",
"@opentelemetry/sdk-trace-node": "~1.7.0",
"@reactour/tour": "^3.1.6",
"@splitsoftware/openfeature-js-split-provider": "^1.0.2",
"@splitsoftware/splitio": "^10.21.1",
"@types/react-json-editor-ajrm": "^2.5.3",
"ajv": "^8.11.0",
"change-case": "^4.1.2",
"class-validator": "^0.14.1",
"cloudbees-openfeature-provider-node": "^1.0.0",
"class-validator": "^0.13.2",
"cloudbees-openfeature-provider-node": "^0.1.0",
"clsx": "^1.2.1",
"eventemitter3": "^5.0.1",
"events": "^3.3.0",
"express": "4.21.2",
"express-validator": "^7.0.1",
"flagsmith": "^3.21.0",
"flagsmith-nodejs": "^3.2.0",
"launchdarkly-js-client-sdk": "^3.1.4",
"launchdarkly-node-server-sdk": "^7.0.3",
"nestjs-pino": "^4.0.0",
"pino-http": "^9.0.0",
"pino-pretty": "^11.0.0",
"react-router-dom": "^6.21.1",
"reflect-metadata": "^0.2.0",
"rox-browser": "^5.4.9",
"rox-node": "^5.4.9",
"rxjs": "^7.8.0"
},
"devDependencies": {
"@babel/preset-react": "^7.23.3",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@mui/material": "^5.15.2",
"@nestjs/schematics": "10.2.3",
"@nestjs/testing": "10.4.15",
"@nrwl/tao": "17.3.2",
"@nx/devkit": "17.3.2",
"@nx/eslint-plugin": "17.3.2",
"@nx/express": "17.3.2",
"@nx/jest": "17.3.2",
"@nx/js": "17.3.2",
"@nx/linter": "17.3.2",
"@nx/nest": "17.3.2",
"@nx/node": "17.3.2",
"@nx/react": "17.3.2",
"@nx/web": "17.3.2",
"@nx/webpack": "17.3.2",
"@nx/workspace": "17.3.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@reactour/tour": "^3.6.1",
"@svgr/webpack": "^8.1.0",
"@testing-library/react": "^12.1.5",
"@types/events": "^3.0.3",
"@types/express": "4.17.21",
"@types/jest": "^29.5.11",
"@types/node": "18.19.68",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/react-json-editor-ajrm": "^2.5.6",
"@types/react-modal": "^3.16.3",
"@types/rox-node": "^5.0.5",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"ajv": "^8.12.0",
"babel-jest": "^29.7.0",
"core-js": "^3.35.0",
"css-loader": "^6.8.1",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"json-schema-to-typescript": "^11.0.5",
"core-js": "^3.25.4",
"express": "4.18.1",
"express-validator": "^6.14.2",
"flagsmith-nodejs": "^2.3.0",
"jsoneditor-react": "^3.1.2",
"markdown-toc": "^1.2.0",
"prettier": "2.8.8",
"launchdarkly-node-server-sdk": "^6.4.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-json-editor-ajrm": "^2.5.14",
"react-json-editor-ajrm": "^2.5.13",
"react-json-view": "^1.21.3",
"react-modal": "^3.16.1",
"react-refresh": "^0.16.0",
"regenerator-runtime": "^0.14.0",
"style-loader": "^3.3.3",
"styled-components": "5.3.11",
"stylus": "^0.64.0",
"stylus-loader": "^7.1.3",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "^2.6.2",
"typescript": "5.7.2",
"url-loader": "^4.1.1",
"webpack": "5.97.1",
"webpack-merge": "^5.10.0"
"react-modal": "^3.15.1",
"reflect-metadata": "^0.1.13",
"regenerator-runtime": "0.13.9",
"rox-node": "^5.4.2",
"rxjs": "^7.5.7",
"tslib": "^2.4.0"
},
"overrides": {
"braces": ">=3.0.3",
"ws": ">=8.17.1",
"@grpc/grpc-js": ">=1.10.9",
"@openfeature/config-cat-provider": {
"@openfeature/server-sdk": "1.13.4"
}
"devDependencies": {
"@nestjs/schematics": "9.0.3",
"@nestjs/testing": "9.1.2",
"@nrwl/cli": "14.7.12",
"@nrwl/devkit": "14.7.12",
"@nrwl/eslint-plugin-nx": "14.7.12",
"@nrwl/express": "14.7.12",
"@nrwl/jest": "14.7.12",
"@nrwl/js": "14.7.12",
"@nrwl/linter": "14.7.12",
"@nrwl/nest": "14.7.12",
"@nrwl/node": "14.7.12",
"@nrwl/react": "14.7.12",
"@nrwl/tao": "14.7.12",
"@nrwl/web": "14.7.12",
"@nrwl/workspace": "14.7.12",
"@testing-library/react": "^12.1.5",
"@types/express": "4.17.14",
"@types/jest": "^28.1.8",
"@types/node": "18.7.18",
"@types/react": "^17.0.50",
"@types/react-dom": "^17.0.17",
"@types/react-modal": "^3.13.1",
"@types/rox-node": "^5.0.1",
"@typescript-eslint/eslint-plugin": "5.38.0",
"@typescript-eslint/parser": "5.38.0",
"babel-jest": "^28.1.3",
"eslint": "8.23.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.8",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^29.0.3",
"json-schema-to-typescript": "^11.0.2",
"markdown-toc": "^1.2.0",
"prettier": "2.7.1",
"react-test-renderer": "^17.0.2",
"styled-components": "^5.3.5",
"ts-jest": "^28.0.8",
"ts-node": "10.9.1",
"typescript": "4.8.4"
}
}
}

View File

@ -1,11 +1,10 @@
{
"name": "app",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/app/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/app",
@ -13,8 +12,7 @@
"tsConfig": "packages/app/tsconfig.app.json",
"assets": ["packages/app/src/assets"],
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/app/webpack.config.js"
"compiler": "tsc"
},
"configurations": {
"production": {
@ -28,36 +26,121 @@
}
]
}
},
"dependsOn": [
{
"target": "build",
"dependencies": true
}
]
}
},
"serve": {
"executor": "@nx/js:node",
"executor": "@nrwl/node:node",
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"]
},
}
},
"env-var-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"dependencies": true
"projects": "dependencies"
}
]
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["env"]
}
},
"cloudbees-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["cloudbees"]
}
},
"split-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["split"]
}
},
"launchdarkly-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["launchdarkly"]
}
},
"flagsmith-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["flagsmith"]
}
},
"flagd-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["flagd"]
}
},
"go-feature-flag-demo": {
"executor": "@nrwl/node:node",
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"buildTarget": "app:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"],
"args": ["go"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/app"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/app"],
"options": {
"jestConfig": "packages/app/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": [],
"implicitDependencies": ["openfeature-propagator"]
"tags": []
}

View File

@ -1,80 +1,71 @@
import { HttpModule } from '@nestjs/axios';
import { ExecutionContext, Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { LoggingHook, OpenFeatureLogger } from '@openfeature/extra';
import { MetricsHook, TracingHook as SpanEventBasedTracingHook } from '@openfeature/open-telemetry-hooks';
import { ProviderService } from '@openfeature/provider';
import { MiddlewareConsumer, Module, NestModule, Scope } from '@nestjs/common';
import { REQUEST } from '@nestjs/core';
import { AsyncLocalStorageTransactionContext, LoggingHook } from '@openfeature/extra';
import { OpenTelemetryHook } from '@openfeature/open-telemetry-hook';
import { OpenFeature } from '@openfeature/js-sdk';
import { Request } from 'express';
import { Agent } from 'http';
import { LoggerModule } from 'nestjs-pino';
import { join } from 'path';
import { TransactionContextMiddleware } from './transaction-context.middleware';
import { OPENFEATURE_CLIENT, REQUEST_DATA } from './constants';
import { FibonacciAsAServiceController } from './fibonacci-as-a-service.controller';
import { FibonacciService } from './fibonacci/fibonacci.service';
import { ProvidersController } from './providers.controller';
import { HexColorService } from './hex-color/hex-color.service';
import { MessageService } from './message/message.service';
import { RequestData } from './types';
import { UtilsController } from './utils.controller';
import { EvaluationContext, FlagMetadata, OpenFeatureModule } from '@openfeature/nestjs-sdk';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { ProvidersController } from './providers.controller';
import { ProviderService } from './provider.service';
function attributeMapper(flagMetadata: FlagMetadata) {
return {
...('scope' in flagMetadata && { scope: flagMetadata.scope }),
};
}
/**
* Adding hooks to at the global level will ensure they always run
* as part of a flag evaluation lifecycle.
*/
OpenFeature.addHooks(new LoggingHook(), new OpenTelemetryHook());
/**
* The transaction context propagator is an experimental feature
* that allows evaluation context to be set anywhere in a request
* and have it automatically available during a flag evaluation.
*/
OpenFeature.setTransactionContextPropagator(new AsyncLocalStorageTransactionContext());
@Module({
imports: [
LoggerModule.forRoot({
pinoHttp: {
/**
* Pretty print logs when in a non-prod context.
*
* Note: NX uses webpack behind the scenes which replaces NODE_ENV at
* build time. The environment defaults to development unless the `--prod`
* flag is used provided in the build command.
*/
transport:
process.env['NODE' + '_ENV'] !== 'production'
? {
target: 'pino-pretty',
options: {
hideObject: true,
},
}
: undefined,
},
}),
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'ui'),
rootPath: join(__dirname, '.', 'assets', 'public'),
}),
HttpModule.register({
httpAgent: new Agent({ keepAlive: true }),
}),
OpenFeatureModule.forRoot({
// Set a global logger for OpenFeature. This is logger will available in hooks.
logger: new OpenFeatureLogger('OpenFeature'),
//Adding hooks to at the global level will ensure they always run as part of a flag evaluation lifecycle.
hooks: [
new LoggingHook(),
new SpanEventBasedTracingHook({ attributeMapper }),
new MetricsHook({ attributeMapper }),
],
// This context will be used for all flag evaluations in the callstack
contextFactory: async (context: ExecutionContext): Promise<EvaluationContext> => {
const req = await context.switchToHttp().getRequest<Request>();
],
controllers: [FibonacciAsAServiceController, UtilsController, ProvidersController],
providers: [
MessageService,
HexColorService,
ProviderService,
{
provide: OPENFEATURE_CLIENT,
useFactory: () => {
const client = OpenFeature.getClient('app');
return client;
},
},
{
provide: REQUEST_DATA,
useFactory: (req: Request): RequestData => {
const authHeaderValue = req.header('Authorization') || 'anonymous';
const userAgent = req.header('user-agent');
return {
ts: new Date().getTime(),
ip: (req.headers['x-forwarded-for'] as string) || (req.socket.remoteAddress as string),
email: authHeaderValue,
method: req.method,
path: req.path,
...(userAgent && { userAgent }),
targetingKey: authHeaderValue,
};
},
}),
scope: Scope.REQUEST,
inject: [REQUEST],
},
],
controllers: [FibonacciAsAServiceController, UtilsController, ProvidersController],
providers: [FibonacciService, ProviderService],
})
export class AppModule {}
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(TransactionContextMiddleware).forRoutes(FibonacciAsAServiceController);
}
}

View File

@ -1,35 +1,21 @@
export const OPENFEATURE_CLIENT = Symbol.for('OPENFEATURE_CLIENT');
export const REQUEST_DATA = Symbol.for('REQUEST_DATA');
export const ENV_PROVIDER_ID = 'env';
export const FLAGD_OFREP_PROVIDER_ID = 'flagd-ofrep';
export const FLAGD_PROVIDER_ID = 'flagd';
export const GO_PROVIDER_ID = 'go-feature-flag';
export const GO_OFREP_PROVIDER_ID = 'go-feature-flag-ofrep';
export const LD_PROVIDER_ID = 'launchdarkly';
export const SPLIT_PROVIDER_ID = 'split';
export const CB_PROVIDER_ID = 'cloudbees';
export const FLAGSMITH_PROVIDER_ID = 'flagsmith';
export const HARNESS_PROVIDER_ID = 'harness';
export const FLIPT_PROVIDER_ID = 'flipt';
export const CONFIGCAT_PROVIDER_ID = 'configcat';
export type ProviderId =
| typeof ENV_PROVIDER_ID
| typeof FLAGD_PROVIDER_ID
| typeof FLAGD_OFREP_PROVIDER_ID
| typeof GO_PROVIDER_ID
| typeof GO_OFREP_PROVIDER_ID
| typeof LD_PROVIDER_ID
| typeof SPLIT_PROVIDER_ID
| typeof CB_PROVIDER_ID
| typeof FLAGSMITH_PROVIDER_ID
| typeof HARNESS_PROVIDER_ID
| typeof FLIPT_PROVIDER_ID
| typeof CONFIGCAT_PROVIDER_ID;
export interface AvailableProvider {
id: ProviderId;
webCredential?: string;
url?: string;
host?: string;
tls?: boolean;
port?: number;
}
| typeof HARNESS_PROVIDER_ID;

View File

@ -1,5 +1,7 @@
import { Controller, DefaultValuePipe, Get, ParseIntPipe, Query } from '@nestjs/common';
import { FibonacciService } from './fibonacci/fibonacci.service';
import { Controller, Get, Query } from '@nestjs/common';
import { fibonacci } from '@openfeature/fibonacci';
import { HexColorService } from './hex-color/hex-color.service';
import { MessageService } from './message/message.service';
/**
* Controller that delivers all the data to our FaaS landing page.
@ -7,16 +9,48 @@ import { FibonacciService } from './fibonacci/fibonacci.service';
@Controller()
export class FibonacciAsAServiceController {
constructor(
private readonly fibonacciService: FibonacciService,
private readonly messageService: MessageService,
private hexColorService: HexColorService
) {}
/**
*
* @returns welcome message
*/
@Get('message')
getGreeting() {
return this.messageService.getMessage();
}
/**
*
* @returns hex color JSON for the UI.
*/
@Get('hex-color')
async getHexColor() {
return {
color: await this.hexColorService.getHexColor(),
};
}
/**
*
* @returns hex color markup for standalone demo.
*/
@Get('hex-color/markup')
getHexColorMarkup() {
return this.hexColorService.buildHexColorMarkup();
}
/**
* Calculates fib(n)
* @param num n value for fib(n)
* @returns
*/
@Get('calculate')
async getFibonacci(@Query('num', new DefaultValuePipe(40), ParseIntPipe) num: number) {
return this.fibonacciService.calculateFibonacci(num);
async getFibonacci(@Query('num') num: string) {
return {
result: await fibonacci(Number.parseInt(num)),
};
}
}

View File

@ -1,35 +0,0 @@
import {HttpService} from '@nestjs/axios';
import {Injectable} from '@nestjs/common';
import {fibonacci} from '@openfeature/fibonacci';
import {lastValueFrom, map} from 'rxjs';
import {Client, FeatureClient} from "@openfeature/nestjs-sdk";
@Injectable()
export class FibonacciService {
private readonly FIB_SERVICE_URL = process.env.FIB_SERVICE_URL || 'http://localhost:30001';
constructor(private readonly httpService: HttpService, @FeatureClient() private client: Client) {
}
async calculateFibonacci(num: number): Promise<{ result: number }> {
const useRemoteFibService = await this.client.getBooleanValue('use-remote-fib-service', false);
if (useRemoteFibService) {
return lastValueFrom(
this.httpService
.get<{ result: number }>(`${this.FIB_SERVICE_URL}/calculate`, {
params: {num},
auth: {
username: process.env.FIB_SERVICE_USER || '',
password: process.env.FIB_SERVICE_PASS || '',
},
})
.pipe(map((res) => res.data))
);
}
return {
result: await fibonacci(num),
};
}
}

View File

@ -0,0 +1,48 @@
import { Inject, Injectable } from '@nestjs/common';
import { Client, EvaluationDetails } from '@openfeature/js-sdk';
import { OPENFEATURE_CLIENT } from '../constants';
@Injectable()
export class HexColorService {
constructor(@Inject(OPENFEATURE_CLIENT) private client: Client) {}
async getHexColor() {
const hexColorValue = await this.client.getStringValue('hex-color', '000000', undefined, {
hooks: [
{
after: (hookContext, evaluationDetails: EvaluationDetails<string>) => {
// validate the hex value.
const hexPattern = /[0-9A-Fa-f]{6}/g;
if (!hexPattern.test(evaluationDetails.value)) {
hookContext.logger.warn(
`Got invalid flag value '${evaluationDetails.value}' for ${hookContext.flagKey}, returning ${hookContext.defaultValue}`
);
/**
* Throwing an error in the after hook will be caught by the OpenFeature client
* and the default value passed in the `getStringValue` method will be returned.
*/
throw new Error(`Invalid hex value: ${evaluationDetails.value}`);
}
},
},
],
});
return `#${hexColorValue}`;
}
async buildHexColorMarkup() {
const hexColorValue = await this.getHexColor();
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenFeature</title>
</head>
<body>
<span>Welcome to</span>
<span style="color: ${hexColorValue};">OpenFeature!</span>
</body>
</html>
`;
}
}

View File

@ -0,0 +1,22 @@
import { Inject, Injectable } from '@nestjs/common';
import { Client } from '@openfeature/js-sdk';
import { OPENFEATURE_CLIENT, REQUEST_DATA } from '../constants';
@Injectable()
export class MessageService {
constructor(
@Inject(OPENFEATURE_CLIENT) private client: Client,
@Inject(REQUEST_DATA) private attributes: any
) {}
async getMessage() {
const message = (await this.client.getBooleanValue(
'new-welcome-message',
false,
this.attributes
))
? 'Fib3r: Math at the speed of the internet!'
: 'Welcome to FaaS: Fibonacci as a Service!';
return { message };
}
}

View File

@ -0,0 +1,142 @@
import { Injectable } from '@nestjs/common';
import { FlagdProvider } from '@openfeature/flagd-provider';
import { GoFeatureFlagProvider } from '@openfeature/go-feature-flag-provider';
import { OpenFeatureEnvProvider } from '@openfeature/js-env-provider';
import { FlagsmithProvider } from '@openfeature/js-flagsmith-provider';
import { OpenFeatureLaunchDarklyProvider } from '@openfeature/js-launchdarkly-provider';
import { OpenFeature, Provider } from '@openfeature/js-sdk';
import { OpenFeatureSplitProvider } from '@openfeature/js-split-provider';
import { SplitFactory } from '@splitsoftware/splitio';
import { CloudbeesProvider } from 'cloudbees-openfeature-provider-node';
import Flagsmith from 'flagsmith-nodejs';
import { ProviderId } from './constants';
import { Client } from '@harnessio/ff-nodejs-server-sdk';
import { OpenFeatureHarnessProvider } from '@openfeature/js-harness-provider';
type ProviderMap = Record<
ProviderId,
{
provider?: Provider;
available?: () => boolean;
factory: () => Promise<Provider> | Provider;
}
>;
@Injectable()
export class ProviderService {
private _currentProvider: ProviderId;
private providerMap: ProviderMap = {
env: { factory: () => new OpenFeatureEnvProvider() },
flagd: { factory: () => new FlagdProvider() },
launchdarkly: {
factory: () => {
const sdkKey = process.env.LD_KEY;
if (!sdkKey) {
throw new Error('"LD_KEY" must be defined.');
} else {
return new OpenFeatureLaunchDarklyProvider({
sdkKey,
});
}
},
available: () => !!process.env.LD_KEY,
},
cloudbees: {
factory: async () => {
const appKey = process.env.CLOUDBEES_APP_KEY;
if (!appKey) {
throw new Error('"CLOUDBEES_APP_KEY" must be defined.');
} else {
// TODO: this 'any' assertion is necessary until the CB provider is updated.
return CloudbeesProvider.build(appKey) as any;
}
},
available: () => !!process.env.CLOUDBEES_APP_KEY,
},
split: {
factory: () => {
const authorizationKey = process.env.SPLIT_KEY;
if (!authorizationKey) {
throw new Error('"SPLIT_KEY" must be defined.');
} else {
const splitClient = SplitFactory({
core: {
authorizationKey,
},
}).client();
return new OpenFeatureSplitProvider({
splitClient,
});
}
},
available: () => !!process.env.SPLIT_KEY,
},
['go-feature-flag']: {
factory: () =>
new GoFeatureFlagProvider({
endpoint: process.env.GO_FEATURE_FLAG_URL as string,
}),
available: () => !!process.env.GO_FEATURE_FLAG_URL,
},
flagsmith: {
factory: () => {
if (!process.env.FLAGSMITH_ENV_KEY) {
throw new Error('"FLAGSMITH_ENV_KEY" must be defined.');
} else {
const client = new Flagsmith({
environmentKey: process.env.FLAGSMITH_ENV_KEY as string,
enableLocalEvaluation: true,
environmentRefreshIntervalSeconds: 5,
});
return new FlagsmithProvider({
client,
});
}
},
// getting 401s from flagsmith at the moment.
available: () => false,
},
harness: {
factory: () => {
if (!process.env.HARNESS_KEY) {
throw new Error('"HARNESS_KEY" must be defined.');
} else {
const client = new Client(process.env.HARNESS_KEY);
return new OpenFeatureHarnessProvider(client);
}
},
available: () => !!process.env.HARNESS_KEY,
},
};
constructor() {
this._currentProvider = process.argv[2] as ProviderId;
this.switchProvider(this._currentProvider);
}
get currentProvider() {
return this._currentProvider;
}
async switchProvider(providerId: ProviderId) {
// get the provider, or run the factory function to make one.
const provider = this.providerMap[providerId].provider || (await this.providerMap[providerId].factory());
// cache the provider for later use
this.providerMap[providerId].provider = provider;
if (provider) {
OpenFeature.setProvider(provider);
this._currentProvider = providerId;
} else {
console.warn('No provider set, falling back to no-op');
}
}
getAvailableProviders() {
return Object.entries(this.providerMap)
.filter((p) => {
return p[1].available === undefined || p[1].available();
})
.map((p) => p[0]);
}
}

View File

@ -1,21 +1,15 @@
import { HttpService } from '@nestjs/axios';
import { Controller, Get, Param, Put } from '@nestjs/common';
import { ProviderService } from '@openfeature/provider';
import { ProviderId } from '@openfeature/utils';
import { PinoLogger } from 'nestjs-pino';
import { lastValueFrom } from 'rxjs';
import { ProviderId } from './constants';
import { ProviderService } from './provider.service';
/**
* Controller for reading/writing providers and related settings.
*/
@Controller('providers')
export class ProvidersController {
private readonly FIB_SERVICE_URL = process.env.FIB_SERVICE_URL || 'http://localhost:30001';
constructor(
private readonly providerService: ProviderService,
private readonly httpService: HttpService,
private readonly logger: PinoLogger
private providerService: ProviderService,
) {}
/**
@ -25,7 +19,7 @@ export class ProvidersController {
@Get('current')
async getProvider() {
return {
provider: this.providerService.currentProvider,
provider:this.providerService.currentProvider
};
}
@ -44,14 +38,6 @@ export class ProvidersController {
*/
@Put('current/:providerId')
async setProvider(@Param('providerId') providerId: ProviderId) {
await Promise.all([
this.providerService.switchProvider(providerId),
// Best effort to switch remote service
lastValueFrom(
this.httpService.put(`${this.FIB_SERVICE_URL}/providers/current/${providerId}`, { setTimeout: 1000 })
).catch(() => {
this.logger.error('Failed to switch the provider on the remote service');
}),
]);
await this.providerService.switchProvider(providerId);
}
}

View File

@ -0,0 +1,19 @@
import { Injectable, NestMiddleware, Inject } from '@nestjs/common';
import { OpenFeature } from '@openfeature/js-sdk';
import { NextFunction, Request, Response } from 'express';
import { REQUEST_DATA } from './constants';
import { RequestData } from './types';
@Injectable()
export class TransactionContextMiddleware implements NestMiddleware {
constructor(@Inject(REQUEST_DATA) private requestData: RequestData) {}
/**
* Adds our request data to the OpenFeature context via the configured TransactionContextManager
*/
use(_req: Request, _res: Response, next: NextFunction) {
OpenFeature.setTransactionContext({ ts: new Date().getTime(), ...this.requestData }, () => {
next();
});
}
}

View File

@ -0,0 +1,12 @@
export type RequestData = {
targetingKey: string;
ip: string;
method: string;
path: string;
email?: string;
};
export type InstallTemplateData = {
os: string;
installationInstruction: string;
};

View File

@ -1,6 +1,6 @@
import { BadRequestException, Body, Controller, Get, InternalServerErrorException, Put } from '@nestjs/common';
import { join } from 'path';
import { readFile, writeFile, access } from 'fs/promises';
import { readFile, writeFile } from 'fs/promises';
const JSON_FILE = join('config', 'flagd', 'flags.json');
const JSON_SCHEMA_FILE = join('schemas', 'flag.schema.json');
@ -36,13 +36,6 @@ export class UtilsController {
).toString();
}
@Get('show-editor')
async shouldShowEditor() {
return access(JSON_FILE)
.then(() => true)
.catch(() => false);
}
/**
* Write JSON from editor
* @param body JSON flag config

View File

@ -1,16 +1,13 @@
import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app/app.module';
import { Logger, LoggerErrorInterceptor } from 'nestjs-pino';
async function bootstrap() {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
const logger = app.get(Logger);
app.useLogger(app.get(Logger));
app.useGlobalInterceptors(new LoggerErrorInterceptor());
const app = await NestFactory.create(AppModule);
app.enableCors();
const port = process.env.PORT || 30000;
await app.listen(port);
logger.log(`🚀 Application is running on: http://localhost:${port}`);
Logger.log(`🚀 Application is running on: http://localhost:${port}`);
}
bootstrap();

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -1,22 +0,0 @@
FROM node:20.18-bullseye-slim AS builder
WORKDIR /tmp/playground/
COPY package*.json tsconfig*.json nx.json babel.config.json ./
RUN npm ci
COPY packages/ ./packages/
RUN npm run build:fib-service
FROM node:20-alpine as app
WORKDIR /opt/playground/
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /tmp/playground/dist ./dist
# Tracing script
COPY scripts ./scripts
LABEL org.opencontainers.image.source=https://github.com/open-feature/playground
EXPOSE 30001
ENTRYPOINT ["node", "-r", "./scripts/tracing.js", "dist/packages/fibonacci-service/main.js"]

View File

@ -1,16 +0,0 @@
/* eslint-disable */
export default {
displayName: 'fibonacci-service',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/fibonacci-service',
};

View File

@ -1,74 +0,0 @@
{
"name": "fibonacci-service",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/fibonacci-service/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"target": "node",
"compiler": "tsc",
"outputPath": "dist/packages/fibonacci-service",
"main": "packages/fibonacci-service/src/main.ts",
"tsConfig": "packages/fibonacci-service/tsconfig.app.json",
"webpackConfig": "packages/fibonacci-service/webpack.config.js"
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"inspect": false,
"fileReplacements": [
{
"replace": "packages/fibonacci-service/src/environments/environment.ts",
"with": "packages/fibonacci-service/src/environments/environment.prod.ts"
}
]
}
},
"dependsOn": [
{
"target": "build",
"dependencies": true
}
]
},
"serve": {
"executor": "@nx/js:node",
"options": {
"buildTarget": "fibonacci-service:build",
"runtimeArgs": ["-r", "./scripts/tracing.js"]
},
"configurations": {
"production": {
"buildTarget": "fibonacci-service:build:production"
}
},
"dependsOn": [
{
"target": "build",
"dependencies": true
}
]
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/fibonacci-service/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/fibonacci-service"],
"options": {
"jestConfig": "packages/fibonacci-service/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": [],
"implicitDependencies": ["openfeature-propagator"]
}

View File

@ -1,14 +0,0 @@
import { Controller, DefaultValuePipe, Get, ParseIntPipe, Query, UseGuards } from '@nestjs/common';
import { fibonacci } from '@openfeature/fibonacci';
import { AuthGuard } from './auth.guard';
@Controller()
@UseGuards(new AuthGuard())
export class AppController {
@Get('calculate')
async getFibonacci(@Query('num', new DefaultValuePipe(40), ParseIntPipe) num: number) {
return {
result: await fibonacci(num),
};
}
}

View File

@ -1,52 +0,0 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { LoggerModule } from 'nestjs-pino';
import { LoggingHook, OpenFeatureLogger } from '@openfeature/extra';
import { MetricsHook, TracingHook as SpanEventBasedTracingHook } from '@openfeature/open-telemetry-hooks';
import { ProviderService } from '@openfeature/provider';
import { ProvidersController } from './providers.controller';
import { OpenFeatureModule, FlagMetadata } from '@openfeature/nestjs-sdk';
function attributeMapper(flagMetadata: FlagMetadata) {
return {
...('scope' in flagMetadata && { scope: flagMetadata.scope }),
};
}
@Module({
imports: [
LoggerModule.forRoot({
pinoHttp: {
/**
* Pretty print logs when in a non-prod context.
*
* Note: NX uses webpack behind the scenes which replaces NODE_ENV at
* build time. The environment defaults to development unless the `--prod`
* flag is used provided in the build command.
*/
transport:
process.env['NODE' + '_ENV'] !== 'production'
? {
target: 'pino-pretty',
options: {
hideObject: true,
},
}
: undefined,
},
}),
OpenFeatureModule.forRoot({
// Set a global logger for OpenFeature. This is logger will available in hooks.
logger: new OpenFeatureLogger('OpenFeature'),
//Adding hooks to at the global level will ensure they always run as part of a flag evaluation lifecycle.
hooks: [
new LoggingHook(),
new SpanEventBasedTracingHook({ attributeMapper }),
new MetricsHook({ attributeMapper }),
],
}),
],
controllers: [AppController, ProvidersController],
providers: [ProviderService],
})
export class AppModule {}

View File

@ -1,8 +0,0 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getData(): { message: string } {
return { message: 'Welcome to fibonacci-service!' };
}
}

View File

@ -1,34 +0,0 @@
import { Injectable, CanActivate, ExecutionContext, Logger, UnauthorizedException } from '@nestjs/common';
import { Observable } from 'rxjs';
import { Request } from 'express';
@Injectable()
export class AuthGuard implements CanActivate {
private readonly logger = new Logger(AuthGuard.name);
private readonly FIB_SERVICE_USER = process.env.FIB_SERVICE_USER;
private readonly FIB_SERVICE_PASS = process.env.FIB_SERVICE_PASS;
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean> {
const request = context.switchToHttp().getRequest<Request>();
const authHeader = request.header('authorization');
if (!this.FIB_SERVICE_USER || !this.FIB_SERVICE_PASS) {
this.logger.debug("Basic auth hasn't been configured, skipping.");
return true;
}
if (!authHeader) {
// Throw 401 response code
throw new UnauthorizedException();
}
const auth = Buffer.from(authHeader.split(' ')[1], 'base64').toString().split(':');
const [user, password] = auth;
if (this.FIB_SERVICE_USER !== user || this.FIB_SERVICE_PASS !== password) {
throw new UnauthorizedException();
}
return true;
}
}

View File

@ -1,17 +0,0 @@
import { Controller, Param, Put } from '@nestjs/common';
import { ProviderService } from '@openfeature/provider';
import { ProviderId } from '@openfeature/utils';
@Controller('providers')
export class ProvidersController {
constructor(private providerService: ProviderService) {}
/**
* Switches the current provider
* @returns array of provider ids.
*/
@Put('current/:providerId')
async setProvider(@Param('providerId') providerId: ProviderId) {
await this.providerService.switchProvider(providerId);
}
}

View File

@ -1,3 +0,0 @@
export const environment = {
production: true,
};

View File

@ -1,3 +0,0 @@
export const environment = {
production: false,
};

View File

@ -1,20 +0,0 @@
/**
* This is not a production server yet!
* This is only a minimal backend to get started.
*/
import { NestFactory } from '@nestjs/core';
import { Logger, LoggerErrorInterceptor } from 'nestjs-pino';
import { AppModule } from './app/app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
const logger = app.get(Logger);
app.useLogger(app.get(Logger));
app.useGlobalInterceptors(new LoggerErrorInterceptor());
const port = process.env.PORT || 30001;
await app.listen(port);
logger.log(`🚀 Fibonacci Service is running on: http://localhost:${port}/`);
}
bootstrap();

View File

@ -1,12 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["node"],
"emitDecoratorMetadata": true,
"target": "es2015"
},
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}

View File

@ -1,13 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@ -1,9 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -1,18 +1,16 @@
{
"name": "fibonacci",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/fibonacci/src",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/fibonacci",
"main": "packages/fibonacci/src/index.ts",
"tsConfig": "packages/fibonacci/tsconfig.lib.json",
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/fibonacci/webpack.config.js"
"compiler": "tsc"
},
"configurations": {
"production": {
@ -23,15 +21,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/fibonacci/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/fibonacci"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/fibonacci"],
"options": {
"jestConfig": "packages/fibonacci/jest.config.ts",
"passWithNoTests": true

View File

@ -24,20 +24,20 @@ describe('nth fibonacci', () => {
for (const test of tests) {
const [input, output] = test
const testDescription = `${input} should be ${output}`
it(`Fibonacci Loop: ${testDescription}`, async () => {
expect(await getNthFibLoop(input)).toEqual(output);
it(`Fibonacci Loop: ${testDescription}`, () => {
expect(getNthFibLoop(input)).toEqual(output);
});
it(`Fibonacci recursive: ${testDescription}`, async () => {
expect(await getNthFibRecursive(input)).toEqual(output);
it(`Fibonacci recursive: ${testDescription}`, () => {
expect(getNthFibRecursive(input)).toEqual(output);
});
it(`Fibonacci memo: ${testDescription}`, async () => {
expect(await getNthFibRecursiveMemo(input)).toEqual(output);
it(`Fibonacci memo: ${testDescription}`, () => {
expect(getNthFibRecursiveMemo(input)).toEqual(output);
});
it(`Fibonacci binet: ${testDescription}`, async () => {
expect(await getNthFibBinet(input)).toEqual(output);
it(`Fibonacci binet: ${testDescription}`, () => {
expect(getNthFibBinet(input)).toEqual(output);
});
}
});

View File

@ -1,4 +1,4 @@
import { OpenFeature } from '@openfeature/nestjs-sdk';
import { OpenFeature } from '@openfeature/js-sdk';
const oFeatClient = OpenFeature.getClient('fibonacci');
@ -7,47 +7,40 @@ export async function fibonacci(num: number): Promise<number> {
switch (value) {
case 'recursive':
console.log('Running the recursive fibonacci function');
return getNthFibRecursive(num);
case 'memo':
console.log('Running the memo fibonacci function');
return getNthFibRecursiveMemo(num);
case 'loop':
console.log('Running the looping fibonacci function');
return getNthFibLoop(num);
case 'binet':
console.log('Running the binet fibonacci function');
return getNthFibBinet(num);
default:
console.log('Running the default recursive fibonacci function');
return getNthFibRecursive(num);
}
}
export async function getNthFibRecursive(num: number): Promise<number> {
// on very fast systems, recursive is faster than we want for the demo... so we add an artificial linear delay, based on n.
const minTimePromise = new Promise((resolve) => setTimeout(resolve, Math.floor((num / 10) * 1000)));
const [result] = await Promise.all([getNthFibRecursiveSync(num), minTimePromise]);
return result;
}
function getNthFibRecursiveSync(num: number): number {
export function getNthFibRecursive(num: number): number {
if (num === 2) {
return 1;
} else if (num === 1) {
return 0;
} else {
return getNthFibRecursiveSync(num - 1) + getNthFibRecursiveSync(num - 2);
return getNthFibRecursive(num - 1) + getNthFibRecursive(num - 2);
}
}
type Cache = { [num: number]: number };
export function getNthFibRecursiveMemo(num: number, memo: Cache = { 1: 0, 2: 1 }): number {
return getNthFibRecursiveMemoSync(num, memo);
}
function getNthFibRecursiveMemoSync(num: number, memo: Cache = { 1: 0, 2: 1 }): number {
if (num in memo) {
return memo[num];
} else {
memo[num] = getNthFibRecursiveMemoSync(num - 1, memo) + getNthFibRecursiveMemoSync(num - 2, memo);
memo[num] = getNthFibRecursiveMemo(num - 1, memo) + getNthFibRecursiveMemo(num - 2, memo);
return memo[num];
}
}

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -0,0 +1,11 @@
# js-env-provider
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build js-env-provider` to build the library.
## Running unit tests
Run `nx test js-env-provider` to execute the unit tests via [Jest](https://jestjs.io).

View File

@ -1,6 +1,6 @@
/* eslint-disable */
export default {
displayName: 'utils',
displayName: 'js-env-provider',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
@ -11,5 +11,5 @@ export default {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/utils',
coverageDirectory: '../../coverage/packages/js-env-provider',
};

View File

@ -1,5 +1,5 @@
{
"name": "@openfeature/utils",
"name": "@openfeature/js-env-provider",
"version": "0.0.1",
"type": "commonjs"
}

View File

@ -0,0 +1,40 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js-env-provider/src",
"targets": {
"build": {
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/js-env-provider",
"main": "packages/js-env-provider/src/index.ts",
"tsConfig": "packages/js-env-provider/tsconfig.lib.json",
"target": "node",
"compiler": "tsc"
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"inspect": false
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/js-env-provider/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/js-env-provider"],
"options": {
"jestConfig": "packages/js-env-provider/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}

View File

@ -0,0 +1 @@
export * from './lib/js-env-provider';

View File

@ -0,0 +1,53 @@
import { FlagNotFoundError, parseValidBoolean, parseValidJsonObject, parseValidNumber } from '@openfeature/extra';
import { JsonValue } from '@openfeature/js-sdk';
import { Provider, ResolutionDetails } from '@openfeature/js-sdk';
import { constantCase } from 'change-case';
/**
* NOTE: This is an unofficial provider that was created for demonstration
* purposes only. The playground environment will be updated to use official
* providers once they're available.
*/
export class OpenFeatureEnvProvider implements Provider {
metadata = {
name: 'environment variable',
};
resolveBooleanEvaluation(flagKey: string): Promise<ResolutionDetails<boolean>> {
const details = this.evaluateEnvironmentVariable(flagKey);
return Promise.resolve({
...details,
value: parseValidBoolean(details.value),
});
}
resolveStringEvaluation(flagKey: string): Promise<ResolutionDetails<string>> {
return Promise.resolve(this.evaluateEnvironmentVariable(flagKey));
}
resolveNumberEvaluation(flagKey: string): Promise<ResolutionDetails<number>> {
const details = this.evaluateEnvironmentVariable(flagKey);
return Promise.resolve({
...details,
value: parseValidNumber(details.value),
});
}
resolveObjectEvaluation<U extends JsonValue>(flagKey: string): Promise<ResolutionDetails<U>> {
const details = this.evaluateEnvironmentVariable(flagKey);
return Promise.resolve({
...details,
value: parseValidJsonObject(details.value),
});
}
evaluateEnvironmentVariable(key: string): ResolutionDetails<string> {
// convert key to ENV_VAR style casing
const envVarCaseKey = constantCase(key);
const value = process.env[envVarCaseKey];
if (!value) {
throw new FlagNotFoundError();
}
return { value: value };
}
}

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"module": "CommonJS",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,

View File

@ -6,5 +6,5 @@
"types": ["node"]
},
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"]
}

View File

@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}

View File

@ -1,10 +1,3 @@
{
"presets": [
[
"@nx/js/babel",
{
"useBuiltIns": "usage"
}
]
]
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
}

View File

@ -1,19 +1,17 @@
{
"name": "js-flagsmith-provider",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js-flagsmith-provider/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/js-flagsmith-provider",
"main": "packages/js-flagsmith-provider/src/index.ts",
"tsConfig": "packages/js-flagsmith-provider/tsconfig.lib.json",
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/js-flagsmith-provider/webpack.config.js"
"compiler": "tsc"
},
"configurations": {
"production": {
@ -24,15 +22,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/js-flagsmith-provider/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/js-flagsmith-provider"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/js-flagsmith-provider"],
"options": {
"jestConfig": "packages/js-flagsmith-provider/jest.config.ts",
"passWithNoTests": true

View File

@ -1,15 +1,6 @@
import {
EvaluationContext,
EvaluationContextValue,
FlagNotFoundError,
JsonValue,
Logger,
ParseError,
Provider,
ResolutionDetails,
TypeMismatchError,
} from '@openfeature/server-sdk';
import { parseValidJsonObject } from '@openfeature/utils';
import { ParseError, parseValidJsonObject, TypeMismatchError } from '@openfeature/extra';
import { EvaluationContextValue, JsonValue } from '@openfeature/js-sdk';
import { EvaluationContext, Provider, ResolutionDetails } from '@openfeature/js-sdk';
import Flagsmith from 'flagsmith-nodejs';
type Identity = {
@ -19,7 +10,6 @@ type Identity = {
export interface FlagsmithProviderOptions {
client: Flagsmith;
logger: Logger;
}
/*
@ -44,7 +34,7 @@ export class FlagsmithProvider implements Provider {
constructor(options: FlagsmithProviderOptions) {
this.client = options.client;
options.logger.info(`${this.metadata.name} provider initialized`);
console.log(`${this.metadata.name} provider initialized`);
}
async resolveBooleanEvaluation(
@ -119,15 +109,12 @@ export class FlagsmithProvider implements Provider {
}
private async evaluate<T>(flagKey: string, identity: Identity): Promise<ResolutionDetails<T>> {
const flags = await (identity.identifier
? this.client.getIdentityFlags(identity.identifier, identity.traits)
: this.client.getEnvironmentFlags());
if (!flags.isFeatureEnabled(flagKey)) {
throw new FlagNotFoundError('The exists but is disabled.');
}
return { value: flags.getFeatureValue(flagKey) };
const value = identity.identifier
? (await this.client.getIdentityFlags(identity.identifier, identity.traits)).getFeatureValue(flagKey)
: (await this.client.getEnvironmentFlags()).getFeatureValue(flagKey);
return {
value,
};
}
private getFlagTypeErrorMessage(flagKey: string, value: unknown, expectedType: string) {

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -1,7 +1,7 @@
{
"presets": [
[
"@nx/js/babel",
"@nrwl/web/babel",
{
"useBuiltIns": "usage"
}

View File

@ -1,30 +1,28 @@
{
"name": "js-harness-provider",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js-harness-provider/src",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/js-harness-provider",
"main": "packages/js-harness-provider/src/index.ts",
"tsConfig": "packages/js-harness-provider/tsconfig.lib.json",
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/js-harness-provider/webpack.config.js"
"compiler": "tsc"
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/js-harness-provider/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/js-harness-provider"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/js-harness-provider"],
"options": {
"jestConfig": "packages/js-harness-provider/jest.config.ts",
"passWithNoTests": true

View File

@ -1,5 +1,5 @@
import { Client, Target } from '@harnessio/ff-nodejs-server-sdk';
import { EvaluationContext, Provider, ResolutionDetails, JsonValue } from '@openfeature/server-sdk';
import { EvaluationContext, Provider, ResolutionDetails, JsonValue } from '@openfeature/js-sdk';
/**
* NOTE: This is an unofficial provider that was created for demonstration
@ -92,6 +92,7 @@ export class OpenFeatureHarnessProvider implements Provider {
* Attempts to transform evaluation context into the format Harness expects.
*/
private transformContext(context: EvaluationContext): Target {
console.log(context);
const { targetingKey: identifier, ...attributes } = context;
if (!identifier) {

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -1,18 +1,16 @@
{
"name": "js-launchdarkly-provider",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js-launchdarkly-provider/src",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/js-launchdarkly-provider",
"main": "packages/js-launchdarkly-provider/src/index.ts",
"tsConfig": "packages/js-launchdarkly-provider/tsconfig.lib.json",
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/js-launchdarkly-provider/webpack.config.js"
"compiler": "tsc"
},
"configurations": {
"production": {
@ -23,15 +21,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/js-launchdarkly-provider/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/js-launchdarkly-provider"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/js-launchdarkly-provider"],
"options": {
"jestConfig": "packages/js-launchdarkly-provider/jest.config.ts",
"passWithNoTests": true

View File

@ -1,10 +1,10 @@
import { FlagValue, JsonValue, ParseError, TypeMismatchError } from '@openfeature/server-sdk';
import { EvaluationContext, Provider, ResolutionDetails, Logger } from '@openfeature/server-sdk';
import { ParseError, TypeMismatchError } from '@openfeature/extra';
import { FlagValue, JsonValue } from '@openfeature/js-sdk';
import { EvaluationContext, Provider, ResolutionDetails } from '@openfeature/js-sdk';
import { init, LDClient, LDUser } from 'launchdarkly-node-server-sdk';
export interface LaunchDarklyProviderOptions {
sdkKey: string;
logger: Logger;
}
/**
@ -27,7 +27,7 @@ export class OpenFeatureLaunchDarklyProvider implements Provider {
// promise to await into before we evaluate any flags.
this.initialized = new Promise((resolve) => {
this.client.once('ready', () => {
options.logger.info(`${this.metadata.name} provider initialized`);
console.log(`${this.metadata.name} provider initialized`);
resolve();
});
});

View File

@ -1,8 +0,0 @@
const { composePlugins, withNx } = require('@nx/webpack');
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});

View File

@ -1,18 +1,16 @@
{
"name": "js-split-provider",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/js-split-provider/src",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/js-split-provider",
"main": "packages/js-split-provider/src/index.ts",
"tsConfig": "packages/js-split-provider/tsconfig.lib.json",
"target": "node",
"compiler": "tsc",
"webpackConfig": "packages/js-split-provider/webpack.config.js"
"compiler": "tsc"
},
"configurations": {
"production": {
@ -23,15 +21,15 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/js-split-provider/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/js-split-provider"],
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/js-split-provider"],
"options": {
"jestConfig": "packages/js-split-provider/jest.config.ts",
"passWithNoTests": true

View File

@ -1,13 +1,9 @@
import { JsonValue, TypeMismatchError } from '@openfeature/server-sdk';
import { EvaluationContext, Provider, ResolutionDetails, Logger } from '@openfeature/server-sdk';
import { parseValidJsonObject, parseValidNumber, TypeMismatchError } from '@openfeature/extra';
import { JsonValue } from '@openfeature/js-sdk';
import { EvaluationContext, Provider, ResolutionDetails } from '@openfeature/js-sdk';
import type { Attributes, IClient } from '@splitsoftware/splitio/types/splitio';
import { parseValidNumber, parseValidJsonObject } from '@openfeature/utils';
/**
*
* NOTE: This is an unofficial provider that was created for demonstration
* purposes only. The playground environment will be updated to use official
* providers once they're available.
* This simple provider implementation relies on storing all data as strings in the treatment value.
*
* It may be more idiomatic to only rely on that for the "isEnabled" calls,
@ -15,7 +11,6 @@ import { parseValidNumber, parseValidJsonObject } from '@openfeature/utils';
*/
export interface SplitProviderOptions {
splitClient: IClient;
logger: Logger;
}
type Consumer = {
@ -41,7 +36,7 @@ export class OpenFeatureSplitProvider implements Provider {
// promise to await into before we evaluate any flags.
this.initialized = new Promise((resolve) => {
this.client.on(this.client.Event.SDK_READY, () => {
options.logger.info(`${this.metadata.name} provider initialized`);
console.log(`${this.metadata.name} provider initialized`);
resolve();
});
});

Some files were not shown because too many files have changed in this diff Show More