@flagix/js-sdk 1.3.1 → 1.4.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,5 +1,5 @@
1
1
 
2
- > @flagix/js-sdk@1.3.1 build /home/runner/work/flagix/flagix/sdk/javascript
2
+ > @flagix/js-sdk@1.4.0 build /home/runner/work/flagix/flagix/sdk/javascript
3
3
  > tsup src/index.ts --format cjs,esm --dts --clean
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,11 +9,11 @@
9
9
  CLI Cleaning output folder
10
10
  CJS Build start
11
11
  ESM Build start
12
- CJS dist/index.js 18.09 KB
13
- CJS ⚡️ Build success in 48ms
14
12
  ESM dist/index.mjs 16.41 KB
15
- ESM ⚡️ Build success in 48ms
13
+ ESM ⚡️ Build success in 54ms
14
+ CJS dist/index.js 18.09 KB
15
+ CJS ⚡️ Build success in 55ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 1875ms
17
+ DTS ⚡️ Build success in 1889ms
18
18
  DTS dist/index.d.ts 2.41 KB
19
19
  DTS dist/index.d.mts 2.41 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @flagix/js-sdk
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f452756: migrated internal tracking and evaluation endpoints to a generic /api/sync path. This change is to improve the SDK reliability by bypassing aggressive tracking filters in browser privacy extensions and ad-blockers
8
+
3
9
  ## 1.3.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -395,7 +395,7 @@ var FlagixClient = class {
395
395
  * Records a custom event (conversion) for analytics and A/B testing.
396
396
  */
397
397
  track(eventName, properties, contextOverrides) {
398
- const url = `${this.apiBaseUrl}/api/track/event`;
398
+ const url = `${this.apiBaseUrl}/api/sync/event`;
399
399
  const finalContext = { ...this.context, ...contextOverrides };
400
400
  const distinctId = (0, import_evaluation_core.resolveIdentifier)(finalContext);
401
401
  const payload = {
@@ -436,7 +436,7 @@ var FlagixClient = class {
436
436
  * Asynchronously sends an evaluation event to the backend tracking service.
437
437
  */
438
438
  trackEvaluation(flagKey, result, context) {
439
- const url = `${this.apiBaseUrl}/api/track/evaluation`;
439
+ const url = `${this.apiBaseUrl}/api/sync/evaluation`;
440
440
  const distinctId = (0, import_evaluation_core.resolveIdentifier)(context);
441
441
  const payload = {
442
442
  apiKey: this.apiKey,
package/dist/index.mjs CHANGED
@@ -359,7 +359,7 @@ var FlagixClient = class {
359
359
  * Records a custom event (conversion) for analytics and A/B testing.
360
360
  */
361
361
  track(eventName, properties, contextOverrides) {
362
- const url = `${this.apiBaseUrl}/api/track/event`;
362
+ const url = `${this.apiBaseUrl}/api/sync/event`;
363
363
  const finalContext = { ...this.context, ...contextOverrides };
364
364
  const distinctId = resolveIdentifier(finalContext);
365
365
  const payload = {
@@ -400,7 +400,7 @@ var FlagixClient = class {
400
400
  * Asynchronously sends an evaluation event to the backend tracking service.
401
401
  */
402
402
  trackEvaluation(flagKey, result, context) {
403
- const url = `${this.apiBaseUrl}/api/track/evaluation`;
403
+ const url = `${this.apiBaseUrl}/api/sync/evaluation`;
404
404
  const distinctId = resolveIdentifier(context);
405
405
  const payload = {
406
406
  apiKey: this.apiKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flagix/js-sdk",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Flagix Javascript SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/client.ts CHANGED
@@ -412,7 +412,7 @@ export class FlagixClient {
412
412
  properties?: Record<string, unknown>,
413
413
  contextOverrides?: EvaluationContext
414
414
  ): void {
415
- const url = `${this.apiBaseUrl}/api/track/event`;
415
+ const url = `${this.apiBaseUrl}/api/sync/event`;
416
416
 
417
417
  const finalContext = { ...this.context, ...contextOverrides };
418
418
  const distinctId = resolveIdentifier(finalContext);
@@ -466,7 +466,7 @@ export class FlagixClient {
466
466
  result: FlagVariation,
467
467
  context: EvaluationContext
468
468
  ): void {
469
- const url = `${this.apiBaseUrl}/api/track/evaluation`;
469
+ const url = `${this.apiBaseUrl}/api/sync/evaluation`;
470
470
 
471
471
  const distinctId = resolveIdentifier(context);
472
472