posthog-react-native 2.9.1 → 2.10.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 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.buildOptimisiticAsyncStorage=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _OptionalExpoApplication=require("./optional/OptionalExpoApplication");var _OptionalExpoDevice=require("./optional/OptionalExpoDevice");var _OptionalExpoFileSystem=require("./optional/OptionalExpoFileSystem");var _OptionalExpoLocalization=require("./optional/OptionalExpoLocalization");var _OptionalReactNativeDeviceInfo=require("./optional/OptionalReactNativeDeviceInfo");var getAppProperties=function getAppProperties(){var properties={$device_type:_reactNative.Platform.OS};if(_OptionalExpoApplication.OptionalExpoApplication){properties.$app_build=_OptionalExpoApplication.OptionalExpoApplication.nativeBuildVersion;properties.$app_name=_OptionalExpoApplication.OptionalExpoApplication.applicationName;properties.$app_namespace=_OptionalExpoApplication.OptionalExpoApplication.applicationId;properties.$app_version=_OptionalExpoApplication.OptionalExpoApplication.nativeApplicationVersion;}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildIdSync();properties.$app_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName();properties.$app_namespace=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId();properties.$app_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion();properties.$device_manufacturer=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync();properties.$device_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getDeviceNameSync();properties.$os_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName();properties.$os_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion();}return properties;};exports.getAppProperties=getAppProperties;var buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){if(_OptionalExpoFileSystem.OptionalExpoFileSystem){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var uri,stringContent;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context.prev=1;_context.next=4;return filesystem.readAsStringAsync(uri);case 4:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 8:_context.prev=8;_context.t0=_context["catch"](1);return _context.abrupt("return",null);case 11:case"end":return _context.stop();}}},_callee,null,[[1,8]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var uri;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=3;return filesystem.writeAsStringAsync(uri,value);case 3:case"end":return _context2.stop();}}},_callee2);}))();}};}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-filesystem or react-native-async-storage OR implement a custom storage provider.');};exports.buildOptimisiticAsyncStorage=buildOptimisiticAsyncStorage;
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.buildOptimisiticAsyncStorage=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _OptionalExpoApplication=require("./optional/OptionalExpoApplication");var _OptionalExpoDevice=require("./optional/OptionalExpoDevice");var _OptionalExpoFileSystem=require("./optional/OptionalExpoFileSystem");var _OptionalExpoLocalization=require("./optional/OptionalExpoLocalization");var _OptionalReactNativeDeviceInfo=require("./optional/OptionalReactNativeDeviceInfo");var getAppProperties=function getAppProperties(){var deviceType='Mobile';if(_reactNative.Platform.OS==='macos'||_reactNative.Platform.OS==='windows'){deviceType='Desktop';}else if(_reactNative.Platform.OS==='web'){deviceType='Web';}var properties={$device_type:deviceType};if(_OptionalExpoApplication.OptionalExpoApplication){properties.$app_build=_OptionalExpoApplication.OptionalExpoApplication.nativeBuildVersion;properties.$app_name=_OptionalExpoApplication.OptionalExpoApplication.applicationName;properties.$app_namespace=_OptionalExpoApplication.OptionalExpoApplication.applicationId;properties.$app_version=_OptionalExpoApplication.OptionalExpoApplication.nativeApplicationVersion;}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildIdSync();properties.$app_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName();properties.$app_namespace=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId();properties.$app_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion();properties.$device_manufacturer=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync();properties.$device_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getDeviceNameSync();properties.$os_name=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName();properties.$os_version=_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion();}return properties;};exports.getAppProperties=getAppProperties;var buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){if(_OptionalExpoFileSystem.OptionalExpoFileSystem){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var uri,stringContent;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context.prev=1;_context.next=4;return filesystem.readAsStringAsync(uri);case 4:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 8:_context.prev=8;_context.t0=_context["catch"](1);return _context.abrupt("return",null);case 11:case"end":return _context.stop();}}},_callee,null,[[1,8]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var uri;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=3;return filesystem.writeAsStringAsync(uri,value);case 3:case"end":return _context2.stop();}}},_callee2);}))();}};}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-filesystem or react-native-async-storage OR implement a custom storage provider.');};exports.buildOptimisiticAsyncStorage=buildOptimisiticAsyncStorage;
@@ -1 +1 @@
1
- {"version":3,"file":"native-deps.js","sourceRoot":"","sources":["../../../src/native-deps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAGxF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAA+B,EAAE;IAC/D,MAAM,UAAU,GAA+B;QAC7C,YAAY,EAAE,QAAQ,CAAC,EAAE;KAC1B,CAAA;IAED,IAAI,uBAAuB,EAAE;QAC3B,UAAU,CAAC,UAAU,GAAG,uBAAuB,CAAC,kBAAkB,CAAA;QAClE,UAAU,CAAC,SAAS,GAAG,uBAAuB,CAAC,eAAe,CAAA;QAC9D,UAAU,CAAC,cAAc,GAAG,uBAAuB,CAAC,aAAa,CAAA;QACjE,UAAU,CAAC,YAAY,GAAG,uBAAuB,CAAC,wBAAwB,CAAA;KAC3E;IAED,IAAI,kBAAkB,EAAE;QACtB,UAAU,CAAC,oBAAoB,GAAG,kBAAkB,CAAC,YAAY,CAAA;QACjE,UAAU,CAAC,YAAY,GAAG,kBAAkB,CAAC,SAAS,CAAA;QACtD,UAAU,CAAC,QAAQ,GAAG,kBAAk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M,CAAC,MAAM,4BAA4B,GAAG,GAA8B,EAAE;IAC1E,IAAI,sBAAsB,EAAE;QAC1B,MAAM,UAAU,GAAG,sBAAsB,CAAA;QACzC,OAAO;YACL,KAAK,CAAC,OAAO,CAAC,GAAW;gBACvB,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,iBAAiB,IAAI,EAAE,CAAC,GAAG,GAAG,CAAA;gBACtD,IAAI;oBACF,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;oBAC7D,OAAO,aAAa,CAAA;iBACrB;gBAAC,OAAO,CAAC,EAAE;oBACV,OAAO,IAAI,CAAA;iBACZ;YACH,CAAC;YAED,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,KAAa;gBACtC,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,iBAAiB,IAAI,EAAE,CAAC,GAAG,GAAG,CAAA;gBACtD,MAAM,UAAU,CAAC,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YACjD,CAAC;SACF,CAAA;KACF;IAED,IAAI,oBAAoB,EAAE;QACxB,OAAO,oBAAoB,CAAA;KAC5B;IAED,MAAM,IAAI,KAAK,CACb,qIAAqI,CACtI,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _reactNative=require("react-native");var _src=require("../../posthog-core/src");var _storageMemory=require("../../posthog-core/src/storage-memory");var _legacy=require("./legacy");var _storage=require("./storage");var _version=require("./version");var _nativeDeps=require("./native-deps");var _wixNavigation=require("./frameworks/wix-navigation");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){(0,_defineProperty2["default"])(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var clientMap=new Map();var PostHog=function(_PostHogCore){(0,_inherits2["default"])(PostHog,_PostHogCore);var _super=_createSuper(PostHog);function PostHog(apiKey,options,storage){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a;_this=_super.call(this,apiKey,options);_this._memoryStorage=new _storageMemory.PostHogMemoryStorage();_this._appProperties={};_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();_reactNative.AppState.addEventListener('change',function(){_this.flush();});if(_this._persistence==='file'){if(!storage){console.warn('PostHog was initialised without using PostHog.initAsync - this can lead to race condition issues.');}_this._semiAsyncStorage=storage||new _storage.SemiAsyncStorage((options===null||options===void 0?void 0:options.customAsyncStorage)||(0,_nativeDeps.buildOptimisiticAsyncStorage)());}var setupAsync=function(){var _ref=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var _a,_b,_c,_d,_e,legacyValues;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if((_a=_this._semiAsyncStorage)===null||_a===void 0?void 0:_a.isPreloaded){_context.next=3;break;}_context.next=3;return(_b=_this._semiAsyncStorage)===null||_b===void 0?void 0:_b.preloadAsync();case 3:_this.setupBootstrap(options);if((_c=_this._semiAsyncStorage)===null||_c===void 0?void 0:_c.getItem(_src.PostHogPersistedProperty.AnonymousId)){_context.next=9;break;}_context.next=7;return(0,_legacy.getLegacyValues)();case 7:legacyValues=_context.sent;if(legacyValues===null||legacyValues===void 0?void 0:legacyValues.distinctId){(_d=_this._semiAsyncStorage)===null||_d===void 0?void 0:_d.setItem(_src.PostHogPersistedProperty.DistinctId,legacyValues.distinctId);(_e=_this._semiAsyncStorage)===null||_e===void 0?void 0:_e.setItem(_src.PostHogPersistedProperty.AnonymousId,legacyValues.anonymousId);}case 9:if((options===null||options===void 0?void 0:options.preloadFeatureFlags)!==false){_this.reloadFeatureFlags();}if(!(options===null||options===void 0?void 0:options.captureNativeAppLifecycleEvents)){_context.next=17;break;}if(!(_this._persistence==='memory')){_context.next=15;break;}console.warn('PostHog was initialised with persistence set to "memory", capturing native app events is not supported.');_context.next=17;break;case 15:_context.next=17;return _this.captureNativeAppLifecycleEvents();case 17:_context.next=19;return _this.persistAppVersion();case 19:case"end":return _context.stop();}}},_callee);}));return function setupAsync(){return _ref.apply(this,arguments);};}();_this._setupPromise=setupAsync();return _this;}(0,_createClass2["default"])(PostHog,[{key:"getPersistedProperty",value:function getPersistedProperty(key){var _a;return this._semiAsyncStorage?(_a=this._semiAsyncStorage.getItem(key))!==null&&_a!==void 0?_a:undefined:this._memoryStorage.getProperty(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){return this._semiAsyncStorage?value!==null?this._semiAsyncStorage.setItem(key,value):this._semiAsyncStorage.removeItem(key):this._memoryStorage.setProperty(key,value);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){return;}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},(0,_get2["default"])((0,_getPrototypeOf2["default"])(PostHog.prototype),"getCommonEventProperties",this).call(this)),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"screen",value:function screen(name,properties){this.registerForSession({$screen_name:name});return this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}));}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"captureNativeAppLifecycleEvents",value:function(){var _captureNativeAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var _this2=this;var _a,prevAppBuild,prevAppVersion,appBuild,appVersion,initialUrl;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:prevAppBuild=this.getPersistedProperty(_src.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_src.PostHogPersistedProperty.InstalledAppVersion);appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;if(!appBuild||!appVersion){console.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',{version:appVersion,build:appBuild});}else if(prevAppBuild!==appBuild){this.capture('Application Updated',{previous_version:prevAppVersion,previous_build:prevAppBuild,version:appVersion,build:appBuild});}}_context2.next=8;return _reactNative.Linking.getInitialURL();case 8:_context2.t1=_a=_context2.sent;_context2.t0=_context2.t1!==null;if(!_context2.t0){_context2.next=12;break;}_context2.t0=_a!==void 0;case 12:if(!_context2.t0){_context2.next=16;break;}_context2.t2=_a;_context2.next=17;break;case 16:_context2.t2=undefined;case 17:initialUrl=_context2.t2;this.capture('Application Opened',{version:appVersion,build:appBuild,from_background:false,url:initialUrl});_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this2.capture('Application Opened',{version:appVersion,build:appBuild,from_background:true});}else if(state==='background'){_this2.capture('Application Backgrounded');}});case 20:case"end":return _context2.stop();}}},_callee2,this);}));function captureNativeAppLifecycleEvents(){return _captureNativeAppLifecycleEvents.apply(this,arguments);}return captureNativeAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){var appBuild,appVersion;return _regenerator["default"].wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_src.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_src.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 4:case"end":return _context3.stop();}}},_callee3,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}],[{key:"_resetClientCache",value:function _resetClientCache(){clientMap.clear();}},{key:"initAsync",value:function(){var _initAsync=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(apiKey,options){var _a,posthog,persistence,storage,resolved;return _regenerator["default"].wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:posthog=clientMap.get(apiKey);if(!posthog){persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';if(persistence==='file'){storage=new _storage.SemiAsyncStorage((options===null||options===void 0?void 0:options.customAsyncStorage)||(0,_nativeDeps.buildOptimisiticAsyncStorage)());posthog=storage.preloadAsync().then(function(){return new PostHog(apiKey,options,storage);});}else{posthog=Promise.resolve(new PostHog(apiKey,options));}clientMap.set(apiKey,posthog);}else{console.warn('PostHog.initAsync called twice with the same apiKey. The first instance will be used.');}_context4.next=4;return posthog;case 4:resolved=_context4.sent;_context4.next=7;return resolved._setupPromise;case 7:return _context4.abrupt("return",resolved);case 8:case"end":return _context4.stop();}}},_callee4);}));function initAsync(_x3,_x4){return _initAsync.apply(this,arguments);}return initAsync;}()}]);return PostHog;}(_src.PostHogCore);exports.PostHog=PostHog;
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _reactNative=require("react-native");var _src=require("../../posthog-core/src");var _storageMemory=require("../../posthog-core/src/storage-memory");var _legacy=require("./legacy");var _storage=require("./storage");var _version=require("./version");var _nativeDeps=require("./native-deps");var _wixNavigation=require("./frameworks/wix-navigation");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){(0,_defineProperty2["default"])(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var clientMap=new Map();var PostHog=function(_PostHogCore){(0,_inherits2["default"])(PostHog,_PostHogCore);var _super=_createSuper(PostHog);function PostHog(apiKey,options,storage){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a;_this=_super.call(this,apiKey,options);_this._memoryStorage=new _storageMemory.PostHogMemoryStorage();_this._appProperties={};_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();_reactNative.AppState.addEventListener('change',function(){_this.flush();});if(_this._persistence==='file'){if(!storage){console.warn('PostHog was initialised without using PostHog.initAsync - this can lead to race condition issues.');}_this._semiAsyncStorage=storage||new _storage.SemiAsyncStorage((options===null||options===void 0?void 0:options.customAsyncStorage)||(0,_nativeDeps.buildOptimisiticAsyncStorage)());}var setupAsync=function(){var _ref=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){var _a,_b,_c,_d,_e,legacyValues;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if((_a=_this._semiAsyncStorage)===null||_a===void 0?void 0:_a.isPreloaded){_context.next=3;break;}_context.next=3;return(_b=_this._semiAsyncStorage)===null||_b===void 0?void 0:_b.preloadAsync();case 3:_this.setupBootstrap(options);if((_c=_this._semiAsyncStorage)===null||_c===void 0?void 0:_c.getItem(_src.PostHogPersistedProperty.AnonymousId)){_context.next=9;break;}_context.next=7;return(0,_legacy.getLegacyValues)();case 7:legacyValues=_context.sent;if(legacyValues===null||legacyValues===void 0?void 0:legacyValues.distinctId){(_d=_this._semiAsyncStorage)===null||_d===void 0?void 0:_d.setItem(_src.PostHogPersistedProperty.DistinctId,legacyValues.distinctId);(_e=_this._semiAsyncStorage)===null||_e===void 0?void 0:_e.setItem(_src.PostHogPersistedProperty.AnonymousId,legacyValues.anonymousId);}case 9:if((options===null||options===void 0?void 0:options.preloadFeatureFlags)!==false){_this.reloadFeatureFlags();}if(!(options===null||options===void 0?void 0:options.captureNativeAppLifecycleEvents)){_context.next=17;break;}if(!(_this._persistence==='memory')){_context.next=15;break;}console.warn('PostHog was initialised with persistence set to "memory", capturing native app events is not supported.');_context.next=17;break;case 15:_context.next=17;return _this.captureNativeAppLifecycleEvents();case 17:_context.next=19;return _this.persistAppVersion();case 19:case"end":return _context.stop();}}},_callee);}));return function setupAsync(){return _ref.apply(this,arguments);};}();_this._setupPromise=setupAsync();return _this;}(0,_createClass2["default"])(PostHog,[{key:"getPersistedProperty",value:function getPersistedProperty(key){var _a;return this._semiAsyncStorage?(_a=this._semiAsyncStorage.getItem(key))!==null&&_a!==void 0?_a:undefined:this._memoryStorage.getProperty(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){return this._semiAsyncStorage?value!==null?this._semiAsyncStorage.setItem(key,value):this._semiAsyncStorage.removeItem(key):this._memoryStorage.setProperty(key,value);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){return;}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},(0,_get2["default"])((0,_getPrototypeOf2["default"])(PostHog.prototype),"getCommonEventProperties",this).call(this)),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"screen",value:function screen(name,properties){this.registerForSession({$screen_name:name});return this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}));}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"captureNativeAppLifecycleEvents",value:function(){var _captureNativeAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){var _this2=this;var _a,prevAppBuild,prevAppVersion,appBuild,appVersion,initialUrl;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:prevAppBuild=this.getPersistedProperty(_src.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_src.PostHogPersistedProperty.InstalledAppVersion);appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;if(!appBuild||!appVersion){console.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',{version:appVersion,build:appBuild});}else if(prevAppBuild!==appBuild){this.capture('Application Updated',{previous_version:prevAppVersion,previous_build:prevAppBuild,version:appVersion,build:appBuild});}}_context2.next=8;return _reactNative.Linking.getInitialURL();case 8:_context2.t1=_a=_context2.sent;_context2.t0=_context2.t1!==null;if(!_context2.t0){_context2.next=12;break;}_context2.t0=_a!==void 0;case 12:if(!_context2.t0){_context2.next=16;break;}_context2.t2=_a;_context2.next=17;break;case 16:_context2.t2=undefined;case 17:initialUrl=_context2.t2;this.capture('Application Opened',{version:appVersion,build:appBuild,from_background:false,url:initialUrl});_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this2.capture('Application Opened',{version:appVersion,build:appBuild,from_background:true});}else if(state==='background'){_this2.capture('Application Backgrounded');}});case 20:case"end":return _context2.stop();}}},_callee2,this);}));function captureNativeAppLifecycleEvents(){return _captureNativeAppLifecycleEvents.apply(this,arguments);}return captureNativeAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){var appBuild,appVersion;return _regenerator["default"].wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_src.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_src.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 4:case"end":return _context3.stop();}}},_callee3,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}],[{key:"_resetClientCache",value:function _resetClientCache(){clientMap.clear();}},{key:"initAsync",value:function(){var _initAsync=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(apiKey,options){var _a,posthog,persistence,storage,resolved;return _regenerator["default"].wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:posthog=clientMap.get(apiKey);if(!posthog){persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';if(persistence==='file'){try{storage=new _storage.SemiAsyncStorage((options===null||options===void 0?void 0:options.customAsyncStorage)||(0,_nativeDeps.buildOptimisiticAsyncStorage)());posthog=storage.preloadAsync().then(function(){return new PostHog(apiKey,options,storage);});}catch(error){console.error('PostHog was unable to initialise with persistence set to "file". Falling back to "memory" persistence.',error);posthog=Promise.resolve(new PostHog(apiKey,_objectSpread(_objectSpread({},options),{},{persistence:'memory',customAsyncStorage:undefined})));}}else{posthog=Promise.resolve(new PostHog(apiKey,options));}clientMap.set(apiKey,posthog);}else{console.warn('PostHog.initAsync called twice with the same apiKey. The first instance will be used.');}_context4.next=4;return posthog;case 4:resolved=_context4.sent;_context4.next=7;return resolved._setupPromise;case 7:return _context4.abrupt("return",resolved);case 8:case"end":return _context4.stop();}}},_callee4);}));function initAsync(_x3,_x4){return _initAsync.apply(this,arguments);}return initAsync;}()}]);return PostHog;}(_src.PostHogCore);exports.PostHog=PostHog;
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-rn.js","sourceRoot":"","sources":["../../../src/posthog-rn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EACL,WAAW,EAIX,wBAAwB,GACzB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAC5E,OAAO,EAAE,eAAe,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CAAC,oBAAoB,EAAE;YACjC,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,QAAQ;YACf,eAAe,EAAE,KAAK;YACtB,GAAG,EAAE,UAAU;SAChB,CAAC,CAAA;QAEF,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAC5C,IAAI,KAAK,KAAK,QAAQ,EAAE;gBACtB,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;oBACjC,OAAO,EAAE,UAAU;oBACnB,KAAK,EAAE,QAAQ;oBACf,eAAe,EAAE,IAAI;iBACtB,CAAC,CAAA;aACH;iBAAM,IAAI,KAAK,KAAK,YAAY,EAAE;gBACjC,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAA;aACzC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAA;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAA;QACnD,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAA;QAC/E,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;IACrF,CAAC;CACF"}
@@ -26,7 +26,7 @@ export interface PostHogCustomAppProperties {
26
26
  $device_manufacturer?: string | null;
27
27
  /** Readable model name like "iPhone 12" */
28
28
  $device_name?: string | null;
29
- /** Same as Platform.OS ("android" | "ios") */
29
+ /** Device type ("Mobile" | "Desktop" | "Web") */
30
30
  $device_type?: string | null;
31
31
  /** Operating system name like iOS or Android */
32
32
  $os_name?: string | null;
@@ -1 +1 @@
1
- export declare const version = "2.9.1";
1
+ export declare const version = "2.10.0";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version="2.9.1";exports.version=version;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version="2.10.0";exports.version=version;
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "posthog-react-native",
3
- "version": "2.9.1",
3
+ "version": "2.10.0",
4
4
  "main": "lib/posthog-react-native/index.js",
5
5
  "files": [
6
6
  "lib/"
7
7
  ],
8
+ "repository": {
9
+ "type" : "git",
10
+ "url" : "https://github.com/PostHog/posthog-js-lite.git",
11
+ "directory": "posthog-react-native"
12
+ },
8
13
  "scripts": {
9
14
  "pretest": "npm run prebuild",
10
15
  "test": "jest -c jest.config.js",