wolves-react-client 1.0.0 → 1.0.1

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 +1 @@
1
- {"version":3,"file":"WolvesProvider.d.ts","sourceRoot":"","sources":["../src/WolvesProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoKxD,CAAC"}
1
+ {"version":3,"file":"WolvesProvider.d.ts","sourceRoot":"","sources":["../src/WolvesProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuKxD,CAAC"}
@@ -47,6 +47,7 @@ const react_1 = __importStar(require("react"));
47
47
  const wolves_js_client_1 = require("wolves-js-client");
48
48
  const WolvesContext_1 = require("./WolvesContext");
49
49
  const ssrHelpers_1 = require("./utils/ssrHelpers");
50
+ const metadata_1 = require("./metadata");
50
51
  /**
51
52
  * WolvesProvider is the root component for integrating Wolves SDK with React.
52
53
  * It initializes the WolvesClient and provides it to child components via React Context.
@@ -86,6 +87,8 @@ const WolvesProvider = ({ sdkKey, user, children, options = {}, waitForInitializ
86
87
  const initMode = options.initMode || 'async';
87
88
  const initializeClient = () => __awaiter(void 0, void 0, void 0, function* () {
88
89
  try {
90
+ // Set React SDK metadata before creating client
91
+ wolves_js_client_1.WolvesMetadataProvider.add((0, metadata_1.getReactSDKMetadata)());
89
92
  const newClient = new wolves_js_client_1.WolvesClient(sdkKey, user, options.apiEnv || 'prod');
90
93
  if (initMode === 'async') {
91
94
  // Async initialization
@@ -0,0 +1,14 @@
1
+ /**
2
+ * React SDK Metadata
3
+ * This file defines the SDK version and type for the Wolves React SDK
4
+ */
5
+ export declare const REACT_SDK_VERSION = "1.0.1";
6
+ export declare const REACT_SDK_TYPE = "wolves-react-client";
7
+ /**
8
+ * Get React SDK metadata to override the JS SDK metadata
9
+ */
10
+ export declare const getReactSDKMetadata: () => {
11
+ sdk_version: string;
12
+ sdk_type: string;
13
+ };
14
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,cAAc,wBAAwB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAG9B,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * React SDK Metadata
4
+ * This file defines the SDK version and type for the Wolves React SDK
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.getReactSDKMetadata = exports.REACT_SDK_TYPE = exports.REACT_SDK_VERSION = void 0;
8
+ exports.REACT_SDK_VERSION = '1.0.1';
9
+ exports.REACT_SDK_TYPE = 'wolves-react-client';
10
+ /**
11
+ * Get React SDK metadata to override the JS SDK metadata
12
+ */
13
+ const getReactSDKMetadata = () => ({
14
+ sdk_version: exports.REACT_SDK_VERSION,
15
+ sdk_type: exports.REACT_SDK_TYPE,
16
+ });
17
+ exports.getReactSDKMetadata = getReactSDKMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolves-react-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "React SDK for Wolves A/B Testing Platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",