@ductape/sdk 0.1.130 → 0.1.131

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -189,7 +189,7 @@ export declare class FeatureService {
189
189
  * const validation = await ctx.step('validate', async () => {
190
190
  * return ctx.api.run({
191
191
  * app: 'inventory-service',
192
- * event: 'validate-order',
192
+ * action: 'validate-order',
193
193
  * input: { body: ctx.input },
194
194
  * });
195
195
  * });
@@ -580,7 +580,7 @@ class FeatureService {
580
580
  * const validation = await ctx.step('validate', async () => {
581
581
  * return ctx.api.run({
582
582
  * app: 'inventory-service',
583
- * event: 'validate-order',
583
+ * action: 'validate-order',
584
584
  * input: { body: ctx.input },
585
585
  * });
586
586
  * });
@@ -113,7 +113,7 @@ export interface IRollbackResult {
113
113
  export interface IFeatureActionContext {
114
114
  run<T>(options: {
115
115
  app: string;
116
- event: string;
116
+ action: string;
117
117
  input: IActionRequest;
118
118
  retries?: number;
119
119
  timeout?: number;
package/dist/index.js CHANGED
@@ -5786,8 +5786,12 @@ class Ductape {
5786
5786
  await this.initUserAuth(subCheck);
5787
5787
  // Ensure secrets service is initialized so feature steps can resolve $Secret{...} / $secret{...} in configs (broker, storage, etc.)
5788
5788
  await this.createNewSecretsService();
5789
+ // Connect to Redis for caching (if configured) -- without this, FeatureService.define()'s
5790
+ // fingerprint cache never receives a redis_client and silently re-checks every feature
5791
+ // against the remote catalogue on every single call, regardless of consumer config.
5792
+ await this.connectCacheRedis();
5789
5793
  if (!this._featureService) {
5790
- this._featureService = new features_1.FeatureService(Object.assign(Object.assign({}, this.builderInit()), { private_key: this._privateKey }));
5794
+ this._featureService = new features_1.FeatureService(Object.assign(Object.assign({}, this.builderInit()), { private_key: this._privateKey, redis_client: this.redisClient }));
5791
5795
  }
5792
5796
  return this._featureService;
5793
5797
  }