@yuno-payments/dashboard-api-mfe 2.7.1 → 2.7.3

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,11 +1,10 @@
1
1
  /**
2
- * Tests for the FEATURE_FLAGS_PROVIDER kill-switch in feature-flags/index.ts.
2
+ * Tests for the feature-flags/index.ts routing.
3
3
  *
4
- * The switch resolves at module-load time, so each test isolates a fresh
5
- * module instance via `jest.isolateModules` after re-stubbing the env var.
6
- *
7
- * `require()` is used inside `isolateModules` because that API is the
8
- * synchronous CJS entry point Jest exposes for re-loading modules under
9
- * a mutated env. ESM `import()` would be evaluated asynchronously outside
10
- * the isolated scope and break the test contract.
4
+ * As of v2.7.2 the switch is hardcoded to datadog (see
5
+ * `src/utils/feature-flags-provider.ts`). The legacy hooks file is kept
6
+ * around for a one-revert rollback path but is no longer reachable from
7
+ * the public hooks. These tests cover both: the public entry always
8
+ * exposes the datadog impls, and both modules still share the same
9
+ * function shape so a future env-var-driven rollback would Just Work.
11
10
  */
@@ -1,21 +1,21 @@
1
1
  /**
2
- * Feature-flag provider switch (kill-switch for DAS-15798 migration).
2
+ * Feature-flag provider switch (DAS-15798 migration).
3
3
  *
4
- * Set via the `FEATURE_FLAGS_PROVIDER` build env var (inlined at build
5
- * time by rspack DefinePlugin). Defaults to 'legacy' (the in-house Go
6
- * service via React Query). Flip to 'datadog' once the Datadog Feature
7
- * Flags integration is bootstrapped by container-mfe.
4
+ * Hardcoded to 'datadog' as of v2.7.2. The env-var-based switch
5
+ * (`FEATURE_FLAGS_PROVIDER`) is gone: api-mfe queries always route to
6
+ * `./datadog-hooks`, and `dashboard-container-mfe`'s bootstrap effect
7
+ * (which checks this function) always proceeds to set up the
8
+ * OpenFeature Datadog provider.
8
9
  *
9
- * Read by `src/queries/feature-flags/index.ts` to route hook consumers
10
- * between `./datadog-hooks` and `./legacy-hooks`. Also re-exported from
11
- * the package public API so `dashboard-container-mfe` can read the same
12
- * inlined value to gate its Datadog OpenFeature bootstrap single
13
- * source of truth across both MFEs.
10
+ * The function and type are kept around (instead of inlining the
11
+ * constant) so:
12
+ * 1. Consumers like container-mfe don't need a code change.
13
+ * 2. Rollback to the legacy hooks (revert this file + republish) stays
14
+ * a single-file change.
14
15
  *
15
- * Rollback path: flip the env var and rebuild/redeploy api-mfe
16
- * (~5–10 min). No code revert needed.
17
- *
18
- * Delete this file (and the legacy hooks branch) after Phase 4 soak.
16
+ * Once we're confident no rollback is needed, delete `./legacy-hooks`,
17
+ * delete this file, and inline the datadog branch in
18
+ * `queries/feature-flags/index.ts` (Phase 5 cleanup).
19
19
  */
20
20
  export type FeatureFlagsProvider = 'datadog' | 'legacy';
21
21
  export declare function getFeatureFlagsProvider(): FeatureFlagsProvider;
@@ -9,3 +9,4 @@ export * from './websockets';
9
9
  export * from './utils';
10
10
  export { getFeatureFlagsProvider, type FeatureFlagsProvider, } from './utils/feature-flags-provider';
11
11
  export { emitExpired, resetExpiredGuard, SESSION_EXPIRED_MESSAGE_TYPE, } from './lib/session-expired';
12
+ export { OpenFeature } from '@openfeature/web-sdk';
package/build/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse, AxiosInstan
4
4
  import { Request } from 'express';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { UseMutationResult, UseMutationOptions, UseQueryResult, UseQueryOptions, QueryCache, QueryClient } from '@tanstack/react-query';
7
+ export { OpenFeature } from '@openfeature/web-sdk';
7
8
 
8
9
  declare class Axios {
9
10
  interceptors?: {
@@ -8399,23 +8400,23 @@ type DatadogEnvironment = 'dev' | 'stg' | 'sb' | 'prod';
8399
8400
  declare function getDatadogEnvironment(): DatadogEnvironment;
8400
8401
 
8401
8402
  /**
8402
- * Feature-flag provider switch (kill-switch for DAS-15798 migration).
8403
+ * Feature-flag provider switch (DAS-15798 migration).
8403
8404
  *
8404
- * Set via the `FEATURE_FLAGS_PROVIDER` build env var (inlined at build
8405
- * time by rspack DefinePlugin). Defaults to 'legacy' (the in-house Go
8406
- * service via React Query). Flip to 'datadog' once the Datadog Feature
8407
- * Flags integration is bootstrapped by container-mfe.
8405
+ * Hardcoded to 'datadog' as of v2.7.2. The env-var-based switch
8406
+ * (`FEATURE_FLAGS_PROVIDER`) is gone: api-mfe queries always route to
8407
+ * `./datadog-hooks`, and `dashboard-container-mfe`'s bootstrap effect
8408
+ * (which checks this function) always proceeds to set up the
8409
+ * OpenFeature Datadog provider.
8408
8410
  *
8409
- * Read by `src/queries/feature-flags/index.ts` to route hook consumers
8410
- * between `./datadog-hooks` and `./legacy-hooks`. Also re-exported from
8411
- * the package public API so `dashboard-container-mfe` can read the same
8412
- * inlined value to gate its Datadog OpenFeature bootstrap single
8413
- * source of truth across both MFEs.
8411
+ * The function and type are kept around (instead of inlining the
8412
+ * constant) so:
8413
+ * 1. Consumers like container-mfe don't need a code change.
8414
+ * 2. Rollback to the legacy hooks (revert this file + republish) stays
8415
+ * a single-file change.
8414
8416
  *
8415
- * Rollback path: flip the env var and rebuild/redeploy api-mfe
8416
- * (~5–10 min). No code revert needed.
8417
- *
8418
- * Delete this file (and the legacy hooks branch) after Phase 4 soak.
8417
+ * Once we're confident no rollback is needed, delete `./legacy-hooks`,
8418
+ * delete this file, and inline the datadog branch in
8419
+ * `queries/feature-flags/index.ts` (Phase 5 cleanup).
8419
8420
  */
8420
8421
  type FeatureFlagsProvider = 'datadog' | 'legacy';
8421
8422
  declare function getFeatureFlagsProvider(): FeatureFlagsProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/dashboard-api-mfe",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "types": "build/index.d.ts",
5
5
  "main": "build/cjs/index.js",
6
6
  "module": "build/esm/index.js",