posthog-react-native 4.49.0 → 4.49.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,3 +1,4 @@
|
|
|
1
|
+
export declare function buildAndroidSkipOnConflictGradleLine(skipOnConflict: boolean): string | null;
|
|
1
2
|
export declare function addPostHogAndroidGradlePluginClasspath(projectBuildGradle: string): {
|
|
2
3
|
contents: string;
|
|
3
4
|
classpathPresent: boolean;
|
|
@@ -6,8 +7,8 @@ export declare function applyPostHogAndroidGradlePlugin(appBuildGradle: string):
|
|
|
6
7
|
type BuildPhase = {
|
|
7
8
|
shellScript: string;
|
|
8
9
|
};
|
|
9
|
-
export declare function modifyExistingXcodeBuildScript(script: BuildPhase): void;
|
|
10
|
-
export declare function addPostHogWithBundledScriptsToBundleShellScript(script: string): string;
|
|
10
|
+
export declare function modifyExistingXcodeBuildScript(script: BuildPhase, skipOnConflict?: boolean): void;
|
|
11
|
+
export declare function addPostHogWithBundledScriptsToBundleShellScript(script: string, skipOnConflict?: boolean): string;
|
|
11
12
|
export declare function buildDsymUploadShellScript(includeSource?: boolean): string;
|
|
12
13
|
export declare function addDsymUploadBuildPhase(xcodeProject: any, includeSource?: boolean): void;
|
|
13
14
|
export declare function disableUserScriptSandboxing(xcodeProject: any): void;
|
|
@@ -49,6 +50,12 @@ type PostHogPluginProps = {
|
|
|
49
50
|
uploadNativeSymbols?: boolean | {
|
|
50
51
|
includeSource?: boolean;
|
|
51
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* Whether to append `--skip-on-conflict` to `posthog-cli hermes upload` on iOS and Android.
|
|
55
|
+
*
|
|
56
|
+
* Default: false.
|
|
57
|
+
*/
|
|
58
|
+
skipOnConflict?: boolean;
|
|
52
59
|
};
|
|
53
60
|
export declare function resolveNativeSymbolUpload(prop: PostHogPluginProps['uploadNativeSymbols']): {
|
|
54
61
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.addDsymUploadBuildPhase=addDsymUploadBuildPhase;exports.addPostHogAndroidGradlePluginClasspath=addPostHogAndroidGradlePluginClasspath;exports.addPostHogWithBundledScriptsToBundleShellScript=addPostHogWithBundledScriptsToBundleShellScript;exports.applyPostHogAndroidGradlePlugin=applyPostHogAndroidGradlePlugin;exports.buildDsymUploadShellScript=buildDsymUploadShellScript;exports.disableUserScriptSandboxing=disableUserScriptSandboxing;exports.modifyExistingXcodeBuildScript=modifyExistingXcodeBuildScript;exports.resolveNativeSymbolUpload=resolveNativeSymbolUpload;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _require=require('@expo/config-plugins'),withAppBuildGradle=_require.withAppBuildGradle,withProjectBuildGradle=_require.withProjectBuildGradle,withXcodeProject=_require.withXcodeProject;var POSTHOG_ANDROID_GRADLE_PLUGIN_VERSION='1.2.0';var resolvePostHogReactNativePackageJsonPath="[\"node\", \"--print\", \"require('path').join(require('path').dirname(require.resolve('posthog-react-native')), '..', 'tooling', 'posthog.gradle')\"].execute().text.trim()";var withAndroidPlugin=function withAndroidPlugin(config){return withAppBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure PostHog in the app gradle because the build.gradle is not groovy');}var buildGradle=config.modResults.contents;var applyFrom="apply from: new File(".concat(resolvePostHogReactNativePackageJsonPath,")");if(buildGradle.includes(applyFrom)){return config;}var pattern=/^android\s*\{/m;if(buildGradle.match(pattern)){config.modResults.contents=buildGradle.replace(pattern,"".concat(applyFrom,"\n\nandroid {"));}else{console.warn('PostHog: Could not find "android {" block in build.gradle');}return config;});};function matchingBraceIndex(s,openBraceIndex){var depth=0;for(var i=openBraceIndex;i<s.length;i++){if(s[i]==='{'){depth++;}else if(s[i]==='}'){depth--;if(depth===0){return i;}}}return-1;}function addPostHogAndroidGradlePluginClasspath(projectBuildGradle){if(projectBuildGradle.includes('posthog-android-gradle-plugin')){return{contents:projectBuildGradle,classpathPresent:true};}var classpathLine=" classpath(\"com.posthog:posthog-android-gradle-plugin:".concat(POSTHOG_ANDROID_GRADLE_PLUGIN_VERSION,"\")");var buildscriptMatch=/buildscript\s*\{/.exec(projectBuildGradle);var buildscriptOpenBrace=buildscriptMatch?buildscriptMatch.index+buildscriptMatch[0].length-1:-1;var buildscriptEnd=buildscriptOpenBrace===-1?-1:matchingBraceIndex(projectBuildGradle,buildscriptOpenBrace);var buildscriptBody=buildscriptEnd===-1?'':projectBuildGradle.slice(buildscriptOpenBrace,buildscriptEnd);var dependenciesMatch=buildscriptBody?/dependencies\s*\{/.exec(buildscriptBody):null;if(!dependenciesMatch){console.warn('PostHog: Could not find a buildscript dependencies block in the project build.gradle; '+'skipping the com.posthog.android classpath. Native symbols will not be uploaded.');return{contents:projectBuildGradle,classpathPresent:false};}var insertAt=buildscriptOpenBrace+dependenciesMatch.index+dependenciesMatch[0].length;return{contents:"".concat(projectBuildGradle.slice(0,insertAt),"\n").concat(classpathLine).concat(projectBuildGradle.slice(insertAt)),classpathPresent:true};}function applyPostHogAndroidGradlePlugin(appBuildGradle){if(/apply plugin: ["']com\.posthog\.android["']/.test(appBuildGradle)){return appBuildGradle;}var applyLine='apply plugin: "com.posthog.android"';var appPluginPattern=/^([ \t]*apply plugin: ["']com\.android\.application["'].*)$/m;if(appPluginPattern.test(appBuildGradle)){return appBuildGradle.replace(appPluginPattern,"$1\n".concat(applyLine));}var androidBlockPattern=/^android\s*\{/m;if(androidBlockPattern.test(appBuildGradle)){return appBuildGradle.replace(androidBlockPattern,"".concat(applyLine,"\n\nandroid {"));}console.warn('PostHog: Could not find where to apply com.posthog.android in the app build.gradle');return appBuildGradle;}var withAndroidNativeSymbolsPlugin=function withAndroidNativeSymbolsPlugin(config){var classpathPresent=false;config=withProjectBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure the PostHog Android Gradle plugin because the project build.gradle is not groovy');return config;}var result=addPostHogAndroidGradlePluginClasspath(config.modResults.contents);config.modResults.contents=result.contents;classpathPresent=result.classpathPresent;return config;});return withAppBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure the PostHog Android Gradle plugin because the app build.gradle is not groovy');return config;}if(!classpathPresent){return config;}config.modResults.contents=applyPostHogAndroidGradlePlugin(config.modResults.contents);return config;});};function modifyExistingXcodeBuildScript(script){if(!script.shellScript.match(/(packager|scripts)\/react-native-xcode\.sh\b/)){return;}if(script.shellScript.includes('posthog-xcode.sh')){return;}if(script.shellScript.includes('posthog-react-native')){return;}var code=JSON.parse(script.shellScript);script.shellScript=JSON.stringify(addPostHogWithBundledScriptsToBundleShellScript(code));}var POSTHOG_REACT_NATIVE_XCODE_PATH="`\"$NODE_BINARY\" --print \"require('path').join(require('path').dirname(require.resolve('posthog-react-native')), '..', 'tooling', 'posthog-xcode.sh')\"`";var REACT_NATIVE_XCODE_LINE=/^([ \t]*)(?![A-Za-z_][A-Za-z0-9_]*=)(?:\/bin\/sh\s+)?([^\n]*(?:packager|scripts)\/react-native-xcode\.sh\b[^\n]*)$/m;function addPostHogWithBundledScriptsToBundleShellScript(script){return script.replace(REACT_NATIVE_XCODE_LINE,function(_match,indent,rnCommand){return"".concat(indent,"/bin/sh ").concat(POSTHOG_REACT_NATIVE_XCODE_PATH," ").concat(rnCommand);});}var POSTHOG_DSYM_BUILD_PHASE_NAME='Upload PostHog Debug Symbols';function buildDsymUploadShellScript(){var includeSource=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var lines=['# Upload iOS dSYMs to PostHog so native crashes can be symbolicated.','# upload-symbols.sh ships inside the posthog-ios dependency.'];if(includeSource){lines.push('# Also upload native source files for source-code context around crashes.','export POSTHOG_INCLUDE_SOURCE=1');}lines.push('PODS_SCRIPT="${PODS_ROOT}/PostHog/build-tools/upload-symbols.sh"','SPM_SCRIPT="${BUILD_DIR%/Build/*}/SourcePackages/checkouts/posthog-ios/build-tools/upload-symbols.sh"','if [ -f "$PODS_SCRIPT" ]; then',' /bin/sh "$PODS_SCRIPT"','elif [ -f "$SPM_SCRIPT" ]; then',' /bin/sh "$SPM_SCRIPT"','else',' echo "warning: PostHog upload-symbols.sh not found in Pods or SwiftPM checkouts; skipping dSYM upload."','fi');return lines.join('\n');}function addDsymUploadBuildPhase(xcodeProject){var includeSource=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var existing=xcodeProject.pbxItemByComment(POSTHOG_DSYM_BUILD_PHASE_NAME,'PBXShellScriptBuildPhase');if(existing){return;}xcodeProject.addBuildPhase([],'PBXShellScriptBuildPhase',POSTHOG_DSYM_BUILD_PHASE_NAME,null,{shellPath:'/bin/sh',shellScript:buildDsymUploadShellScript(includeSource)});}function disableUserScriptSandboxing(xcodeProject){var configurations=xcodeProject.pbxXCBuildConfigurationSection();for(var key in configurations){var configuration=configurations[key];if(configuration&&configuration.buildSettings){configuration.buildSettings.ENABLE_USER_SCRIPT_SANDBOXING='"NO"';}}}function resolveNativeSymbolUpload(prop){if(prop===true){return{enabled:true,includeSource:false};}if(prop&&(0,_typeof2["default"])(prop)==='object'){return{enabled:true,includeSource:prop.includeSource===true};}return{enabled:false,includeSource:false};}var withIosPlugin=function withIosPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return withXcodeProject(config,function(config){var xcodeProject=config.modResults;var bundleReactNativePhase=xcodeProject.pbxItemByComment('Bundle React Native code and images','PBXShellScriptBuildPhase');modifyExistingXcodeBuildScript(bundleReactNativePhase);var nativeSymbols=resolveNativeSymbolUpload(props.uploadNativeSymbols);if(nativeSymbols.enabled){addDsymUploadBuildPhase(xcodeProject,nativeSymbols.includeSource);}if(props.disableSandboxing!==false){disableUserScriptSandboxing(xcodeProject);console.warn('[posthog-react-native] Setting ENABLE_USER_SCRIPT_SANDBOXING=NO on all Xcode '+'build configurations so sourcemap uploads can resolve git metadata. '+'If your org requires sandboxing to stay enabled, set `{ disableSandboxing: false }` '+'on the plugin in app.json — note that stock Expo projects may fail to build under '+'sandboxing until every script build phase declares its input/output files.');}return config;});};var withPostHogPlugin=function withPostHogPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};config=withAndroidPlugin(config);if(resolveNativeSymbolUpload(props.uploadNativeSymbols).enabled){config=withAndroidNativeSymbolsPlugin(config);}return withIosPlugin(config,props);};var postHogPlugin=function postHogPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return withPostHogPlugin(config,props);};module.exports=postHogPlugin;module.exports.modifyExistingXcodeBuildScript=modifyExistingXcodeBuildScript;module.exports.addPostHogWithBundledScriptsToBundleShellScript=addPostHogWithBundledScriptsToBundleShellScript;module.exports.disableUserScriptSandboxing=disableUserScriptSandboxing;module.exports.buildDsymUploadShellScript=buildDsymUploadShellScript;module.exports.addDsymUploadBuildPhase=addDsymUploadBuildPhase;module.exports.resolveNativeSymbolUpload=resolveNativeSymbolUpload;module.exports.addPostHogAndroidGradlePluginClasspath=addPostHogAndroidGradlePluginClasspath;module.exports.applyPostHogAndroidGradlePlugin=applyPostHogAndroidGradlePlugin;
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.addDsymUploadBuildPhase=addDsymUploadBuildPhase;exports.addPostHogAndroidGradlePluginClasspath=addPostHogAndroidGradlePluginClasspath;exports.addPostHogWithBundledScriptsToBundleShellScript=addPostHogWithBundledScriptsToBundleShellScript;exports.applyPostHogAndroidGradlePlugin=applyPostHogAndroidGradlePlugin;exports.buildAndroidSkipOnConflictGradleLine=buildAndroidSkipOnConflictGradleLine;exports.buildDsymUploadShellScript=buildDsymUploadShellScript;exports.disableUserScriptSandboxing=disableUserScriptSandboxing;exports.modifyExistingXcodeBuildScript=modifyExistingXcodeBuildScript;exports.resolveNativeSymbolUpload=resolveNativeSymbolUpload;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _require=require('@expo/config-plugins'),withAppBuildGradle=_require.withAppBuildGradle,withProjectBuildGradle=_require.withProjectBuildGradle,withXcodeProject=_require.withXcodeProject;var POSTHOG_ANDROID_GRADLE_PLUGIN_VERSION='1.2.0';var resolvePostHogReactNativePackageJsonPath="[\"node\", \"--print\", \"require('path').join(require('path').dirname(require.resolve('posthog-react-native')), '..', 'tooling', 'posthog.gradle')\"].execute().text.trim()";var POSTHOG_ANDROID_SKIP_ON_CONFLICT_PROPERTY='posthogReactNativeSkipOnConflict';function buildAndroidSkipOnConflictGradleLine(skipOnConflict){if(!skipOnConflict){return null;}return"project.ext.".concat(POSTHOG_ANDROID_SKIP_ON_CONFLICT_PROPERTY," = true");}var withAndroidPlugin=function withAndroidPlugin(config){var skipOnConflict=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return withAppBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure PostHog in the app gradle because the build.gradle is not groovy');}var buildGradle=config.modResults.contents;var applyFrom="apply from: new File(".concat(resolvePostHogReactNativePackageJsonPath,")");var skipOnConflictLine=buildAndroidSkipOnConflictGradleLine(skipOnConflict);var applyBlock=skipOnConflictLine?"".concat(skipOnConflictLine,"\n").concat(applyFrom):applyFrom;var skipOnConflictPattern=new RegExp("^project\\.ext\\.".concat(POSTHOG_ANDROID_SKIP_ON_CONFLICT_PROPERTY,"\\s*=\\s*(true|false)\\n?"),'m');if(buildGradle.includes(applyFrom)){var contents=buildGradle.replace(skipOnConflictPattern,'');if(skipOnConflictLine){contents=contents.replace(applyFrom,"".concat(skipOnConflictLine,"\n").concat(applyFrom));}config.modResults.contents=contents;return config;}var pattern=/^android\s*\{/m;if(buildGradle.match(pattern)){config.modResults.contents=buildGradle.replace(pattern,"".concat(applyBlock,"\n\nandroid {"));}else{console.warn('PostHog: Could not find "android {" block in build.gradle');}return config;});};function matchingBraceIndex(s,openBraceIndex){var depth=0;for(var i=openBraceIndex;i<s.length;i++){if(s[i]==='{'){depth++;}else if(s[i]==='}'){depth--;if(depth===0){return i;}}}return-1;}function addPostHogAndroidGradlePluginClasspath(projectBuildGradle){if(projectBuildGradle.includes('posthog-android-gradle-plugin')){return{contents:projectBuildGradle,classpathPresent:true};}var classpathLine=" classpath(\"com.posthog:posthog-android-gradle-plugin:".concat(POSTHOG_ANDROID_GRADLE_PLUGIN_VERSION,"\")");var buildscriptMatch=/buildscript\s*\{/.exec(projectBuildGradle);var buildscriptOpenBrace=buildscriptMatch?buildscriptMatch.index+buildscriptMatch[0].length-1:-1;var buildscriptEnd=buildscriptOpenBrace===-1?-1:matchingBraceIndex(projectBuildGradle,buildscriptOpenBrace);var buildscriptBody=buildscriptEnd===-1?'':projectBuildGradle.slice(buildscriptOpenBrace,buildscriptEnd);var dependenciesMatch=buildscriptBody?/dependencies\s*\{/.exec(buildscriptBody):null;if(!dependenciesMatch){console.warn('PostHog: Could not find a buildscript dependencies block in the project build.gradle; '+'skipping the com.posthog.android classpath. Native symbols will not be uploaded.');return{contents:projectBuildGradle,classpathPresent:false};}var insertAt=buildscriptOpenBrace+dependenciesMatch.index+dependenciesMatch[0].length;return{contents:"".concat(projectBuildGradle.slice(0,insertAt),"\n").concat(classpathLine).concat(projectBuildGradle.slice(insertAt)),classpathPresent:true};}function applyPostHogAndroidGradlePlugin(appBuildGradle){if(/apply plugin: ["']com\.posthog\.android["']/.test(appBuildGradle)){return appBuildGradle;}var applyLine='apply plugin: "com.posthog.android"';var appPluginPattern=/^([ \t]*apply plugin: ["']com\.android\.application["'].*)$/m;if(appPluginPattern.test(appBuildGradle)){return appBuildGradle.replace(appPluginPattern,"$1\n".concat(applyLine));}var androidBlockPattern=/^android\s*\{/m;if(androidBlockPattern.test(appBuildGradle)){return appBuildGradle.replace(androidBlockPattern,"".concat(applyLine,"\n\nandroid {"));}console.warn('PostHog: Could not find where to apply com.posthog.android in the app build.gradle');return appBuildGradle;}var withAndroidNativeSymbolsPlugin=function withAndroidNativeSymbolsPlugin(config){var classpathPresent=false;config=withProjectBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure the PostHog Android Gradle plugin because the project build.gradle is not groovy');return config;}var result=addPostHogAndroidGradlePluginClasspath(config.modResults.contents);config.modResults.contents=result.contents;classpathPresent=result.classpathPresent;return config;});return withAppBuildGradle(config,function(config){if(config.modResults.language!=='groovy'){console.warn('Cannot configure the PostHog Android Gradle plugin because the app build.gradle is not groovy');return config;}if(!classpathPresent){return config;}config.modResults.contents=applyPostHogAndroidGradlePlugin(config.modResults.contents);return config;});};function modifyExistingXcodeBuildScript(script){var skipOnConflict=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!script.shellScript.match(/(packager|scripts)\/react-native-xcode\.sh\b/)){return;}if(script.shellScript.includes('posthog-xcode.sh')){var _code=JSON.parse(script.shellScript);script.shellScript=JSON.stringify(updatePostHogSkipOnConflictArg(_code,skipOnConflict));return;}if(script.shellScript.includes('posthog-react-native')){return;}var code=JSON.parse(script.shellScript);script.shellScript=JSON.stringify(addPostHogWithBundledScriptsToBundleShellScript(code,skipOnConflict));}var POSTHOG_REACT_NATIVE_XCODE_PATH="`\"$NODE_BINARY\" --print \"require('path').join(require('path').dirname(require.resolve('posthog-react-native')), '..', 'tooling', 'posthog-xcode.sh')\"`";var REACT_NATIVE_XCODE_LINE=/^([ \t]*)(?![A-Za-z_][A-Za-z0-9_]*=)(?:\/bin\/sh\s+)?([^\n]*(?:packager|scripts)\/react-native-xcode\.sh\b[^\n]*)$/m;function updatePostHogSkipOnConflictArg(script,skipOnConflict){var skipArg='--posthog-skip-on-conflict --';var withoutSkipArg=script.replace(new RegExp("\\s*".concat(skipArg,"\\s*"),'g'),' ');if(!skipOnConflict){return withoutSkipArg;}return withoutSkipArg.replace("".concat(POSTHOG_REACT_NATIVE_XCODE_PATH," "),"".concat(POSTHOG_REACT_NATIVE_XCODE_PATH," ").concat(skipArg," "));}function addPostHogWithBundledScriptsToBundleShellScript(script){var skipOnConflict=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var postHogArgs=skipOnConflict?'--posthog-skip-on-conflict -- ':'';return script.replace(REACT_NATIVE_XCODE_LINE,function(_match,indent,rnCommand){return"".concat(indent,"/bin/sh ").concat(POSTHOG_REACT_NATIVE_XCODE_PATH," ").concat(postHogArgs).concat(rnCommand);});}var POSTHOG_DSYM_BUILD_PHASE_NAME='Upload PostHog Debug Symbols';function buildDsymUploadShellScript(){var includeSource=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var lines=['# Upload iOS dSYMs to PostHog so native crashes can be symbolicated.','# upload-symbols.sh ships inside the posthog-ios dependency.'];if(includeSource){lines.push('# Also upload native source files for source-code context around crashes.','export POSTHOG_INCLUDE_SOURCE=1');}lines.push('PODS_SCRIPT="${PODS_ROOT}/PostHog/build-tools/upload-symbols.sh"','SPM_SCRIPT="${BUILD_DIR%/Build/*}/SourcePackages/checkouts/posthog-ios/build-tools/upload-symbols.sh"','if [ -f "$PODS_SCRIPT" ]; then',' /bin/sh "$PODS_SCRIPT"','elif [ -f "$SPM_SCRIPT" ]; then',' /bin/sh "$SPM_SCRIPT"','else',' echo "warning: PostHog upload-symbols.sh not found in Pods or SwiftPM checkouts; skipping dSYM upload."','fi');return lines.join('\n');}function addDsymUploadBuildPhase(xcodeProject){var includeSource=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var existing=xcodeProject.pbxItemByComment(POSTHOG_DSYM_BUILD_PHASE_NAME,'PBXShellScriptBuildPhase');if(existing){return;}xcodeProject.addBuildPhase([],'PBXShellScriptBuildPhase',POSTHOG_DSYM_BUILD_PHASE_NAME,null,{shellPath:'/bin/sh',shellScript:buildDsymUploadShellScript(includeSource)});}function disableUserScriptSandboxing(xcodeProject){var configurations=xcodeProject.pbxXCBuildConfigurationSection();for(var key in configurations){var configuration=configurations[key];if(configuration&&configuration.buildSettings){configuration.buildSettings.ENABLE_USER_SCRIPT_SANDBOXING='"NO"';}}}function resolveNativeSymbolUpload(prop){if(prop===true){return{enabled:true,includeSource:false};}if(prop&&(0,_typeof2["default"])(prop)==='object'){return{enabled:true,includeSource:prop.includeSource===true};}return{enabled:false,includeSource:false};}var withIosPlugin=function withIosPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return withXcodeProject(config,function(config){var xcodeProject=config.modResults;var bundleReactNativePhase=xcodeProject.pbxItemByComment('Bundle React Native code and images','PBXShellScriptBuildPhase');modifyExistingXcodeBuildScript(bundleReactNativePhase,props.skipOnConflict===true);var nativeSymbols=resolveNativeSymbolUpload(props.uploadNativeSymbols);if(nativeSymbols.enabled){addDsymUploadBuildPhase(xcodeProject,nativeSymbols.includeSource);}if(props.disableSandboxing!==false){disableUserScriptSandboxing(xcodeProject);console.warn('[posthog-react-native] Setting ENABLE_USER_SCRIPT_SANDBOXING=NO on all Xcode '+'build configurations so sourcemap uploads can resolve git metadata. '+'If your org requires sandboxing to stay enabled, set `{ disableSandboxing: false }` '+'on the plugin in app.json — note that stock Expo projects may fail to build under '+'sandboxing until every script build phase declares its input/output files.');}return config;});};var withPostHogPlugin=function withPostHogPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};config=withAndroidPlugin(config,props.skipOnConflict===true);if(resolveNativeSymbolUpload(props.uploadNativeSymbols).enabled){config=withAndroidNativeSymbolsPlugin(config);}return withIosPlugin(config,props);};var postHogPlugin=function postHogPlugin(config){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return withPostHogPlugin(config,props);};module.exports=postHogPlugin;module.exports.modifyExistingXcodeBuildScript=modifyExistingXcodeBuildScript;module.exports.addPostHogWithBundledScriptsToBundleShellScript=addPostHogWithBundledScriptsToBundleShellScript;module.exports.disableUserScriptSandboxing=disableUserScriptSandboxing;module.exports.buildDsymUploadShellScript=buildDsymUploadShellScript;module.exports.addDsymUploadBuildPhase=addDsymUploadBuildPhase;module.exports.resolveNativeSymbolUpload=resolveNativeSymbolUpload;module.exports.buildAndroidSkipOnConflictGradleLine=buildAndroidSkipOnConflictGradleLine;module.exports.addPostHogAndroidGradlePluginClasspath=addPostHogAndroidGradlePluginClasspath;module.exports.applyPostHogAndroidGradlePlugin=applyPostHogAndroidGradlePlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoconfig.js","sourceRoot":"","sources":["../../src/tooling/expoconfig.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,4BAA4B;AAC5B,wGAAwG;AAExG,MAAM,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAExG,uFAAuF;AACvF,0CAA0C;AAC1C,MAAM,qCAAqC,GAAG,OAAO,CAAA;AAErD,MAAM,wCAAwC,GAC5C,8KAA8K,CAAA;AAEhL,MAAM,iBAAiB,GAAG,CAAC,MAAW,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"expoconfig.js","sourceRoot":"","sources":["../../src/tooling/expoconfig.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,4BAA4B;AAC5B,wGAAwG;AAExG,MAAM,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAExG,uFAAuF;AACvF,0CAA0C;AAC1C,MAAM,qCAAqC,GAAG,OAAO,CAAA;AAErD,MAAM,wCAAwC,GAC5C,8KAA8K,CAAA;AAEhL,MAAM,yCAAyC,GAAG,kCAAkC,CAAA;AAEpF,MAAM,UAAU,oCAAoC,CAAC,cAAuB;IAC1E,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,eAAe,yCAAyC,SAAS,CAAA;AAC1E,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,MAAW,EAAE,cAAc,GAAG,KAAK,EAAE,EAAE;IAChE,OAAO,kBAAkB,CAAC,MAAM,EAAE,CAAC,MAAW,EAAE,EAAE;QAChD,IAAI,MAAM,CAAC,UAAU,CAAC,QAAQ,KAAK,QAA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AAA;AAC9E,MAAM,CAAC,OAAO,CAAC,+CAA+C,GAAG,+CAA+C,CAAA;AAChH,MAAM,CAAC,OAAO,CAAC,2BAA2B,GAAG,2BAA2B,CAAA;AACxE,MAAM,CAAC,OAAO,CAAC,0BAA0B,GAAG,0BAA0B,CAAA;AACtE,MAAM,CAAC,OAAO,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;AAChE,MAAM,CAAC,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAA;AACpE,MAAM,CAAC,OAAO,CAAC,oCAAoC,GAAG,oCAAoC,CAAA;AAC1F,MAAM,CAAC,OAAO,CAAC,sCAAsC,GAAG,sCAAsC,CAAA;AAC9F,MAAM,CAAC,OAAO,CAAC,+BAA+B,GAAG,+BAA+B,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.49.
|
|
1
|
+
export declare const version = "4.49.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.49.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.49.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-react-native",
|
|
3
|
-
"version": "4.49.
|
|
3
|
+
"version": "4.49.1",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/PostHog/posthog-js/issues"
|
|
6
6
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"directory": "packages/react-native"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@posthog/types": "^1.
|
|
34
|
+
"@posthog/types": "^1.388.0",
|
|
35
35
|
"@posthog/core": "^1.34.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"react-native-svg": "^15.0.0",
|
|
72
72
|
"ts-jest": "29.4.0",
|
|
73
73
|
"typescript": "5.8.2",
|
|
74
|
+
"@posthog/react-native-plugin": "2.0.1",
|
|
74
75
|
"@posthog-tooling/tsconfig-base": "1.1.1",
|
|
75
|
-
"@posthog-tooling/rollup-utils": "1.1.1"
|
|
76
|
-
"@posthog/react-native-plugin": "2.0.1"
|
|
76
|
+
"@posthog-tooling/rollup-utils": "1.1.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@react-native-async-storage/async-storage": ">=1.0.0",
|
package/tooling/posthog-xcode.sh
CHANGED
|
@@ -32,6 +32,23 @@ print_command_error() {
|
|
|
32
32
|
|
|
33
33
|
# WITH_ENVIRONMENT is executed by React Native
|
|
34
34
|
|
|
35
|
+
POSTHOG_UPLOAD_ARGS=""
|
|
36
|
+
while [ "$#" -gt 0 ]; do
|
|
37
|
+
case "$1" in
|
|
38
|
+
--posthog-skip-on-conflict)
|
|
39
|
+
POSTHOG_UPLOAD_ARGS="$POSTHOG_UPLOAD_ARGS --skip-on-conflict"
|
|
40
|
+
shift
|
|
41
|
+
;;
|
|
42
|
+
--)
|
|
43
|
+
shift
|
|
44
|
+
break
|
|
45
|
+
;;
|
|
46
|
+
*)
|
|
47
|
+
break
|
|
48
|
+
;;
|
|
49
|
+
esac
|
|
50
|
+
done
|
|
51
|
+
|
|
35
52
|
REACT_NATIVE_XCODE_DEFAULT="../node_modules/react-native/scripts/react-native-xcode.sh"
|
|
36
53
|
# Accept $1 only when it actually points at a shell script; guard against the
|
|
37
54
|
# Expo plugin previously passing "/bin/sh" as $1 (issue #3682).
|
|
@@ -85,16 +102,6 @@ if [ -z "$PH_CLI_PATH" ] || [ ! -x "$PH_CLI_PATH" ]; then
|
|
|
85
102
|
exit 1
|
|
86
103
|
fi
|
|
87
104
|
|
|
88
|
-
MIN_POSTHOG_CLI_VERSION="0.7.8"
|
|
89
|
-
PH_CLI_VERSION=$("$PH_CLI_PATH" --version 2>/dev/null | awk '{print $NF}' | tr -d 'v')
|
|
90
|
-
if [ -n "$PH_CLI_VERSION" ]; then
|
|
91
|
-
LOWEST=$(printf '%s\n%s\n' "$MIN_POSTHOG_CLI_VERSION" "$PH_CLI_VERSION" | sort -t. -k1,1n -k2,2n -k3,3n | head -n1)
|
|
92
|
-
if [ "$LOWEST" != "$MIN_POSTHOG_CLI_VERSION" ]; then
|
|
93
|
-
echo "error: posthog-cli >= ${MIN_POSTHOG_CLI_VERSION} required (found ${PH_CLI_VERSION}). Upgrade: npm install -g @posthog/cli@latest"
|
|
94
|
-
exit 1
|
|
95
|
-
fi
|
|
96
|
-
fi
|
|
97
|
-
|
|
98
105
|
# mimics how the file is defined in node_modules/react-native/scripts/react-native-xcode.sh (PACKAGER_SOURCEMAP_FILE)
|
|
99
106
|
SOURCEMAP_PACKAGER_FILE="$CONFIGURATION_BUILD_DIR/$SOURCEMAP_NAME"
|
|
100
107
|
|
|
@@ -199,7 +206,7 @@ set -x -e
|
|
|
199
206
|
|
|
200
207
|
# Execute posthog cli upload
|
|
201
208
|
set +x +e
|
|
202
|
-
CLI_UPLOAD_OUTPUT=$(/bin/sh -c "$PH_CLI_PATH hermes upload --directory $DERIVED_FILE_DIR $CLI_RELEASE_ARGS" 2>&1)
|
|
209
|
+
CLI_UPLOAD_OUTPUT=$(/bin/sh -c "$PH_CLI_PATH hermes upload --directory $DERIVED_FILE_DIR $CLI_RELEASE_ARGS $POSTHOG_UPLOAD_ARGS" 2>&1)
|
|
203
210
|
UPLOAD_EXIT_CODE=$?
|
|
204
211
|
if [ $UPLOAD_EXIT_CODE -eq 0 ]; then
|
|
205
212
|
echo "$CLI_UPLOAD_OUTPUT" | awk '{print "output: posthog-cli - " $0}'
|
package/tooling/posthog.gradle
CHANGED
|
@@ -92,6 +92,11 @@ plugins.withId('com.android.application') {
|
|
|
92
92
|
extraArgs.addAll(["--build", versionCode.toString()])
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
def posthogUploadArgs = []
|
|
96
|
+
if (project.ext.has("posthogReactNativeSkipOnConflict") && project.ext.get("posthogReactNativeSkipOnConflict") == true) {
|
|
97
|
+
posthogUploadArgs.add("--skip-on-conflict")
|
|
98
|
+
}
|
|
99
|
+
|
|
95
100
|
def injected = project.objects.newInstance(InjectedExecOps)
|
|
96
101
|
|
|
97
102
|
// Resolve the posthog-cli path at execution time, not during
|
|
@@ -130,6 +135,7 @@ plugins.withId('com.android.application') {
|
|
|
130
135
|
"--directory", sourcemapOutput.getParent() // The path to a sourcemap that should be uploaded.
|
|
131
136
|
])
|
|
132
137
|
args.addAll(extraArgs)
|
|
138
|
+
args.addAll(posthogUploadArgs)
|
|
133
139
|
logger.info("posthog-cli upload arguments: ${args}")
|
|
134
140
|
|
|
135
141
|
injected.execOps.exec {
|