Skip to content

Commit

Permalink
feat: sdk with double start prevention (#6146)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Feb 7, 2024
1 parent c69f41e commit 7e9958d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"stoppable": "^1.1.0",
"ts-toolbelt": "^9.6.0",
"type-is": "^1.6.18",
"unleash-client": "5.3.2",
"unleash-client": "5.5.0-beta.0",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
10 changes: 9 additions & 1 deletion src/lib/proxy/proxy-repository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import EventEmitter from 'events';
import { RepositoryInterface } from 'unleash-client/lib/repository';
import { Segment } from 'unleash-client/lib/strategy/strategy';
import { FeatureInterface } from 'unleash-client/lib/feature';
import {
EnhancedFeatureInterface,
FeatureInterface,
} from 'unleash-client/lib/feature';
import { IApiUser } from '../types/api-user';
import { IUnleashConfig, IUnleashServices, IUnleashStores } from '../types';
import {
Expand Down Expand Up @@ -68,6 +71,11 @@ export class ProxyRepository
this.interval = config.frontendApi.refreshIntervalInMs;
}

getTogglesWithSegmentData(): EnhancedFeatureInterface[] {
// TODO: add real implementation
return [];
}

getSegment(id: number): Segment | undefined {
return this.segments.find((segment) => segment.id === id);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7152,10 +7152,10 @@ universalify@^0.2.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"
integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==

unleash-client@5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/unleash-client/-/unleash-client-5.3.2.tgz#d4612d6893b2175fd23a038c85c9deaf2d60a1af"
integrity sha512-0iR0bzvWoJSuLPr9VKQhu1qr2jV3UeXcnMJylTzeeZWNhD6dxQSYS1bVl1wGhTRo/ucXnk5Lx66zmreIqojp8Q==
unleash-client@5.5.0-beta.0:
version "5.5.0-beta.0"
resolved "https://registry.yarnpkg.com/unleash-client/-/unleash-client-5.5.0-beta.0.tgz#8e9b8778fa2027fa282dcc9d31e0306a44bbb763"
integrity sha512-/HwClfmGKl6Pl+X8LTe4xCjxjRzgolx9DXBQFVSN6FDLGUHqf7BJWeYbZ5DSu5AaNVG/9dvksmrdjMXDiPSejQ==
dependencies:
ip "^1.1.8"
make-fetch-happen "^10.2.1"
Expand Down

0 comments on commit 7e9958d

Please sign in to comment.