Skip to content

Commit d47ec73

Browse files
Revert unused code
AI-Session-Id: 32df18f1-ed0a-4979-bd0d-eb46df9d5c91 AI-Tool: claude-code AI-Model: unknown
1 parent cbdc76a commit d47ec73

8 files changed

Lines changed: 5 additions & 86 deletions

File tree

src/sdkClient/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { validateDefinitionExistence } from '../utils/inputValidation/definition
55
import { validateTrafficTypeExistence } from '../utils/inputValidation/trafficTypeExistence';
66
import { SDK_NOT_READY } from '../utils/labels';
77
import { CONTROL, TREATMENT, TREATMENTS, TREATMENT_WITH_CONFIG, TREATMENTS_WITH_CONFIG, TRACK, TREATMENTS_WITH_CONFIG_BY_FLAGSETS, TREATMENTS_BY_FLAGSETS, TREATMENTS_BY_FLAGSET, TREATMENTS_WITH_CONFIG_BY_FLAGSET, GET_TREATMENTS_WITH_CONFIG, GET_TREATMENTS_BY_FLAG_SETS, GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SETS, GET_TREATMENTS_BY_FLAG_SET, GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SET, GET_TREATMENT_WITH_CONFIG, GET_TREATMENT, GET_TREATMENTS, TRACK_FN_LABEL } from '../utils/constants';
8-
import { IEvaluation, IEvaluationResult } from '../evaluator/types';
8+
import { IEvaluationResult } from '../evaluator/types';
99
import SplitIO from '../../types/splitio';
1010
import { IMPRESSION_QUEUEING } from '../logger/constants';
1111
import { ISdkFactoryContext } from '../sdkFactory/types';
@@ -72,7 +72,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
7272
const treatments: SplitIO.Treatments | SplitIO.TreatmentsWithConfig = {};
7373
const properties = stringify(options);
7474
Object.keys(evaluationResults).forEach(featureFlagName => {
75-
treatments[featureFlagName] = processEvaluation(evaluationResults[featureFlagName], featureFlagName, key, properties, withConfig, methodName, queue) as SplitIO.Treatment | SplitIO.TreatmentWithConfig;
75+
treatments[featureFlagName] = processEvaluation(evaluationResults[featureFlagName], featureFlagName, key, properties, withConfig, methodName, queue);
7676
});
7777
impressionsTracker.track(queue, attributes);
7878

@@ -101,7 +101,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
101101
const treatments: SplitIO.Treatments | SplitIO.TreatmentsWithConfig = {};
102102
const properties = stringify(options);
103103
Object.keys(evaluationResults).forEach(featureFlagName => {
104-
treatments[featureFlagName] = processEvaluation(evaluationResults[featureFlagName], featureFlagName, key, properties, withConfig, methodName, queue) as SplitIO.Treatment | SplitIO.TreatmentWithConfig;
104+
treatments[featureFlagName] = processEvaluation(evaluationResults[featureFlagName], featureFlagName, key, properties, withConfig, methodName, queue);
105105
});
106106
impressionsTracker.track(queue, attributes);
107107

@@ -139,7 +139,7 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
139139
withConfig: boolean,
140140
invokingMethodName: string,
141141
queue: ImpressionDecorated[]
142-
): SplitIO.Treatment | Pick<IEvaluation, 'treatment' | 'config'> {
142+
): SplitIO.Treatment | SplitIO.TreatmentWithConfig {
143143
const matchingKey = getMatching(key);
144144
const bucketingKey = getBucketing(key);
145145

src/sdkConfigs/index-ff-wrapper.ts

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/sync/submitters/__tests__/telemetrySubmitter.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('Telemetry submitter', () => {
7777
expect(recordTimeUntilReadySpy).toBeCalledTimes(1);
7878

7979
expect(postMetricsConfig).toBeCalledWith(JSON.stringify({
80-
oM: 0, st: 'memory', aF: 0, rF: 0, sE: true, rR: { sp: 0.001, cf: 0.001, se: 0.001, im: 0.001, ev: 0.001, te: 0.1 }, uO: { s: true, e: true, a: true, st: true, t: true }, iQ: 1, eQ: 1, iM: 0, iL: false, hP: false, tR: 0, tC: 0, nR: 0, t: [], i: ['NoopIntegration'], uC: 0, fsT: 0, fsI: 0
80+
oM: 0, st: 'memory', aF: 0, rF: 0, sE: true, rR: { sp: 0.001, se: 0.001, im: 0.001, ev: 0.001, te: 0.1 }, uO: { s: true, e: true, a: true, st: true, t: true }, iQ: 1, eQ: 1, iM: 0, iL: false, hP: false, tR: 0, tC: 0, nR: 0, t: [], i: ['NoopIntegration'], uC: 0, fsT: 0, fsI: 0
8181
}));
8282

8383
// Stop submitter, to not execute the 1st periodic metrics/usage POST

src/sync/submitters/telemetrySubmitter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export function telemetryCacheConfigAdapter(telemetry: ITelemetryCacheSync, sett
8181
sE: settings.streamingEnabled,
8282
rR: {
8383
sp: scheduler.featuresRefreshRate / 1000,
84-
cf: scheduler.configsRefreshRate / 1000,
8584
se: isServerSide ? scheduler.segmentsRefreshRate / 1000 : undefined,
8685
ms: isServerSide ? undefined : scheduler.segmentsRefreshRate / 1000,
8786
im: scheduler.impressionsRefreshRate / 1000,

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export interface ISettings extends SplitIO.ISettings {
1212
};
1313
readonly log: ILogger;
1414
readonly initialRolloutPlan?: RolloutPlan;
15-
readonly definitionsType?: 'ff' | 'configs'; // default is 'ff'
1615
}
1716

1817
/**

src/utils/settingsValidation/__tests__/settings.mocks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const fullSettings: ISettings = {
3838
},
3939
scheduler: {
4040
featuresRefreshRate: 1,
41-
configsRefreshRate: 1,
4241
impressionsRefreshRate: 1,
4342
telemetryRefreshRate: 1,
4443
segmentsRefreshRate: 1,

src/utils/settingsValidation/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export const base = {
2929
scheduler: {
3030
// fetch feature updates each 60 sec
3131
featuresRefreshRate: 60,
32-
// fetch configs updates each 60 sec
33-
configsRefreshRate: 60,
3432
// fetch segments updates each 60 sec
3533
segmentsRefreshRate: 60,
3634
// publish telemetry stats each 3600 secs (1 hour)
@@ -131,7 +129,6 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
131129
// Scheduler periods
132130
const { scheduler, startup } = withDefaults;
133131
scheduler.featuresRefreshRate = fromSecondsToMillis(scheduler.featuresRefreshRate);
134-
scheduler.configsRefreshRate = fromSecondsToMillis(scheduler.configsRefreshRate);
135132
scheduler.segmentsRefreshRate = fromSecondsToMillis(scheduler.segmentsRefreshRate);
136133
scheduler.offlineRefreshRate = fromSecondsToMillis(scheduler.offlineRefreshRate);
137134
scheduler.eventsPushRate = fromSecondsToMillis(scheduler.eventsPushRate);

types/splitio.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,6 @@ declare namespace SplitIO {
615615
readonly mode: SDKMode;
616616
readonly scheduler: {
617617
featuresRefreshRate: number;
618-
configsRefreshRate: number;
619618
impressionsRefreshRate: number;
620619
impressionsQueueSize: number;
621620
/**

0 commit comments

Comments
 (0)