@forge/bridge
6.1.1-next.16.1.1-next.2
−
Removed (3 files)
~
Modified (8 files)
Index: package/out/featureFlags/featureFlags.js
===================================================================
--- package/out/featureFlags/featureFlags.js
+++ package/out/featureFlags/featureFlags.js
@@ -1,15 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FeatureFlags = void 0;
const evaluator_1 = require("./evaluator");
-const featureFlagEvents_1 = require("./featureFlagEvents");
const initFeatureFlags_1 = require("./initFeatureFlags");
-const types_1 = require("./types");
class FeatureFlags {
constructor() {
this.initialized = false;
- this.eventProps = {};
}
/**
* Initialize the feature flags client
*/
@@ -19,9 +16,8 @@
}
if (!(config === null || config === void 0 ? void 0 : config.environment)) {
config.environment = 'development';
}
- this.eventProps.environment = config.environment;
const result = await (0, initFeatureFlags_1.initFeatureFlags)({ user, config });
this.initialized = true;
this.evaluator = new evaluator_1.Evaluator(result);
}
@@ -29,12 +25,10 @@
* Check if a feature flag is enabled for the user
*/
checkFlag(flagName, defaultValue = false) {
if (!this.isInitialized() || !this.evaluator) {
- this.sendCheckFlagEvent(flagName, false);
throw new Error('FeatureFlags not initialized. Call initialize() first.');
}
- this.sendCheckFlagEvent(flagName, true);
return this.evaluator.checkFlag(flagName, defaultValue);
}
/**
* Shutdown the feature flags client
@@ -48,18 +42,6 @@
}
isInitialized() {
return this.initialized;
}
- sendCheckFlagEvent(flagName, success) {
- const props = {
- type: types_1.FeatureFlagEventType.CHECKFLAG,
- properties: {
- ...this.eventProps,
- environment: this.eventProps.environment || 'development',
- name: flagName,
- success
- }
- };
- void (0, featureFlagEvents_1.trackFeatureFlagEvent)(props);
- }
}
exports.FeatureFlags = FeatureFlags; Index: package/out/featureFlags/types.js
===================================================================
--- package/out/featureFlags/types.js
+++ package/out/featureFlags/types.js
@@ -1,7 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.FeatureFlagEventType = void 0;
-var FeatureFlagEventType;
-(function (FeatureFlagEventType) {
- FeatureFlagEventType["CHECKFLAG"] = "checkFlag";
-})(FeatureFlagEventType || (exports.FeatureFlagEventType = FeatureFlagEventType = {})); Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/bridge",
- "version": "6.1.1-next.1",
+ "version": "6.1.1-next.2",
"description": "Forge bridge API for custom UI apps",
"author": "Atlassian",
"license": "SEE LICENSE IN LICENSE.txt",
"main": "out/index.js", Index: package/out/featureFlags/featureFlags.d.ts.map
===================================================================
--- package/out/featureFlags/featureFlags.d.ts.map
+++ package/out/featureFlags/featureFlags.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../src/featureFlags/featureFlags.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,eAAe,EACf,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAEjB,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,UAAU,CAAkC;IAEpD;;OAEG;IACU,UAAU,CACrB,IAAI,EAAE,eAAe,EACrB,MAAM,GAAE,sBAAuD,GAC9D,OAAO,CAAC,IAAI,CAAC;IAiBhB;;OAEG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO;IAUjE;;OAEG;IACI,QAAQ;IAQR,aAAa;IAIpB,OAAO,CAAC,kBAAkB;CAa3B"}
\ No newline at end of file
+{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../src/featureFlags/featureFlags.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAA4B,MAAM,SAAS,CAAC;AAE5F,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAa;IAE9B;;OAEG;IACU,UAAU,CACrB,IAAI,EAAE,eAAe,EACrB,MAAM,GAAE,sBAAuD,GAC9D,OAAO,CAAC,IAAI,CAAC;IAehB;;OAEG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO;IAQjE;;OAEG;IACI,QAAQ;IAQR,aAAa;CAGrB"}
\ No newline at end of file Index: package/out/featureFlags/types.d.ts.map
===================================================================
--- package/out/featureFlags/types.d.ts.map
+++ package/out/featureFlags/types.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/featureFlags/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,sBAAsB,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;AAElE,oBAAY,oBAAoB;IAC9B,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;AAE9E,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,UAAU,EAAE,0BAA0B,CAAC;CACxC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/featureFlags/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,sBAAsB,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;AAElE,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC"}
\ No newline at end of file Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
# @forge/bridge
+## 6.1.1-next.2
+
+### Patch Changes
+
+- f1ec6d7: Remove tracking of client sdk initialisation and checkFlag events
+
## 6.1.1-next.1
### Patch Changes Index: package/out/featureFlags/featureFlags.d.ts
===================================================================
--- package/out/featureFlags/featureFlags.d.ts
+++ package/out/featureFlags/featureFlags.d.ts
@@ -1,9 +1,8 @@
import { FeatureFlagUser, ForgeFeatureFlagConfig } from './types';
export declare class FeatureFlags {
private initialized;
private evaluator;
- private eventProps;
/**
* Initialize the feature flags client
*/
initialize(user: FeatureFlagUser, config?: ForgeFeatureFlagConfig): Promise<void>;
@@ -15,7 +14,6 @@
* Shutdown the feature flags client
*/
shutdown(): void;
isInitialized(): boolean;
- private sendCheckFlagEvent;
}
//# sourceMappingURL=featureFlags.d.ts.map
\ No newline at end of file Index: package/out/featureFlags/types.d.ts
===================================================================
--- package/out/featureFlags/types.d.ts
+++ package/out/featureFlags/types.d.ts
@@ -12,18 +12,6 @@
user: FeatureFlagUser;
config: ForgeFeatureFlagConfig;
};
export type InitFeatureFlagsResponse = Record<string, any> | void;
-export declare enum FeatureFlagEventType {
- CHECKFLAG = "checkFlag"
-}
export type FeatureFlagEnvironment = 'development' | 'staging' | 'production';
-export type FeatureFlagEventProperties = {
- environment?: FeatureFlagEnvironment;
- success?: boolean;
- name?: string;
-};
-export type FeatureFlagEventTrackPayload = {
- type: FeatureFlagEventType;
- properties: FeatureFlagEventProperties;
-};
//# sourceMappingURL=types.d.ts.map
\ No newline at end of file