@quanticjs/feature-flags 2.1.0 → 3.0.0

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.
@@ -1,9 +1,7 @@
1
1
  import { Unleash } from 'unleash-client';
2
- import { Result, PipelineBehavior, PipelineScope } from '@quanticjs/core';
2
+ import { Result, PipelineBehavior } from '@quanticjs/core';
3
3
  export declare class FeatureFlagBehavior implements PipelineBehavior {
4
4
  private readonly unleash?;
5
- readonly order: 30;
6
- readonly scope: PipelineScope;
7
5
  private readonly logger;
8
6
  constructor(unleash?: Unleash | undefined);
9
7
  execute<T>(command: object, next: () => Promise<Result<T>>): Promise<Result<T>>;
@@ -19,8 +19,6 @@ const unleash_client_1 = require("unleash-client");
19
19
  const core_1 = require("@quanticjs/core");
20
20
  let FeatureFlagBehavior = FeatureFlagBehavior_1 = class FeatureFlagBehavior {
21
21
  unleash;
22
- order = core_1.BehaviorOrder.FEATURE_FLAG;
23
- scope = 'both';
24
22
  logger = new common_1.Logger(FeatureFlagBehavior_1.name);
25
23
  constructor(unleash) {
26
24
  this.unleash = unleash;
@@ -54,6 +52,7 @@ let FeatureFlagBehavior = FeatureFlagBehavior_1 = class FeatureFlagBehavior {
54
52
  exports.FeatureFlagBehavior = FeatureFlagBehavior;
55
53
  exports.FeatureFlagBehavior = FeatureFlagBehavior = FeatureFlagBehavior_1 = __decorate([
56
54
  (0, common_1.Injectable)(),
55
+ (0, core_1.Behavior)({ order: core_1.BehaviorOrder.FEATURE_FLAG, scope: 'both' }),
57
56
  __param(0, (0, common_1.Optional)()),
58
57
  __metadata("design:paramtypes", [unleash_client_1.Unleash])
59
58
  ], FeatureFlagBehavior);
@@ -9,7 +9,6 @@ var QuanticFeatureFlagsModule_1;
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.QuanticFeatureFlagsModule = void 0;
11
11
  const common_1 = require("@nestjs/common");
12
- const core_1 = require("@quanticjs/core");
13
12
  const unleash_module_1 = require("./unleash.module");
14
13
  const FeatureFlagBehavior_1 = require("./FeatureFlagBehavior");
15
14
  let QuanticFeatureFlagsModule = QuanticFeatureFlagsModule_1 = class QuanticFeatureFlagsModule {
@@ -18,7 +17,7 @@ let QuanticFeatureFlagsModule = QuanticFeatureFlagsModule_1 = class QuanticFeatu
18
17
  module: QuanticFeatureFlagsModule_1,
19
18
  imports: [unleash_module_1.UnleashModule.forRoot(options)],
20
19
  providers: [
21
- { provide: core_1.PIPELINE_BEHAVIOR, useExisting: FeatureFlagBehavior_1.FeatureFlagBehavior, multi: true },
20
+ FeatureFlagBehavior_1.FeatureFlagBehavior,
22
21
  ],
23
22
  exports: [
24
23
  unleash_module_1.UnleashModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quanticjs/feature-flags",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Feature flag integration for quanticjs — Unleash-backed pipeline behavior",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "clean": "rm -rf dist"
19
19
  },
20
20
  "dependencies": {
21
- "@quanticjs/core": "^2.1.0"
21
+ "@quanticjs/core": "^3.0.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@nestjs/common": "^11.0.0",