posthog-react-native 4.4.0 → 4.4.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.
- package/dist/native-deps.js +1 -1
- package/dist/native-deps.js.map +1 -1
- package/dist/optional/OptionalExpoFileSystem.js.map +1 -1
- package/dist/optional/OptionalExpoFileSystemLegacy.d.ts +2 -0
- package/dist/optional/OptionalExpoFileSystemLegacy.js +1 -0
- package/dist/optional/OptionalExpoFileSystemLegacy.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/native-deps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.currentDeviceType=exports.buildOptimisiticAsyncStorage=void 0;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 _OptionalReactNativeLocalize=require("./optional/OptionalReactNativeLocalize");function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}var getDeviceType=function getDeviceType(){var deviceType='Mobile';if(_reactNative.Platform.OS==='macos'||_reactNative.Platform.OS==='windows'){deviceType='Desktop';}else if(_reactNative.Platform.OS==='web'){deviceType='Web';}return deviceType;};var currentDeviceType=exports.currentDeviceType=getDeviceType();var getAppProperties=exports.getAppProperties=function getAppProperties(){var properties={$device_type:currentDeviceType};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;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildNumber());properties.$app_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName());properties.$app_namespace=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId());properties.$app_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion());}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;if(_reactNative.Platform.OS==='android'){properties.$os_name='Android';}else{properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;}properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$device_manufacturer=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync());properties.$device_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getModel());properties.$os_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName());properties.$os_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion());}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}else if(_OptionalReactNativeLocalize.OptionalReactNativeLocalize){var localesFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getLocales;if(localesFn){var locales=localesFn();if(locales&&locales.length>0){var languageTag=locales[0].languageTag;if(languageTag){properties.$locale=languageTag;}}}var timezoneFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getTimeZone;if(timezoneFn){var timezone=timezoneFn();if(timezone){properties.$timezone=timezone;}}}return properties;};var returnPropertyIfNotUnknown=function returnPropertyIfNotUnknown(value){if(value!=='unknown'){return value;}return null;};var buildOptimisiticAsyncStorage=exports.buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){if(_OptionalExpoFileSystem.OptionalExpoFileSystem&&_reactNative.Platform.OS!=='web'&&_reactNative.Platform.OS!=='macos'){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(){var uri,stringContent;return _regeneratorRuntime().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"])(_regeneratorRuntime().mark(function _callee2(){var uri;return _regeneratorRuntime().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.');};
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.currentDeviceType=exports.buildOptimisiticAsyncStorage=void 0;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 _OptionalReactNativeLocalize=require("./optional/OptionalReactNativeLocalize");var _OptionalExpoFileSystemLegacy=require("./optional/OptionalExpoFileSystemLegacy");function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}var getDeviceType=function getDeviceType(){var deviceType='Mobile';if(_reactNative.Platform.OS==='macos'||_reactNative.Platform.OS==='windows'){deviceType='Desktop';}else if(_reactNative.Platform.OS==='web'){deviceType='Web';}return deviceType;};var currentDeviceType=exports.currentDeviceType=getDeviceType();var getAppProperties=exports.getAppProperties=function getAppProperties(){var properties={$device_type:currentDeviceType};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;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildNumber());properties.$app_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName());properties.$app_namespace=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId());properties.$app_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion());}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;if(_reactNative.Platform.OS==='android'){properties.$os_name='Android';}else{properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;}properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$device_manufacturer=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync());properties.$device_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getModel());properties.$os_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName());properties.$os_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion());}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}else if(_OptionalReactNativeLocalize.OptionalReactNativeLocalize){var localesFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getLocales;if(localesFn){var locales=localesFn();if(locales&&locales.length>0){var languageTag=locales[0].languageTag;if(languageTag){properties.$locale=languageTag;}}}var timezoneFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getTimeZone;if(timezoneFn){var timezone=timezoneFn();if(timezone){properties.$timezone=timezone;}}}return properties;};var returnPropertyIfNotUnknown=function returnPropertyIfNotUnknown(value){if(value!=='unknown'){return value;}return null;};var buildLegacyStorage=function buildLegacyStorage(filesystem){return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(){var uri,stringContent;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;uri=(filesystem.documentDirectory||'')+key;_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"](0);return _context.abrupt("return",null);case 11:case"end":return _context.stop();}},_callee,null,[[0,8]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee2(){var uri;return _regeneratorRuntime().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);}))();}};};var buildOptimisiticAsyncStorage=exports.buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){var supportedPlatform=_reactNative.Platform.OS!=='web'&&_reactNative.Platform.OS!=='macos';if(_OptionalExpoFileSystemLegacy.OptionalExpoFileSystemLegacy&&supportedPlatform){var filesystem=_OptionalExpoFileSystemLegacy.OptionalExpoFileSystemLegacy;return buildLegacyStorage(filesystem);}if(_OptionalExpoFileSystem.OptionalExpoFileSystem&&supportedPlatform){var _filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;try{var expoFileSystemLegacy=_filesystem;if(expoFileSystemLegacy.readAsStringAsync){return buildLegacyStorage(_filesystem);}}catch(e){}return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee3(){var _a,uri,file,stringContent;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;uri=(((_a=_filesystem.Paths)===null||_a===void 0?void 0:_a.document.info().uri)||'')+key;file=new _filesystem.File(uri);_context3.next=5;return file.text();case 5:stringContent=_context3.sent;return _context3.abrupt("return",stringContent);case 9:_context3.prev=9;_context3.t0=_context3["catch"](0);return _context3.abrupt("return",null);case 12:case"end":return _context3.stop();}},_callee3,null,[[0,9]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee4(){var _a,uri,file;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:uri=(((_a=_filesystem.Paths)===null||_a===void 0?void 0:_a.document.info().uri)||'')+key;file=new _filesystem.File(uri);file.write(value);case 3:case"end":return _context4.stop();}},_callee4);}))();}};}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.');};
|
package/dist/native-deps.js.map
CHANGED
|
@@ -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,uBAA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AqI,CACtI,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalExpoFileSystem.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoFileSystem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OptionalExpoFileSystem.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoFileSystem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,sBAAsB,GAAsC,SAAS,CAAA;AAEhF,IAAI,CAAC;IACH,yFAAyF;IACzF,4DAA4D;IAC5D,sFAAsF;IACtF,4EAA4E;IAC5E,sBAAsB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACvC,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC;KACrC,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OptionalExpoFileSystemLegacy=void 0;var _reactNative=require("react-native");var OptionalExpoFileSystemLegacy=exports.OptionalExpoFileSystemLegacy=undefined;try{exports.OptionalExpoFileSystemLegacy=OptionalExpoFileSystemLegacy=_reactNative.Platform.select({macos:undefined,web:undefined,"default":require('expo-file-system/legacy')});}catch(e){}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionalExpoFileSystemLegacy.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoFileSystemLegacy.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAIlE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,4BAA4B,GAAkC,SAAS,CAAA;AAElF,IAAI,CAAC;IACH,yFAAyF;IACzF,4DAA4D;IAC5D,sFAAsF;IACtF,4EAA4E;IAC5E,4BAA4B,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC7C,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC;KAC5C,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.4.
|
|
1
|
+
export declare const version = "4.4.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.4.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.4.1";
|