react-native-clarity 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +127 -127
- package/android/build.gradle +81 -81
- package/android/gradle.properties +7 -7
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/microsoft/clarity/reactnative/ClarityModule.kt +122 -122
- package/android/src/main/java/com/microsoft/clarity/reactnative/ClarityPackage.kt +17 -17
- package/ios/Clarity.h +12 -12
- package/ios/Clarity.m +131 -131
- package/ios/Clarity.xcodeproj/project.pbxproj +280 -280
- package/lib/commonjs/index.js +74 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +74 -66
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +105 -105
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +165 -165
- package/react-native-clarity.podspec +36 -36
- package/src/index.tsx +257 -248
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The configuration that will be used to customize the Clarity behaviour.
|
|
3
|
-
*
|
|
4
|
-
* @param userId [OPTIONAL default = null] A custom identifier for the current user. If passed as null, the user id
|
|
5
|
-
* will be auto generated. The user id in general is sticky across sessions.
|
|
6
|
-
* The provided user id must follow these conditions:
|
|
7
|
-
* 1. Cannot be an empty string.
|
|
8
|
-
* 2. Should be base36 and smaller than "1Z141Z4".
|
|
9
|
-
* @param logLevel [OPTIONAL default = LogLevel.None] The level of logging to show in the device logcat stream.
|
|
10
|
-
* @param allowMeteredNetworkUsage [OPTIONAL default = false] Allows uploading session data to the servers on device metered network.
|
|
11
|
-
* @param enableWebViewCapture [OPTIONAL default = true] Allows Clarity to capture the web views DOM content.
|
|
12
|
-
* @param allowedDomains [OPTIONAL default = ["*"]] The whitelisted domains to allow Clarity to capture their DOM content.
|
|
13
|
-
* If it contains "*" as an element, all domains will be captured.
|
|
14
|
-
* Note: iOS currently does not support allowedDomains feature.
|
|
15
|
-
* @param disableOnLowEndDevices [OPTIONAL default = false] Disable Clarity on low-end devices.
|
|
16
|
-
* @param maximumDailyNetworkUsageInMB [OPTIONAL default = null] Maximum daily network usage for Clarity (null = No limit). When the limit is reached, Clarity will turn on lean mode.
|
|
17
|
-
* Note: iOS currently does not support limiting network usage.
|
|
18
|
-
* @param enableIOS_experimental [OPTIONAL default = false] Experimental flag to enable Clarity on iOS platform.
|
|
19
|
-
*/
|
|
20
|
-
export interface ClarityConfig {
|
|
21
|
-
userId?: string | null;
|
|
22
|
-
logLevel?: LogLevel;
|
|
23
|
-
allowMeteredNetworkUsage?: boolean;
|
|
24
|
-
enableWebViewCapture?: boolean;
|
|
25
|
-
allowedDomains?: string[];
|
|
26
|
-
disableOnLowEndDevices?: Boolean;
|
|
27
|
-
maximumDailyNetworkUsageInMB?: number;
|
|
28
|
-
enableIOS_experimental?: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The level of logging to show in the device logcat stream.
|
|
32
|
-
*/
|
|
33
|
-
export declare enum LogLevel {
|
|
34
|
-
Verbose = "Verbose",
|
|
35
|
-
Debug = "Debug",
|
|
36
|
-
Info = "Info",
|
|
37
|
-
Warning = "Warning",
|
|
38
|
-
Error = "Error",
|
|
39
|
-
None = "None"
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Initializes the Clarity SDK if the API level is supported.
|
|
43
|
-
* @param projectId [REQUIRED] The Clarity project id to send data to.
|
|
44
|
-
* @param config [OPTIONAL] The clarity config, if not provided default values are used.
|
|
45
|
-
*/
|
|
46
|
-
export declare function initialize(projectId: string, config?: ClarityConfig): void;
|
|
47
|
-
/**
|
|
48
|
-
* Pauses the Clarity capturing processes until the next resume() is called.
|
|
49
|
-
*/
|
|
50
|
-
export declare function pause(): Promise<boolean | undefined>;
|
|
51
|
-
/**
|
|
52
|
-
* Resumes the Clarity capturing processes if they are not already resumed.
|
|
53
|
-
* Note: Clarity starts capturing data right on initialization.
|
|
54
|
-
*/
|
|
55
|
-
export declare function resume(): Promise<boolean | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Returns true if Clarity has been paused by the user.
|
|
58
|
-
*/
|
|
59
|
-
export declare function isPaused(): Promise<Boolean | undefined>;
|
|
60
|
-
/**
|
|
61
|
-
* Sets a custom user id that can be used to identify the user. It has less
|
|
62
|
-
* restrictions than the userId parameter. You can pass any string and
|
|
63
|
-
* you can filter on it on the dashboard side. If you need the most efficient
|
|
64
|
-
* filtering on the dashboard, use the userId parameter if possible.
|
|
65
|
-
* <p>
|
|
66
|
-
* Note: custom user id cannot be null or empty, or consists only of whitespaces.
|
|
67
|
-
* </p>
|
|
68
|
-
* @param customUserId The custom user id to set.
|
|
69
|
-
*/
|
|
70
|
-
export declare function setCustomUserId(customUserId: string): Promise<boolean | undefined>;
|
|
71
|
-
/**
|
|
72
|
-
* Sets a custom session id that can be used to identify the session.
|
|
73
|
-
* <p>
|
|
74
|
-
* Note: custom session id cannot be null or empty, or consists only of whitespaces.
|
|
75
|
-
* </p>
|
|
76
|
-
* @param customSessionId The custom session id to set.
|
|
77
|
-
*/
|
|
78
|
-
export declare function setCustomSessionId(customSessionId: string): Promise<boolean | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
* Sets a custom tag for the current session.
|
|
81
|
-
* @param key The tag key to set.
|
|
82
|
-
* @param value The tag value to set.
|
|
83
|
-
*/
|
|
84
|
-
export declare function setCustomTag(key: string, value: string): Promise<boolean | undefined>;
|
|
85
|
-
/**
|
|
86
|
-
* For React Native applications only, this function is used to set the current screen name
|
|
87
|
-
* in case the ReactNative Navigation package is used.
|
|
88
|
-
* This will allow you to split and analyze your data on the screen names.
|
|
89
|
-
* You can it set to `null` to remove the latest set value.
|
|
90
|
-
* @param screenName The current screen name to set.
|
|
91
|
-
*/
|
|
92
|
-
export declare function setCurrentScreenName(screenName: string | null): Promise<boolean | undefined>;
|
|
93
|
-
/**
|
|
94
|
-
* Returns the active session id. This can be used to correlate the Clarity session with other
|
|
95
|
-
* analytics tools that the developer may be using.
|
|
96
|
-
* @returns a promise that resolves to the current session id.
|
|
97
|
-
*/
|
|
98
|
-
export declare function getCurrentSessionId(): Promise<string>;
|
|
99
|
-
/**
|
|
100
|
-
* Returns the active session url. This can be used to correlate the Clarity session with other
|
|
101
|
-
* analytics tools that the developer may be using.
|
|
102
|
-
*
|
|
103
|
-
* @returns a promise that resolves to the current session url if there is an active one.
|
|
104
|
-
*/
|
|
105
|
-
export declare function getCurrentSessionUrl(): Promise<string>;
|
|
1
|
+
/**
|
|
2
|
+
* The configuration that will be used to customize the Clarity behaviour.
|
|
3
|
+
*
|
|
4
|
+
* @param userId [OPTIONAL default = null] A custom identifier for the current user. If passed as null, the user id
|
|
5
|
+
* will be auto generated. The user id in general is sticky across sessions.
|
|
6
|
+
* The provided user id must follow these conditions:
|
|
7
|
+
* 1. Cannot be an empty string.
|
|
8
|
+
* 2. Should be base36 and smaller than "1Z141Z4".
|
|
9
|
+
* @param logLevel [OPTIONAL default = LogLevel.None] The level of logging to show in the device logcat stream.
|
|
10
|
+
* @param allowMeteredNetworkUsage [OPTIONAL default = false] Allows uploading session data to the servers on device metered network.
|
|
11
|
+
* @param enableWebViewCapture [OPTIONAL default = true] Allows Clarity to capture the web views DOM content.
|
|
12
|
+
* @param allowedDomains [OPTIONAL default = ["*"]] The whitelisted domains to allow Clarity to capture their DOM content.
|
|
13
|
+
* If it contains "*" as an element, all domains will be captured.
|
|
14
|
+
* Note: iOS currently does not support allowedDomains feature.
|
|
15
|
+
* @param disableOnLowEndDevices [OPTIONAL default = false] Disable Clarity on low-end devices.
|
|
16
|
+
* @param maximumDailyNetworkUsageInMB [OPTIONAL default = null] Maximum daily network usage for Clarity (null = No limit). When the limit is reached, Clarity will turn on lean mode.
|
|
17
|
+
* Note: iOS currently does not support limiting network usage.
|
|
18
|
+
* @param enableIOS_experimental [OPTIONAL default = false] Experimental flag to enable Clarity on iOS platform.
|
|
19
|
+
*/
|
|
20
|
+
export interface ClarityConfig {
|
|
21
|
+
userId?: string | null;
|
|
22
|
+
logLevel?: LogLevel;
|
|
23
|
+
allowMeteredNetworkUsage?: boolean;
|
|
24
|
+
enableWebViewCapture?: boolean;
|
|
25
|
+
allowedDomains?: string[];
|
|
26
|
+
disableOnLowEndDevices?: Boolean;
|
|
27
|
+
maximumDailyNetworkUsageInMB?: number;
|
|
28
|
+
enableIOS_experimental?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The level of logging to show in the device logcat stream.
|
|
32
|
+
*/
|
|
33
|
+
export declare enum LogLevel {
|
|
34
|
+
Verbose = "Verbose",
|
|
35
|
+
Debug = "Debug",
|
|
36
|
+
Info = "Info",
|
|
37
|
+
Warning = "Warning",
|
|
38
|
+
Error = "Error",
|
|
39
|
+
None = "None"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the Clarity SDK if the API level is supported.
|
|
43
|
+
* @param projectId [REQUIRED] The Clarity project id to send data to.
|
|
44
|
+
* @param config [OPTIONAL] The clarity config, if not provided default values are used.
|
|
45
|
+
*/
|
|
46
|
+
export declare function initialize(projectId: string, config?: ClarityConfig): void;
|
|
47
|
+
/**
|
|
48
|
+
* Pauses the Clarity capturing processes until the next resume() is called.
|
|
49
|
+
*/
|
|
50
|
+
export declare function pause(): Promise<boolean | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Resumes the Clarity capturing processes if they are not already resumed.
|
|
53
|
+
* Note: Clarity starts capturing data right on initialization.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resume(): Promise<boolean | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if Clarity has been paused by the user.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isPaused(): Promise<Boolean | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Sets a custom user id that can be used to identify the user. It has less
|
|
62
|
+
* restrictions than the userId parameter. You can pass any string and
|
|
63
|
+
* you can filter on it on the dashboard side. If you need the most efficient
|
|
64
|
+
* filtering on the dashboard, use the userId parameter if possible.
|
|
65
|
+
* <p>
|
|
66
|
+
* Note: custom user id cannot be null or empty, or consists only of whitespaces.
|
|
67
|
+
* </p>
|
|
68
|
+
* @param customUserId The custom user id to set.
|
|
69
|
+
*/
|
|
70
|
+
export declare function setCustomUserId(customUserId: string): Promise<boolean | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* Sets a custom session id that can be used to identify the session.
|
|
73
|
+
* <p>
|
|
74
|
+
* Note: custom session id cannot be null or empty, or consists only of whitespaces.
|
|
75
|
+
* </p>
|
|
76
|
+
* @param customSessionId The custom session id to set.
|
|
77
|
+
*/
|
|
78
|
+
export declare function setCustomSessionId(customSessionId: string): Promise<boolean | undefined>;
|
|
79
|
+
/**
|
|
80
|
+
* Sets a custom tag for the current session.
|
|
81
|
+
* @param key The tag key to set.
|
|
82
|
+
* @param value The tag value to set.
|
|
83
|
+
*/
|
|
84
|
+
export declare function setCustomTag(key: string, value: string): Promise<boolean | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* For React Native applications only, this function is used to set the current screen name
|
|
87
|
+
* in case the ReactNative Navigation package is used.
|
|
88
|
+
* This will allow you to split and analyze your data on the screen names.
|
|
89
|
+
* You can it set to `null` to remove the latest set value.
|
|
90
|
+
* @param screenName The current screen name to set.
|
|
91
|
+
*/
|
|
92
|
+
export declare function setCurrentScreenName(screenName: string | null): Promise<boolean | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* Returns the active session id. This can be used to correlate the Clarity session with other
|
|
95
|
+
* analytics tools that the developer may be using.
|
|
96
|
+
* @returns a promise that resolves to the current session id.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getCurrentSessionId(): Promise<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Returns the active session url. This can be used to correlate the Clarity session with other
|
|
101
|
+
* analytics tools that the developer may be using.
|
|
102
|
+
*
|
|
103
|
+
* @returns a promise that resolves to the current session url if there is an active one.
|
|
104
|
+
*/
|
|
105
|
+
export declare function getCurrentSessionUrl(): Promise<string>;
|
|
106
106
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAyBD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,QA6CnE;AAED;;GAEG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMpD;AAED;;;GAGG;AACH,wBAAgB,MAAM,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMrD;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMlF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMxF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAMrF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAM9B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAMrD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAMtD"}
|
package/package.json
CHANGED
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-clarity",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "A plugin to provide the Clarity experience for the React Native applications.",
|
|
5
|
-
"main": "lib/commonjs/index",
|
|
6
|
-
"module": "lib/module/index",
|
|
7
|
-
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "src/index",
|
|
9
|
-
"source": "src/index",
|
|
10
|
-
"files": [
|
|
11
|
-
"src",
|
|
12
|
-
"lib",
|
|
13
|
-
"android",
|
|
14
|
-
"ios",
|
|
15
|
-
"cpp",
|
|
16
|
-
"*.podspec",
|
|
17
|
-
"!lib/typescript/example",
|
|
18
|
-
"!ios/build",
|
|
19
|
-
"!android/build",
|
|
20
|
-
"!android/gradle",
|
|
21
|
-
"!android/gradlew",
|
|
22
|
-
"!android/gradlew.bat",
|
|
23
|
-
"!android/local.properties",
|
|
24
|
-
"!**/__tests__",
|
|
25
|
-
"!**/__fixtures__",
|
|
26
|
-
"!**/__mocks__",
|
|
27
|
-
"!**/.*"
|
|
28
|
-
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"test": "jest",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
-
"prepack": "bob build",
|
|
34
|
-
"release": "release-it",
|
|
35
|
-
"example": "yarn --cwd example",
|
|
36
|
-
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
37
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build *.tgz"
|
|
38
|
-
},
|
|
39
|
-
"keywords": [
|
|
40
|
-
"react-native",
|
|
41
|
-
"android"
|
|
42
|
-
],
|
|
43
|
-
"repository": "https://github.com/microsoft/clarity-apps",
|
|
44
|
-
"author": "Microsoft - Clarity <clarity-apps-support@microsoft.com> (https://github.com/microsoft/clarity-apps)",
|
|
45
|
-
"license": "MIT",
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/microsoft/clarity-apps/issues"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://clarity.microsoft.com/",
|
|
50
|
-
"publishConfig": {
|
|
51
|
-
"registry": "https://registry.npmjs.org/"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@evilmartians/lefthook": "^1.2.2",
|
|
55
|
-
"@commitlint/config-conventional": "^17.0.2",
|
|
56
|
-
"@react-native-community/eslint-config": "^3.0.2",
|
|
57
|
-
"@release-it/conventional-changelog": "^5.0.0",
|
|
58
|
-
"@types/jest": "^28.1.2",
|
|
59
|
-
"@types/react": "~17.0.21",
|
|
60
|
-
"@types/react-native": "0.70.0",
|
|
61
|
-
"commitlint": "^17.0.2",
|
|
62
|
-
"del-cli": "^5.0.0",
|
|
63
|
-
"eslint": "^8.4.1",
|
|
64
|
-
"eslint-config-prettier": "^8.5.0",
|
|
65
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
66
|
-
"jest": "^28.1.1",
|
|
67
|
-
"pod-install": "^0.1.0",
|
|
68
|
-
"prettier": "^2.0.5",
|
|
69
|
-
"react": "18.2.0",
|
|
70
|
-
"react-native": "0.71.3",
|
|
71
|
-
"react-native-builder-bob": "^0.20.0",
|
|
72
|
-
"release-it": "^15.0.0",
|
|
73
|
-
"typescript": "^4.5.2"
|
|
74
|
-
},
|
|
75
|
-
"resolutions": {
|
|
76
|
-
"@types/react": "17.0.21"
|
|
77
|
-
},
|
|
78
|
-
"peerDependencies": {
|
|
79
|
-
"react": "*",
|
|
80
|
-
"react-native": "*",
|
|
81
|
-
"react-native-svg": ">=14.0.0"
|
|
82
|
-
},
|
|
83
|
-
"peerDependenciesMeta": {
|
|
84
|
-
"react-native-svg": {
|
|
85
|
-
"optional": true
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"engines": {
|
|
89
|
-
"node": ">= 16.0.0"
|
|
90
|
-
},
|
|
91
|
-
"packageManager": "^yarn@1.22.15",
|
|
92
|
-
"jest": {
|
|
93
|
-
"preset": "react-native",
|
|
94
|
-
"modulePathIgnorePatterns": [
|
|
95
|
-
"<rootDir>/example/node_modules",
|
|
96
|
-
"<rootDir>/lib/"
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
"commitlint": {
|
|
100
|
-
"extends": [
|
|
101
|
-
"@commitlint/config-conventional"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"release-it": {
|
|
105
|
-
"git": {
|
|
106
|
-
"commitMessage": "chore: release ${version}",
|
|
107
|
-
"tagName": "v${version}"
|
|
108
|
-
},
|
|
109
|
-
"npm": {
|
|
110
|
-
"publish": true
|
|
111
|
-
},
|
|
112
|
-
"github": {
|
|
113
|
-
"release": true
|
|
114
|
-
},
|
|
115
|
-
"plugins": {
|
|
116
|
-
"@release-it/conventional-changelog": {
|
|
117
|
-
"preset": "angular"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"eslintConfig": {
|
|
122
|
-
"root": true,
|
|
123
|
-
"extends": [
|
|
124
|
-
"@react-native-community",
|
|
125
|
-
"prettier"
|
|
126
|
-
],
|
|
127
|
-
"rules": {
|
|
128
|
-
"prettier/prettier": [
|
|
129
|
-
"error",
|
|
130
|
-
{
|
|
131
|
-
"quoteProps": "consistent",
|
|
132
|
-
"singleQuote": true,
|
|
133
|
-
"tabWidth": 2,
|
|
134
|
-
"trailingComma": "es5",
|
|
135
|
-
"useTabs": false
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"eslintIgnore": [
|
|
141
|
-
"node_modules/",
|
|
142
|
-
"lib/"
|
|
143
|
-
],
|
|
144
|
-
"prettier": {
|
|
145
|
-
"quoteProps": "consistent",
|
|
146
|
-
"singleQuote": true,
|
|
147
|
-
"tabWidth": 2,
|
|
148
|
-
"trailingComma": "es5",
|
|
149
|
-
"useTabs": false
|
|
150
|
-
},
|
|
151
|
-
"react-native-builder-bob": {
|
|
152
|
-
"source": "src",
|
|
153
|
-
"output": "lib",
|
|
154
|
-
"targets": [
|
|
155
|
-
"commonjs",
|
|
156
|
-
"module",
|
|
157
|
-
[
|
|
158
|
-
"typescript",
|
|
159
|
-
{
|
|
160
|
-
"project": "tsconfig.build.json"
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-clarity",
|
|
3
|
+
"version": "3.0.1",
|
|
4
|
+
"description": "A plugin to provide the Clarity experience for the React Native applications.",
|
|
5
|
+
"main": "lib/commonjs/index",
|
|
6
|
+
"module": "lib/module/index",
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"react-native": "src/index",
|
|
9
|
+
"source": "src/index",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"lib",
|
|
13
|
+
"android",
|
|
14
|
+
"ios",
|
|
15
|
+
"cpp",
|
|
16
|
+
"*.podspec",
|
|
17
|
+
"!lib/typescript/example",
|
|
18
|
+
"!ios/build",
|
|
19
|
+
"!android/build",
|
|
20
|
+
"!android/gradle",
|
|
21
|
+
"!android/gradlew",
|
|
22
|
+
"!android/gradlew.bat",
|
|
23
|
+
"!android/local.properties",
|
|
24
|
+
"!**/__tests__",
|
|
25
|
+
"!**/__fixtures__",
|
|
26
|
+
"!**/__mocks__",
|
|
27
|
+
"!**/.*"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "jest",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
+
"prepack": "bob build",
|
|
34
|
+
"release": "release-it",
|
|
35
|
+
"example": "yarn --cwd example",
|
|
36
|
+
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
37
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build *.tgz"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"react-native",
|
|
41
|
+
"android"
|
|
42
|
+
],
|
|
43
|
+
"repository": "https://github.com/microsoft/clarity-apps",
|
|
44
|
+
"author": "Microsoft - Clarity <clarity-apps-support@microsoft.com> (https://github.com/microsoft/clarity-apps)",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/microsoft/clarity-apps/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://clarity.microsoft.com/",
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"registry": "https://registry.npmjs.org/"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@evilmartians/lefthook": "^1.2.2",
|
|
55
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
56
|
+
"@react-native-community/eslint-config": "^3.0.2",
|
|
57
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
58
|
+
"@types/jest": "^28.1.2",
|
|
59
|
+
"@types/react": "~17.0.21",
|
|
60
|
+
"@types/react-native": "0.70.0",
|
|
61
|
+
"commitlint": "^17.0.2",
|
|
62
|
+
"del-cli": "^5.0.0",
|
|
63
|
+
"eslint": "^8.4.1",
|
|
64
|
+
"eslint-config-prettier": "^8.5.0",
|
|
65
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
66
|
+
"jest": "^28.1.1",
|
|
67
|
+
"pod-install": "^0.1.0",
|
|
68
|
+
"prettier": "^2.0.5",
|
|
69
|
+
"react": "18.2.0",
|
|
70
|
+
"react-native": "0.71.3",
|
|
71
|
+
"react-native-builder-bob": "^0.20.0",
|
|
72
|
+
"release-it": "^15.0.0",
|
|
73
|
+
"typescript": "^4.5.2"
|
|
74
|
+
},
|
|
75
|
+
"resolutions": {
|
|
76
|
+
"@types/react": "17.0.21"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"react": "*",
|
|
80
|
+
"react-native": "*",
|
|
81
|
+
"react-native-svg": ">=14.0.0"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"react-native-svg": {
|
|
85
|
+
"optional": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">= 16.0.0"
|
|
90
|
+
},
|
|
91
|
+
"packageManager": "^yarn@1.22.15",
|
|
92
|
+
"jest": {
|
|
93
|
+
"preset": "react-native",
|
|
94
|
+
"modulePathIgnorePatterns": [
|
|
95
|
+
"<rootDir>/example/node_modules",
|
|
96
|
+
"<rootDir>/lib/"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"commitlint": {
|
|
100
|
+
"extends": [
|
|
101
|
+
"@commitlint/config-conventional"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"release-it": {
|
|
105
|
+
"git": {
|
|
106
|
+
"commitMessage": "chore: release ${version}",
|
|
107
|
+
"tagName": "v${version}"
|
|
108
|
+
},
|
|
109
|
+
"npm": {
|
|
110
|
+
"publish": true
|
|
111
|
+
},
|
|
112
|
+
"github": {
|
|
113
|
+
"release": true
|
|
114
|
+
},
|
|
115
|
+
"plugins": {
|
|
116
|
+
"@release-it/conventional-changelog": {
|
|
117
|
+
"preset": "angular"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"eslintConfig": {
|
|
122
|
+
"root": true,
|
|
123
|
+
"extends": [
|
|
124
|
+
"@react-native-community",
|
|
125
|
+
"prettier"
|
|
126
|
+
],
|
|
127
|
+
"rules": {
|
|
128
|
+
"prettier/prettier": [
|
|
129
|
+
"error",
|
|
130
|
+
{
|
|
131
|
+
"quoteProps": "consistent",
|
|
132
|
+
"singleQuote": true,
|
|
133
|
+
"tabWidth": 2,
|
|
134
|
+
"trailingComma": "es5",
|
|
135
|
+
"useTabs": false
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"eslintIgnore": [
|
|
141
|
+
"node_modules/",
|
|
142
|
+
"lib/"
|
|
143
|
+
],
|
|
144
|
+
"prettier": {
|
|
145
|
+
"quoteProps": "consistent",
|
|
146
|
+
"singleQuote": true,
|
|
147
|
+
"tabWidth": 2,
|
|
148
|
+
"trailingComma": "es5",
|
|
149
|
+
"useTabs": false
|
|
150
|
+
},
|
|
151
|
+
"react-native-builder-bob": {
|
|
152
|
+
"source": "src",
|
|
153
|
+
"output": "lib",
|
|
154
|
+
"targets": [
|
|
155
|
+
"commonjs",
|
|
156
|
+
"module",
|
|
157
|
+
[
|
|
158
|
+
"typescript",
|
|
159
|
+
{
|
|
160
|
+
"project": "tsconfig.build.json"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
-
|
|
6
|
-
Pod::Spec.new do |s|
|
|
7
|
-
s.name = "react-native-clarity"
|
|
8
|
-
s.version = package["version"]
|
|
9
|
-
s.summary = package["description"]
|
|
10
|
-
s.homepage = package["homepage"]
|
|
11
|
-
s.license = package["license"]
|
|
12
|
-
s.authors = package["author"]
|
|
13
|
-
|
|
14
|
-
s.platforms = { :ios => "13.0" }
|
|
15
|
-
s.source = { :git => "https://msasg.visualstudio.com/Clarity/_git/clarity-react-native.git", :tag => "#{s.version}" }
|
|
16
|
-
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
-
|
|
19
|
-
s.dependency "React-Core"
|
|
20
|
-
s.dependency "Clarity", '1.0.0'
|
|
21
|
-
|
|
22
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
24
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
25
|
-
s.pod_target_xcconfig = {
|
|
26
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
27
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
28
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
29
|
-
}
|
|
30
|
-
s.dependency "React-Codegen"
|
|
31
|
-
s.dependency "RCT-Folly"
|
|
32
|
-
s.dependency "RCTRequired"
|
|
33
|
-
s.dependency "RCTTypeSafety"
|
|
34
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
35
|
-
end
|
|
36
|
-
end
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "react-native-clarity"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => "13.0" }
|
|
15
|
+
s.source = { :git => "https://msasg.visualstudio.com/Clarity/_git/clarity-react-native.git", :tag => "#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
+
|
|
19
|
+
s.dependency "React-Core"
|
|
20
|
+
s.dependency "Clarity", '1.0.0'
|
|
21
|
+
|
|
22
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
24
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
25
|
+
s.pod_target_xcconfig = {
|
|
26
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
27
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
28
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
29
|
+
}
|
|
30
|
+
s.dependency "React-Codegen"
|
|
31
|
+
s.dependency "RCT-Folly"
|
|
32
|
+
s.dependency "RCTRequired"
|
|
33
|
+
s.dependency "RCTTypeSafety"
|
|
34
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
35
|
+
end
|
|
36
|
+
end
|