diff --git a/packages/shared/akamai-edgeworker-sdk/src/featureStore/index.ts b/packages/shared/akamai-edgeworker-sdk/src/featureStore/index.ts index 18960e1f75..cf968f3916 100644 --- a/packages/shared/akamai-edgeworker-sdk/src/featureStore/index.ts +++ b/packages/shared/akamai-edgeworker-sdk/src/featureStore/index.ts @@ -107,6 +107,15 @@ export class EdgeFeatureStore implements LDFeatureStore { } init(allData: LDFeatureStoreDataStorage, callback: () => void): void { + this.applyChanges(true, allData, undefined, callback); + } + + applyChanges( + basis: boolean, + data: LDFeatureStoreDataStorage, + selector: String | undefined, + callback: () => void, + ): void { callback(); } diff --git a/packages/shared/sdk-server-edge/src/api/EdgeFeatureStore.ts b/packages/shared/sdk-server-edge/src/api/EdgeFeatureStore.ts index a60cebdf4d..55cedb31fe 100644 --- a/packages/shared/sdk-server-edge/src/api/EdgeFeatureStore.ts +++ b/packages/shared/sdk-server-edge/src/api/EdgeFeatureStore.ts @@ -100,7 +100,7 @@ export class EdgeFeatureStore implements LDFeatureStore { } init(allData: LDFeatureStoreDataStorage, callback: () => void): void { - callback(); + this.applyChanges(true, allData, undefined, callback); } applyChanges( diff --git a/packages/shared/sdk-server/src/options/Configuration.ts b/packages/shared/sdk-server/src/options/Configuration.ts index 77baf0de39..cb4959d202 100644 --- a/packages/shared/sdk-server/src/options/Configuration.ts +++ b/packages/shared/sdk-server/src/options/Configuration.ts @@ -59,6 +59,8 @@ const validations: Record = { hooks: TypeValidators.createTypeArray('Hook[]', {}), }; + + /** * @internal */ diff --git a/packages/store/node-server-sdk-dynamodb/src/DynamoDBFeatureStore.ts b/packages/store/node-server-sdk-dynamodb/src/DynamoDBFeatureStore.ts index 100d7b92d0..ec248ece72 100644 --- a/packages/store/node-server-sdk-dynamodb/src/DynamoDBFeatureStore.ts +++ b/packages/store/node-server-sdk-dynamodb/src/DynamoDBFeatureStore.ts @@ -51,6 +51,15 @@ export default class DynamoDBFeatureStore implements LDFeatureStore { this._wrapper.upsert(kind, data, callback); } + applyChanges( + basis: boolean, + data: LDFeatureStoreDataStorage, + selector: String | undefined, + callback: () => void, + ): void { + this._wrapper.applyChanges(basis, data, selector, callback); + } + initialized(callback: (isInitialized: boolean) => void): void { this._wrapper.initialized(callback); } diff --git a/packages/store/node-server-sdk-redis/src/RedisFeatureStore.ts b/packages/store/node-server-sdk-redis/src/RedisFeatureStore.ts index c01b5d7522..be4efd7559 100644 --- a/packages/store/node-server-sdk-redis/src/RedisFeatureStore.ts +++ b/packages/store/node-server-sdk-redis/src/RedisFeatureStore.ts @@ -51,6 +51,15 @@ export default class RedisFeatureStore implements LDFeatureStore { this._wrapper.upsert(kind, data, callback); } + applyChanges( + basis: boolean, + data: LDFeatureStoreDataStorage, + selector: String | undefined, + callback: () => void, + ): void { + this._wrapper.applyChanges(basis, data, selector, callback); + } + initialized(callback: (isInitialized: boolean) => void): void { this._wrapper.initialized(callback); }