@sendoracloud/sdk-react-native 1.15.0 → 1.16.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.
- package/dist/index.cjs +17 -4
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +17 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -139,7 +139,7 @@ var Storage = class {
|
|
|
139
139
|
// package.json
|
|
140
140
|
var package_default = {
|
|
141
141
|
name: "@sendoracloud/sdk-react-native",
|
|
142
|
-
version: "1.
|
|
142
|
+
version: "1.16.0",
|
|
143
143
|
description: "Sendora Cloud React Native + Expo SDK \u2014 analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
144
144
|
type: "module",
|
|
145
145
|
main: "./dist/index.cjs",
|
|
@@ -2046,7 +2046,7 @@ function byteLength(s) {
|
|
|
2046
2046
|
return s.length * 4;
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
|
-
function buildDeviceContext(appVersion) {
|
|
2049
|
+
function buildDeviceContext(appVersion, appBuild) {
|
|
2050
2050
|
try {
|
|
2051
2051
|
const os = import_react_native4.Platform?.OS;
|
|
2052
2052
|
if (os !== "ios" && os !== "android") return void 0;
|
|
@@ -2056,7 +2056,8 @@ function buildDeviceContext(appVersion) {
|
|
|
2056
2056
|
os: os === "ios" ? "iOS" : "Android",
|
|
2057
2057
|
osVersion: String(import_react_native4.Platform.Version ?? ""),
|
|
2058
2058
|
model: expoDeviceModel(),
|
|
2059
|
-
appVersion: resolveAppVersion(appVersion)
|
|
2059
|
+
appVersion: resolveAppVersion(appVersion),
|
|
2060
|
+
appBuild: resolveAppBuild(appBuild)
|
|
2060
2061
|
};
|
|
2061
2062
|
} catch {
|
|
2062
2063
|
return void 0;
|
|
@@ -2122,6 +2123,18 @@ function resolveAppVersion(configAppVersion) {
|
|
|
2122
2123
|
const g = globalThis.__SENDORA_APP_VERSION__;
|
|
2123
2124
|
return typeof g === "string" ? g : "";
|
|
2124
2125
|
}
|
|
2126
|
+
function expoApplicationBuild() {
|
|
2127
|
+
const a = expoModule("ExpoApplication");
|
|
2128
|
+
const v = a?.nativeBuildVersion;
|
|
2129
|
+
return typeof v === "string" && v ? v : "";
|
|
2130
|
+
}
|
|
2131
|
+
function resolveAppBuild(configAppBuild) {
|
|
2132
|
+
if (configAppBuild) return configAppBuild;
|
|
2133
|
+
const appMod = expoApplicationBuild();
|
|
2134
|
+
if (appMod) return appMod;
|
|
2135
|
+
const g = globalThis.__SENDORA_APP_BUILD__;
|
|
2136
|
+
return typeof g === "string" ? g : "";
|
|
2137
|
+
}
|
|
2125
2138
|
var SendoraSDK = class {
|
|
2126
2139
|
constructor() {
|
|
2127
2140
|
this.config = null;
|
|
@@ -2932,7 +2945,7 @@ var SendoraSDK = class {
|
|
|
2932
2945
|
async sendEvent(kind, payload) {
|
|
2933
2946
|
if (!this.config) return;
|
|
2934
2947
|
if (!this.consentGranted) return;
|
|
2935
|
-
const device = buildDeviceContext(this.config.appVersion);
|
|
2948
|
+
const device = buildDeviceContext(this.config.appVersion, this.config.appBuild);
|
|
2936
2949
|
await post(
|
|
2937
2950
|
{ apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
|
|
2938
2951
|
"/api/v1/events",
|
package/dist/index.d.cts
CHANGED
|
@@ -824,6 +824,12 @@ interface SendoraConfig {
|
|
|
824
824
|
* `react-native-device-info`) if you want app-version analytics.
|
|
825
825
|
*/
|
|
826
826
|
appVersion?: string;
|
|
827
|
+
/**
|
|
828
|
+
* App build number (iOS `CFBundleVersion` / Android `versionCode`). Auto-read
|
|
829
|
+
* from expo-application's `nativeBuildVersion` when present; supply here to
|
|
830
|
+
* override or for non-Expo apps. Shown as "version (build)" on the dashboard.
|
|
831
|
+
*/
|
|
832
|
+
appBuild?: string;
|
|
827
833
|
}
|
|
828
834
|
type TraitValue = string | number | boolean | null | undefined;
|
|
829
835
|
interface IdentifyTraits {
|
package/dist/index.d.ts
CHANGED
|
@@ -824,6 +824,12 @@ interface SendoraConfig {
|
|
|
824
824
|
* `react-native-device-info`) if you want app-version analytics.
|
|
825
825
|
*/
|
|
826
826
|
appVersion?: string;
|
|
827
|
+
/**
|
|
828
|
+
* App build number (iOS `CFBundleVersion` / Android `versionCode`). Auto-read
|
|
829
|
+
* from expo-application's `nativeBuildVersion` when present; supply here to
|
|
830
|
+
* override or for non-Expo apps. Shown as "version (build)" on the dashboard.
|
|
831
|
+
*/
|
|
832
|
+
appBuild?: string;
|
|
827
833
|
}
|
|
828
834
|
type TraitValue = string | number | boolean | null | undefined;
|
|
829
835
|
interface IdentifyTraits {
|
package/dist/index.js
CHANGED
|
@@ -96,7 +96,7 @@ var Storage = class {
|
|
|
96
96
|
// package.json
|
|
97
97
|
var package_default = {
|
|
98
98
|
name: "@sendoracloud/sdk-react-native",
|
|
99
|
-
version: "1.
|
|
99
|
+
version: "1.16.0",
|
|
100
100
|
description: "Sendora Cloud React Native + Expo SDK \u2014 analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
101
101
|
type: "module",
|
|
102
102
|
main: "./dist/index.cjs",
|
|
@@ -2008,7 +2008,7 @@ function byteLength(s) {
|
|
|
2008
2008
|
return s.length * 4;
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
function buildDeviceContext(appVersion) {
|
|
2011
|
+
function buildDeviceContext(appVersion, appBuild) {
|
|
2012
2012
|
try {
|
|
2013
2013
|
const os = Platform?.OS;
|
|
2014
2014
|
if (os !== "ios" && os !== "android") return void 0;
|
|
@@ -2018,7 +2018,8 @@ function buildDeviceContext(appVersion) {
|
|
|
2018
2018
|
os: os === "ios" ? "iOS" : "Android",
|
|
2019
2019
|
osVersion: String(Platform.Version ?? ""),
|
|
2020
2020
|
model: expoDeviceModel(),
|
|
2021
|
-
appVersion: resolveAppVersion(appVersion)
|
|
2021
|
+
appVersion: resolveAppVersion(appVersion),
|
|
2022
|
+
appBuild: resolveAppBuild(appBuild)
|
|
2022
2023
|
};
|
|
2023
2024
|
} catch {
|
|
2024
2025
|
return void 0;
|
|
@@ -2084,6 +2085,18 @@ function resolveAppVersion(configAppVersion) {
|
|
|
2084
2085
|
const g = globalThis.__SENDORA_APP_VERSION__;
|
|
2085
2086
|
return typeof g === "string" ? g : "";
|
|
2086
2087
|
}
|
|
2088
|
+
function expoApplicationBuild() {
|
|
2089
|
+
const a = expoModule("ExpoApplication");
|
|
2090
|
+
const v = a?.nativeBuildVersion;
|
|
2091
|
+
return typeof v === "string" && v ? v : "";
|
|
2092
|
+
}
|
|
2093
|
+
function resolveAppBuild(configAppBuild) {
|
|
2094
|
+
if (configAppBuild) return configAppBuild;
|
|
2095
|
+
const appMod = expoApplicationBuild();
|
|
2096
|
+
if (appMod) return appMod;
|
|
2097
|
+
const g = globalThis.__SENDORA_APP_BUILD__;
|
|
2098
|
+
return typeof g === "string" ? g : "";
|
|
2099
|
+
}
|
|
2087
2100
|
var SendoraSDK = class {
|
|
2088
2101
|
constructor() {
|
|
2089
2102
|
this.config = null;
|
|
@@ -2894,7 +2907,7 @@ var SendoraSDK = class {
|
|
|
2894
2907
|
async sendEvent(kind, payload) {
|
|
2895
2908
|
if (!this.config) return;
|
|
2896
2909
|
if (!this.consentGranted) return;
|
|
2897
|
-
const device = buildDeviceContext(this.config.appVersion);
|
|
2910
|
+
const device = buildDeviceContext(this.config.appVersion, this.config.appBuild);
|
|
2898
2911
|
await post(
|
|
2899
2912
|
{ apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
|
|
2900
2913
|
"/api/v1/events",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendoracloud/sdk-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|