Skip to content

Commit 18f1e69

Browse files
committed
Add initial implementation of Flagsmith server provider
1 parent 9a7ef4f commit 18f1e69

File tree

7 files changed

+537
-0
lines changed

7 files changed

+537
-0
lines changed

libs/providers/flagsmith/package-lock.json

Lines changed: 338 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@openfeature/flagsmith-provider",
3+
"version": "0.1.0",
4+
"scripts": {
5+
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
6+
"current-version": "echo $npm_package_version"
7+
},
8+
"license": "Apache-2.0",
9+
"dependencies": {
10+
"@openfeature/server-sdk": "^1.19.0",
11+
"flagsmith-nodejs": "^6.1.0"
12+
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lib/flagsmith-client-provider';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ErrorCode } from '@openfeature/core';
2+
3+
class FlagsmithProviderError extends Error {
4+
constructor(message: string, public code: ErrorCode) {
5+
super(message);
6+
this.name = "FlagsmithProviderError";
7+
}
8+
}
9+
10+
export { FlagsmithProviderError };

0 commit comments

Comments
 (0)