expo-observe 56.0.8 → 56.0.9
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/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/{56.0.8/expo.modules.observe-56.0.8-sources.jar → 56.0.9/expo.modules.observe-56.0.9-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/{56.0.8/expo.modules.observe-56.0.8.aar → 56.0.9/expo.modules.observe-56.0.9.aar} +0 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/{56.0.8/expo.modules.observe-56.0.8.module → 56.0.9/expo.modules.observe-56.0.9.module} +22 -22
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.module.md5 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/{56.0.8/expo.modules.observe-56.0.8.pom → 56.0.9/expo.modules.observe-56.0.9.pom} +2 -2
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.9/expo.modules.observe-56.0.9.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.sha512 +1 -1
- package/package.json +5 -5
- package/tsconfig.json +2 -2
- package/build/ObserveProvider.js +0 -7
- package/build/ObserveProvider.js.map +0 -1
- package/build/ObserveRoot.js +0 -12
- package/build/ObserveRoot.js.map +0 -1
- package/build/index.js +0 -11
- package/build/index.js.map +0 -1
- package/build/integrations/expo-router/ObserveRouterIntegrationProvider.js +0 -21
- package/build/integrations/expo-router/ObserveRouterIntegrationProvider.js.map +0 -1
- package/build/integrations/expo-router/index.js +0 -5
- package/build/integrations/expo-router/index.js.map +0 -1
- package/build/integrations/expo-router/init.js +0 -89
- package/build/integrations/expo-router/init.js.map +0 -1
- package/build/integrations/expo-router/router.js +0 -12
- package/build/integrations/expo-router/router.js.map +0 -1
- package/build/integrations/expo-router/storage.js +0 -10
- package/build/integrations/expo-router/storage.js.map +0 -1
- package/build/integrations/expo-router/useObserveForRouter.js +0 -91
- package/build/integrations/expo-router/useObserveForRouter.js.map +0 -1
- package/build/module.js +0 -20
- package/build/module.js.map +0 -1
- package/build/module.web.js +0 -9
- package/build/module.web.js.map +0 -1
- package/build/types.js +0 -2
- package/build/types.js.map +0 -1
- package/build/useObserve.js +0 -9
- package/build/useObserve.js.map +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.module.md5 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/observe/expo.modules.observe/56.0.8/expo.modules.observe-56.0.8.pom.sha512 +0 -1
package/expo-module.config.json
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8ddfcca1860d7df8692895acbbe479a9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2efea326f4bdb23d8efe5b31521b0473f6564005
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4db924daf9b04fb7f44a6c186bf68e667173389e15de78b1110e333a4125e8fb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4b25cd875c6502336dba27092674f5c09c59b1bbc15c1fd65e0c23e2116e4867aef889f8bf70343361b890667dc73df75534c0848ca9ece7babcbcd6ab7b0d60
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
55e354998a398d19fa1a153a2424d95b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ce3597feb3c9ccf8f25b2840ddad8459cc91672a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8214a2148d004e473604acf7964106013a696152846f681e86cfe2cc1ca19f3c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
90849ee5c0c87ba5454a732549e24a0359826ca3a54653cca629a2c0547fe03011a8a3bc2b5a50e7ad7042e798417e5118ac15518ada20d7b8397721b76a791a
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.observe",
|
|
5
5
|
"module": "expo.modules.observe",
|
|
6
|
-
"version": "56.0.
|
|
6
|
+
"version": "56.0.9",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.observe-56.0.
|
|
28
|
-
"url": "expo.modules.observe-56.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.observe-56.0.9.aar",
|
|
28
|
+
"url": "expo.modules.observe-56.0.9.aar",
|
|
29
|
+
"size": 249477,
|
|
30
|
+
"sha512": "90849ee5c0c87ba5454a732549e24a0359826ca3a54653cca629a2c0547fe03011a8a3bc2b5a50e7ad7042e798417e5118ac15518ada20d7b8397721b76a791a",
|
|
31
|
+
"sha256": "8214a2148d004e473604acf7964106013a696152846f681e86cfe2cc1ca19f3c",
|
|
32
|
+
"sha1": "ce3597feb3c9ccf8f25b2840ddad8459cc91672a",
|
|
33
|
+
"md5": "55e354998a398d19fa1a153a2424d95b"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"group": "expo.modules.appmetrics",
|
|
62
62
|
"module": "expo.modules.appmetrics",
|
|
63
63
|
"version": {
|
|
64
|
-
"requires": "56.0.
|
|
64
|
+
"requires": "56.0.9"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -134,13 +134,13 @@
|
|
|
134
134
|
],
|
|
135
135
|
"files": [
|
|
136
136
|
{
|
|
137
|
-
"name": "expo.modules.observe-56.0.
|
|
138
|
-
"url": "expo.modules.observe-56.0.
|
|
139
|
-
"size":
|
|
140
|
-
"sha512": "
|
|
141
|
-
"sha256": "
|
|
142
|
-
"sha1": "
|
|
143
|
-
"md5": "
|
|
137
|
+
"name": "expo.modules.observe-56.0.9.aar",
|
|
138
|
+
"url": "expo.modules.observe-56.0.9.aar",
|
|
139
|
+
"size": 249477,
|
|
140
|
+
"sha512": "90849ee5c0c87ba5454a732549e24a0359826ca3a54653cca629a2c0547fe03011a8a3bc2b5a50e7ad7042e798417e5118ac15518ada20d7b8397721b76a791a",
|
|
141
|
+
"sha256": "8214a2148d004e473604acf7964106013a696152846f681e86cfe2cc1ca19f3c",
|
|
142
|
+
"sha1": "ce3597feb3c9ccf8f25b2840ddad8459cc91672a",
|
|
143
|
+
"md5": "55e354998a398d19fa1a153a2424d95b"
|
|
144
144
|
}
|
|
145
145
|
]
|
|
146
146
|
},
|
|
@@ -154,13 +154,13 @@
|
|
|
154
154
|
},
|
|
155
155
|
"files": [
|
|
156
156
|
{
|
|
157
|
-
"name": "expo.modules.observe-56.0.
|
|
158
|
-
"url": "expo.modules.observe-56.0.
|
|
157
|
+
"name": "expo.modules.observe-56.0.9-sources.jar",
|
|
158
|
+
"url": "expo.modules.observe-56.0.9-sources.jar",
|
|
159
159
|
"size": 18840,
|
|
160
|
-
"sha512": "
|
|
161
|
-
"sha256": "
|
|
162
|
-
"sha1": "
|
|
163
|
-
"md5": "
|
|
160
|
+
"sha512": "4b25cd875c6502336dba27092674f5c09c59b1bbc15c1fd65e0c23e2116e4867aef889f8bf70343361b890667dc73df75534c0848ca9ece7babcbcd6ab7b0d60",
|
|
161
|
+
"sha256": "4db924daf9b04fb7f44a6c186bf68e667173389e15de78b1110e333a4125e8fb",
|
|
162
|
+
"sha1": "2efea326f4bdb23d8efe5b31521b0473f6564005",
|
|
163
|
+
"md5": "8ddfcca1860d7df8692895acbbe479a9"
|
|
164
164
|
}
|
|
165
165
|
]
|
|
166
166
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f1f90c4dc17e2dea2e584b0f896dbfd8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1d8754edd5e2a4dc6348de202a6e7429153b2ac1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fd066858ace305a23ad7396a8d203a8ccfb850102fc678626db1a4a18db184d2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dbf3f4e71045a522b4d7778a374bd69947218f34411e56996097ed5c7b0c094527de658592468de143dd140601be848b23862b123d4dfd200ef0bdd04f0aaea9
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.observe</groupId>
|
|
11
11
|
<artifactId>expo.modules.observe</artifactId>
|
|
12
|
-
<version>56.0.
|
|
12
|
+
<version>56.0.9</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.observe</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<dependency>
|
|
53
53
|
<groupId>expo.modules.appmetrics</groupId>
|
|
54
54
|
<artifactId>expo.modules.appmetrics</artifactId>
|
|
55
|
-
<version>56.0.
|
|
55
|
+
<version>56.0.9</version>
|
|
56
56
|
<scope>runtime</scope>
|
|
57
57
|
</dependency>
|
|
58
58
|
<dependency>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9347d5eb2b58960f162ff95dbd5a900f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
266243bece85685a41ad28998e49b03250751d7a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
099d982f9362482f9278dcb756f31e3746df6a27cd51b433417c5399c1c36347
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f868a10b119638d146ee388184a2afdb69b730367e6fcafd9f9a96085b066602f2afd02c36ee7f6780f21a07576d586413558d465eca984d89b3e017ce3ae127
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.observe</groupId>
|
|
4
4
|
<artifactId>expo.modules.observe</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0.
|
|
7
|
-
<release>56.0.
|
|
6
|
+
<latest>56.0.9</latest>
|
|
7
|
+
<release>56.0.9</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0.
|
|
9
|
+
<version>56.0.9</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260515152511</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9928b4aa17482a0fdc7e86960ca288a9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
25a4449e86f4ec20d976205b398d899628767480
|
package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fc54a8dfed0477610ed3efe32d27b5b16dbca56e6ce4fe8ebe9a619f6243a771
|
package/local-maven-repo/expo/modules/observe/expo.modules.observe/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2b02539e4c9325e33099ba144a2cf735618ce974cf8cee9ceae22c672da62321c3af4fca5ea14e3024d80f66e309c6037a98a253d9fc34ccf43799d0bd1fb4e0
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-observe",
|
|
3
3
|
"title": "Expo Observe",
|
|
4
|
-
"version": "56.0.
|
|
4
|
+
"version": "56.0.9",
|
|
5
5
|
"description": "Expo module that dispatches collected app metrics to EAS Observe",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"author": "650 Industries, Inc.",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"expo-app-metrics": "~56.0.
|
|
27
|
+
"expo-app-metrics": "~56.0.9",
|
|
28
28
|
"expo-eas-client": "~56.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/react-native": "^13.3.0",
|
|
32
32
|
"@types/react": "~19.2.0",
|
|
33
|
-
"expo": "56.0.
|
|
34
|
-
"expo
|
|
33
|
+
"expo-module-scripts": "56.0.2",
|
|
34
|
+
"expo": "56.0.0-preview.12"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"expo": "*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"optional": true
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "f26be3dd9396bf7c399a1d607865d0fabdbc0d64",
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "expo-module build",
|
|
50
50
|
"clean": "expo-module clean",
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// @generated by expo-module-scripts
|
|
2
1
|
{
|
|
3
2
|
"extends": "expo-module-scripts/tsconfig.base",
|
|
4
3
|
"compilerOptions": {
|
|
5
4
|
"rootDir": "./src",
|
|
6
|
-
"outDir": "./build"
|
|
5
|
+
"outDir": "./build",
|
|
6
|
+
"emitDeclarationOnly": true
|
|
7
7
|
},
|
|
8
8
|
"include": ["./src"],
|
|
9
9
|
"exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
|
package/build/ObserveProvider.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {} from 'react';
|
|
3
|
-
import { ObserveRouterIntegrationProvider } from './integrations/expo-router/ObserveRouterIntegrationProvider';
|
|
4
|
-
export function ObserveProvider({ children }) {
|
|
5
|
-
return _jsx(ObserveRouterIntegrationProvider, { children: children });
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=ObserveProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObserveProvider.js","sourceRoot":"","sources":["../src/ObserveProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AAE/G,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAqB;IAC7D,OAAO,KAAC,gCAAgC,cAAE,QAAQ,GAAoC,CAAC;AACzF,CAAC","sourcesContent":["import { type PropsWithChildren } from 'react';\n\nimport { ObserveRouterIntegrationProvider } from './integrations/expo-router/ObserveRouterIntegrationProvider';\n\nexport function ObserveProvider({ children }: PropsWithChildren) {\n return <ObserveRouterIntegrationProvider>{children}</ObserveRouterIntegrationProvider>;\n}\n"]}
|
package/build/ObserveRoot.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { AppMetricsRoot } from 'expo-app-metrics';
|
|
3
|
-
import { ObserveProvider } from './ObserveProvider';
|
|
4
|
-
export function ObserveRoot({ children, ...props }) {
|
|
5
|
-
return (_jsx(AppMetricsRoot, { ...props, children: _jsx(ObserveProvider, { children: children }) }));
|
|
6
|
-
}
|
|
7
|
-
ObserveRoot.wrap = function wrap(Component) {
|
|
8
|
-
const Wrapped = (props) => (_jsx(ObserveRoot, { children: _jsx(Component, { ...props }) }));
|
|
9
|
-
Wrapped.displayName = `ObserveRoot(${Component.displayName || Component.name || 'Component'})`;
|
|
10
|
-
return Wrapped;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=ObserveRoot.js.map
|
package/build/ObserveRoot.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObserveRoot.js","sourceRoot":"","sources":["../src/ObserveRoot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAiD;IAC/F,OAAO,CACL,KAAC,cAAc,OAAK,KAAK,YACvB,KAAC,eAAe,cAAE,QAAQ,GAAmB,GAC9B,CAClB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,IAAI,GAAG,SAAS,IAAI,CAC9B,SAAiC;IAEjC,MAAM,OAAO,GAAG,CAAC,KAAQ,EAAE,EAAE,CAAC,CAC5B,KAAC,WAAW,cACV,KAAC,SAAS,OAAK,KAAK,GAAI,GACZ,CACf,CAAC;IACF,OAAO,CAAC,WAAW,GAAG,eAAe,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAC/F,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { AppMetricsRoot } from 'expo-app-metrics';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { ObserveProvider } from './ObserveProvider';\n\ntype AppMetricsRootProps = ComponentProps<typeof AppMetricsRoot>;\n\nexport function ObserveRoot({ children, ...props }: AppMetricsRootProps & { children: ReactNode }) {\n return (\n <AppMetricsRoot {...props}>\n <ObserveProvider>{children}</ObserveProvider>\n </AppMetricsRoot>\n );\n}\n\nObserveRoot.wrap = function wrap<P extends Record<string, unknown>>(\n Component: React.ComponentType<P>\n): React.ComponentType<P> {\n const Wrapped = (props: P) => (\n <ObserveRoot>\n <Component {...props} />\n </ObserveRoot>\n );\n Wrapped.displayName = `ObserveRoot(${Component.displayName || Component.name || 'Component'})`;\n return Wrapped;\n};\n"]}
|
package/build/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ExpoObserve from './module';
|
|
2
|
-
export { default as AppMetrics } from 'expo-app-metrics';
|
|
3
|
-
export { ObserveRoot } from './ObserveRoot';
|
|
4
|
-
ExpoObserve.setBundleDefaults({
|
|
5
|
-
environment: process.env.NODE_ENV ?? 'production',
|
|
6
|
-
isJsDev: !!__DEV__,
|
|
7
|
-
});
|
|
8
|
-
export { default } from './module';
|
|
9
|
-
export * from './types';
|
|
10
|
-
export { useObserve } from './useObserve';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,WAAW,CAAC,iBAAiB,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY;IACjD,OAAO,EAAE,CAAC,CAAC,OAAO;CACnB,CAAC,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import ExpoObserve from './module';\n\nexport { default as AppMetrics } from 'expo-app-metrics';\nexport { ObserveRoot } from './ObserveRoot';\n\nExpoObserve.setBundleDefaults({\n environment: process.env.NODE_ENV ?? 'production',\n isJsDev: !!__DEV__,\n});\n\nexport { default } from './module';\nexport * from './types';\nexport { useObserve } from './useObserve';\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { initListeners, isInitialized } from './init';
|
|
4
|
-
import { optionalRouter } from './router';
|
|
5
|
-
import { createRouterIntegrationStorage } from './storage';
|
|
6
|
-
export const ObserveRouterIntegrationContext = createContext(null);
|
|
7
|
-
export function ObserveRouterIntegrationProvider({ children }) {
|
|
8
|
-
const [storage] = useState(() => isInitialized() ? createRouterIntegrationStorage() : null);
|
|
9
|
-
const [listenersCleanup] = useState(() => {
|
|
10
|
-
if (!storage || !optionalRouter)
|
|
11
|
-
return;
|
|
12
|
-
return initListeners(storage, optionalRouter.unstable_navigationEvents);
|
|
13
|
-
});
|
|
14
|
-
const prevInitialized = useRef(isInitialized());
|
|
15
|
-
if (prevInitialized.current !== isInitialized()) {
|
|
16
|
-
throw new Error(`[expo-observe] Router integration was ${isInitialized() ? 'enabled' : 'disabled'} after application mounted. Call ExpoObserve.configure() before mounting AppMetricsRoot.`);
|
|
17
|
-
}
|
|
18
|
-
useEffect(() => listenersCleanup, [listenersCleanup]);
|
|
19
|
-
return (_jsx(ObserveRouterIntegrationContext.Provider, { value: storage, children: children }));
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=ObserveRouterIntegrationProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObserveRouterIntegrationProvider.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/ObserveRouterIntegrationProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAA0B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAiC,MAAM,WAAW,CAAC;AAE1F,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAkC,IAAI,CAAC,CAAC;AAEpG,MAAM,UAAU,gCAAgC,CAAC,EAAE,QAAQ,EAAqB;IAC9E,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAkC,GAAG,EAAE,CAC/D,aAAa,EAAE,CAAC,CAAC,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAC,IAAI,CAC1D,CAAC;IACF,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QACvC,IAAI,CAAC,OAAO,IAAI,CAAC,cAAc;YAAE,OAAO;QACxC,OAAO,aAAa,CAAC,OAAO,EAAE,cAAc,CAAC,yBAAyB,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;IAChD,IAAI,eAAe,CAAC,OAAO,KAAK,aAAa,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,yCAAyC,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,0FAA0F,CAC5K,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEtD,OAAO,CACL,KAAC,+BAA+B,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACrD,QAAQ,GACgC,CAC5C,CAAC;AACJ,CAAC","sourcesContent":["import { createContext, type PropsWithChildren, useEffect, useRef, useState } from 'react';\n\nimport { initListeners, isInitialized } from './init';\nimport { optionalRouter } from './router';\nimport { createRouterIntegrationStorage, type RouterIntegrationStorage } from './storage';\n\nexport const ObserveRouterIntegrationContext = createContext<RouterIntegrationStorage | null>(null);\n\nexport function ObserveRouterIntegrationProvider({ children }: PropsWithChildren) {\n const [storage] = useState<RouterIntegrationStorage | null>(() =>\n isInitialized() ? createRouterIntegrationStorage() : null\n );\n const [listenersCleanup] = useState(() => {\n if (!storage || !optionalRouter) return;\n return initListeners(storage, optionalRouter.unstable_navigationEvents);\n });\n\n const prevInitialized = useRef(isInitialized());\n if (prevInitialized.current !== isInitialized()) {\n throw new Error(\n `[expo-observe] Router integration was ${isInitialized() ? 'enabled' : 'disabled'} after application mounted. Call ExpoObserve.configure() before mounting AppMetricsRoot.`\n );\n }\n\n useEffect(() => listenersCleanup, [listenersCleanup]);\n\n return (\n <ObserveRouterIntegrationContext.Provider value={storage}>\n {children}\n </ObserveRouterIntegrationContext.Provider>\n );\n}\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { isRouterInstalled } from './router';
|
|
2
|
-
export { useObserveForRouter } from './useObserveForRouter';
|
|
3
|
-
export { initRouterIntegration } from './init';
|
|
4
|
-
export { ObserveRouterIntegrationProvider } from './ObserveRouterIntegrationProvider';
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["export { isRouterInstalled } from './router';\nexport { useObserveForRouter } from './useObserveForRouter';\nexport { initRouterIntegration } from './init';\nexport { ObserveRouterIntegrationProvider } from './ObserveRouterIntegrationProvider';\n"]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import AppMetrics from 'expo-app-metrics';
|
|
2
|
-
import { optionalRouter } from './router';
|
|
3
|
-
import {} from './storage';
|
|
4
|
-
// TODO(@ubax): split this module into `.native.ts` / `.web.ts` variants so the
|
|
5
|
-
// web bundle doesn't pull in `expo-app-metrics`' native bridge calls. The web
|
|
6
|
-
// version should be an explicit no-op (return a noop cleanup) rather than
|
|
7
|
-
// relying on the web stubs in `expo-app-metrics/module.web.ts`.
|
|
8
|
-
let initialized = false;
|
|
9
|
-
export const isInitialized = () => initialized;
|
|
10
|
-
export function initRouterIntegration() {
|
|
11
|
-
initialized = true;
|
|
12
|
-
optionalRouter?.unstable_navigationEvents.enable();
|
|
13
|
-
}
|
|
14
|
-
export function initListeners(storage, navigationEvents) {
|
|
15
|
-
const appLaunchTime = performance.now();
|
|
16
|
-
const cleanup = new Set();
|
|
17
|
-
const unsubscribeAction = navigationEvents.addListener('actionDispatched', (event) => {
|
|
18
|
-
// PRELOAD comes from router.prefetch() — a route warm-up, not a user
|
|
19
|
-
// navigation — so it must not seed dispatchTime.
|
|
20
|
-
if (event.actionType === 'PRELOAD')
|
|
21
|
-
return;
|
|
22
|
-
storage.pendingActions.push({
|
|
23
|
-
actionType: event.actionType,
|
|
24
|
-
dispatchTime: performance.now(),
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
cleanup.add(unsubscribeAction);
|
|
28
|
-
const unsubscribePreload = navigationEvents.addListener('pagePreloaded', (e) => {
|
|
29
|
-
// The screen rendered as part of a preload. Mark it as already rendered so
|
|
30
|
-
// the eventual `pageFocused` resolves to `warm_ttr` rather than `cold_ttr`.
|
|
31
|
-
storage.renderedScreensIds.add(e.screenId);
|
|
32
|
-
});
|
|
33
|
-
cleanup.add(unsubscribePreload);
|
|
34
|
-
const unsubscribeFocus = navigationEvents.addListener('pageFocused', async (e) => {
|
|
35
|
-
// Snapshot both clocks once so every metric written below is stamped with
|
|
36
|
-
// the moment the focus event fired, not the moment `addCustomMetricToSession`
|
|
37
|
-
// happens to run after the awaited `getMainSession()` round-trip.
|
|
38
|
-
const now = performance.now();
|
|
39
|
-
const timestamp = new Date().toISOString();
|
|
40
|
-
const isInitial = !storage.renderedScreensIds.has(e.screenId);
|
|
41
|
-
storage.renderedScreensIds.add(e.screenId);
|
|
42
|
-
const name = isInitial ? 'cold_ttr' : 'warm_ttr';
|
|
43
|
-
const mainSessionId = (await AppMetrics.getMainSession())?.id;
|
|
44
|
-
if (!mainSessionId) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (!storage.hasRecordedInitialTtr) {
|
|
48
|
-
// Stored in seconds to match the OTel `unit = "s"` convention
|
|
49
|
-
const appLaunchTtrSeconds = (now - appLaunchTime) / 1000;
|
|
50
|
-
storage.hasRecordedInitialTtr = true;
|
|
51
|
-
AppMetrics.addCustomMetricToSession({
|
|
52
|
-
sessionId: mainSessionId,
|
|
53
|
-
timestamp,
|
|
54
|
-
category: 'navigation',
|
|
55
|
-
name,
|
|
56
|
-
routeName: e.pathname,
|
|
57
|
-
value: appLaunchTtrSeconds,
|
|
58
|
-
params: { isAppLaunch: true, routeParams: e.params },
|
|
59
|
-
});
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (storage.pendingActions.length === 0)
|
|
63
|
-
return;
|
|
64
|
-
const last = storage.pendingActions[storage.pendingActions.length - 1];
|
|
65
|
-
if (last) {
|
|
66
|
-
const dispatchTime = last.dispatchTime;
|
|
67
|
-
storage.screenTimes[e.screenId] = {
|
|
68
|
-
...storage.screenTimes[e.screenId],
|
|
69
|
-
dispatchTime,
|
|
70
|
-
};
|
|
71
|
-
AppMetrics.addCustomMetricToSession({
|
|
72
|
-
sessionId: mainSessionId,
|
|
73
|
-
timestamp,
|
|
74
|
-
category: 'navigation',
|
|
75
|
-
name,
|
|
76
|
-
routeName: e.pathname,
|
|
77
|
-
value: (now - dispatchTime) / 1000,
|
|
78
|
-
params: { isAppLaunch: false, routeParams: e.params },
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
storage.pendingActions.length = 0;
|
|
82
|
-
});
|
|
83
|
-
cleanup.add(unsubscribeFocus);
|
|
84
|
-
return () => {
|
|
85
|
-
cleanup.forEach((c) => c());
|
|
86
|
-
cleanup.clear();
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=init.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/init.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAiC,MAAM,WAAW,CAAC;AAE1D,+EAA+E;AAC/E,8EAA8E;AAC9E,0EAA0E;AAC1E,gEAAgE;AAEhE,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC;AAE/C,MAAM,UAAU,qBAAqB;IACnC,WAAW,GAAG,IAAI,CAAC;IACnB,cAAc,EA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AAE,aAAa;gBACxB,SAAS;gBACT,QAAQ,EAAE,YAAY;gBACtB,IAAI;gBACJ,SAAS,EAAE,CAAC,CAAC,QAAQ;gBACrB,KAAK,EAAE,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,IAAI;gBAClC,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;aACtD,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAE9B,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5B,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import AppMetrics from 'expo-app-metrics';\n\nimport { optionalRouter } from './router';\nimport { type RouterIntegrationStorage } from './storage';\n\n// TODO(@ubax): split this module into `.native.ts` / `.web.ts` variants so the\n// web bundle doesn't pull in `expo-app-metrics`' native bridge calls. The web\n// version should be an explicit no-op (return a noop cleanup) rather than\n// relying on the web stubs in `expo-app-metrics/module.web.ts`.\n\nlet initialized = false;\n\nexport const isInitialized = () => initialized;\n\nexport function initRouterIntegration() {\n initialized = true;\n optionalRouter?.unstable_navigationEvents.enable();\n}\n\ntype NavigationEvents = NonNullable<typeof optionalRouter>['unstable_navigationEvents'];\n\nexport function initListeners(\n storage: RouterIntegrationStorage,\n navigationEvents: NavigationEvents\n): () => void {\n const appLaunchTime = performance.now();\n const cleanup = new Set<() => void>();\n\n const unsubscribeAction = navigationEvents.addListener('actionDispatched', (event) => {\n // PRELOAD comes from router.prefetch() — a route warm-up, not a user\n // navigation — so it must not seed dispatchTime.\n if (event.actionType === 'PRELOAD') return;\n storage.pendingActions.push({\n actionType: event.actionType,\n dispatchTime: performance.now(),\n });\n });\n cleanup.add(unsubscribeAction);\n\n const unsubscribePreload = navigationEvents.addListener('pagePreloaded', (e) => {\n // The screen rendered as part of a preload. Mark it as already rendered so\n // the eventual `pageFocused` resolves to `warm_ttr` rather than `cold_ttr`.\n storage.renderedScreensIds.add(e.screenId);\n });\n cleanup.add(unsubscribePreload);\n\n const unsubscribeFocus = navigationEvents.addListener('pageFocused', async (e) => {\n // Snapshot both clocks once so every metric written below is stamped with\n // the moment the focus event fired, not the moment `addCustomMetricToSession`\n // happens to run after the awaited `getMainSession()` round-trip.\n const now = performance.now();\n const timestamp = new Date().toISOString();\n const isInitial = !storage.renderedScreensIds.has(e.screenId);\n storage.renderedScreensIds.add(e.screenId);\n const name = isInitial ? 'cold_ttr' : 'warm_ttr';\n const mainSessionId = (await AppMetrics.getMainSession())?.id;\n if (!mainSessionId) {\n return;\n }\n\n if (!storage.hasRecordedInitialTtr) {\n // Stored in seconds to match the OTel `unit = \"s\"` convention\n const appLaunchTtrSeconds = (now - appLaunchTime) / 1000;\n storage.hasRecordedInitialTtr = true;\n AppMetrics.addCustomMetricToSession({\n sessionId: mainSessionId,\n timestamp,\n category: 'navigation',\n name,\n routeName: e.pathname,\n value: appLaunchTtrSeconds,\n params: { isAppLaunch: true, routeParams: e.params },\n });\n return;\n }\n\n if (storage.pendingActions.length === 0) return;\n\n const last = storage.pendingActions[storage.pendingActions.length - 1];\n if (last) {\n const dispatchTime = last.dispatchTime;\n storage.screenTimes[e.screenId] = {\n ...storage.screenTimes[e.screenId],\n dispatchTime,\n };\n\n AppMetrics.addCustomMetricToSession({\n sessionId: mainSessionId,\n timestamp,\n category: 'navigation',\n name,\n routeName: e.pathname,\n value: (now - dispatchTime) / 1000,\n params: { isAppLaunch: false, routeParams: e.params },\n });\n }\n storage.pendingActions.length = 0;\n });\n cleanup.add(unsubscribeFocus);\n\n return () => {\n cleanup.forEach((c) => c());\n cleanup.clear();\n };\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// expo-router is an optional peerDependency of expo-observe. When the host app
|
|
2
|
-
// hasn't installed it, `require` throws and the integration becomes a no-op.
|
|
3
|
-
let optionalRouter;
|
|
4
|
-
try {
|
|
5
|
-
optionalRouter = require('expo-router');
|
|
6
|
-
}
|
|
7
|
-
catch {
|
|
8
|
-
// expo-router not installed — integration disabled.
|
|
9
|
-
}
|
|
10
|
-
const isRouterInstalled = !!optionalRouter;
|
|
11
|
-
export { optionalRouter, isRouterInstalled };
|
|
12
|
-
//# sourceMappingURL=router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/router.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,IAAI,cAAwD,CAAC;AAC7D,IAAI,CAAC;IACH,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC1C,CAAC;AAAC,MAAM,CAAC;IACP,oDAAoD;AACtD,CAAC;AACD,MAAM,iBAAiB,GAAG,CAAC,CAAC,cAAc,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["// expo-router is an optional peerDependency of expo-observe. When the host app\n// hasn't installed it, `require` throws and the integration becomes a no-op.\nlet optionalRouter: typeof import('expo-router') | undefined;\ntry {\n optionalRouter = require('expo-router');\n} catch {\n // expo-router not installed — integration disabled.\n}\nconst isRouterInstalled = !!optionalRouter;\n\nexport { optionalRouter, isRouterInstalled };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/storage.ts"],"names":[],"mappings":"AA6BA,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,cAAc,EAAE,EAAE;QAClB,kBAAkB,EAAE,IAAI,GAAG,EAAE;QAC7B,qBAAqB,EAAE,KAAK;QAC5B,WAAW,EAAE,EAAE;QACf,qBAAqB,EAAE,IAAI,GAAG,EAAE;KACjC,CAAC;AACJ,CAAC","sourcesContent":["import type { ActionDispatchedEvent } from 'expo-router';\n\nexport interface ScreenTimes {\n dispatchTime: number;\n lastInteractiveCall?: number;\n}\n\nexport interface PendingAction {\n actionType: ActionDispatchedEvent['actionType'];\n dispatchTime: number;\n}\n\nexport interface RouterIntegrationStorage {\n /**\n * Actions dispatched, but not yet processed by the integration\n */\n pendingActions: PendingAction[];\n renderedScreensIds: Set<string>;\n /**\n * Wether the app had already recorded the first render of the screen\n */\n hasRecordedInitialTtr: boolean;\n /**\n * Times used to calculate spans from dispatch to certain event\n */\n screenTimes: Record<string, ScreenTimes>;\n interactiveScreensIds: Set<string>;\n}\n\nexport function createRouterIntegrationStorage(): RouterIntegrationStorage {\n return {\n pendingActions: [],\n renderedScreensIds: new Set(),\n hasRecordedInitialTtr: false,\n screenTimes: {},\n interactiveScreensIds: new Set(),\n };\n}\n"]}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import AppMetrics, {} from 'expo-app-metrics';
|
|
2
|
-
import { use, useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import { ObserveRouterIntegrationContext } from './ObserveRouterIntegrationProvider';
|
|
4
|
-
import { isInitialized } from './init';
|
|
5
|
-
import { optionalRouter } from './router';
|
|
6
|
-
export function useObserveForRouter() {
|
|
7
|
-
const storage = use(ObserveRouterIntegrationContext);
|
|
8
|
-
const isMounted = useRef(true);
|
|
9
|
-
const route = optionalRouter?.useRoute();
|
|
10
|
-
const navigation = optionalRouter?.useNavigation();
|
|
11
|
-
const routeInfo = optionalRouter?.useCurrentRouteInfo();
|
|
12
|
-
const { pathname, params: routeParams } = routeInfo ?? {};
|
|
13
|
-
const initializedAtMount = useRef(isInitialized());
|
|
14
|
-
if (initializedAtMount.current !== isInitialized()) {
|
|
15
|
-
throw new Error("[expo-observe] Router integration was toggled during a screen's lifecycle. " +
|
|
16
|
-
'Call `ExpoObserve.configure({ disableRouterIntegration })` once at startup before any screen mounts.');
|
|
17
|
-
}
|
|
18
|
-
const screenId = route?.key;
|
|
19
|
-
const prevScreenId = useRef(screenId);
|
|
20
|
-
if (prevScreenId.current !== screenId) {
|
|
21
|
-
console.warn('[expo-observe] Screen ID changed between renders. This is most likely an expo-router bug.');
|
|
22
|
-
prevScreenId.current = screenId;
|
|
23
|
-
}
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
// Strict-mode mounts the effect twice (mount → cleanup → re-mount). Without
|
|
26
|
-
// restoring isMounted here, the second mount would leave it permanently false
|
|
27
|
-
// and every markInteractive call would warn "unmounted screen".
|
|
28
|
-
isMounted.current = true;
|
|
29
|
-
return () => {
|
|
30
|
-
isMounted.current = false;
|
|
31
|
-
};
|
|
32
|
-
}, []);
|
|
33
|
-
const markInteractive = useCallback(async (attributes) => {
|
|
34
|
-
const now = performance.now();
|
|
35
|
-
const timestamp = new Date().toISOString();
|
|
36
|
-
if (!isMounted.current) {
|
|
37
|
-
console.warn('[expo-observe] Calling markInteractive on unmounted screen');
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (!screenId) {
|
|
41
|
-
console.warn('[expo-observe] No metadata available for the current screen. Make sure to call useObserve inside a screen component.');
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (navigation?.isFocused()) {
|
|
45
|
-
AppMetrics.markInteractive({
|
|
46
|
-
...(attributes ?? {}),
|
|
47
|
-
routeName: pathname,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (!storage) {
|
|
51
|
-
throw new Error('[expo-observe] markInteractive was called without an active ObserveProvider. Wrap your app in ObserveRoot from expo-observe.');
|
|
52
|
-
}
|
|
53
|
-
// Snapshot times BEFORE writing the new interactive timestamp so the
|
|
54
|
-
// duplicate-detection logic below sees the *previous* call, not this one.
|
|
55
|
-
const currentScreenData = storage.screenTimes[screenId];
|
|
56
|
-
storage.interactiveScreensIds.add(screenId);
|
|
57
|
-
if (storage.screenTimes[screenId]) {
|
|
58
|
-
storage.screenTimes[screenId] = {
|
|
59
|
-
...storage.screenTimes[screenId],
|
|
60
|
-
lastInteractiveCall: now,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
if (!currentScreenData?.dispatchTime)
|
|
64
|
-
return;
|
|
65
|
-
const previousInteractiveCall = currentScreenData.lastInteractiveCall;
|
|
66
|
-
const previousWasAfterDispatch = previousInteractiveCall != null && currentScreenData.dispatchTime < previousInteractiveCall;
|
|
67
|
-
if (previousWasAfterDispatch) {
|
|
68
|
-
// We only want to record interactive once per navigation
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
// Stored in seconds to match the OTel `unit = "s"` convention
|
|
72
|
-
const interactiveTimeSeconds = (now - currentScreenData.dispatchTime) / 1000;
|
|
73
|
-
const mainSessionId = (await AppMetrics.getMainSession())?.id;
|
|
74
|
-
// TODO(@ubax): we should count the time against the action which caused the first navigation
|
|
75
|
-
// and add a param stating if during that time there was any navigation
|
|
76
|
-
if (mainSessionId) {
|
|
77
|
-
await AppMetrics.addCustomMetricToSession({
|
|
78
|
-
sessionId: mainSessionId,
|
|
79
|
-
timestamp,
|
|
80
|
-
category: 'navigation',
|
|
81
|
-
// TODO(@ubax): Use segments.join here to get full routeName and pass pathname and params via params
|
|
82
|
-
routeName: pathname,
|
|
83
|
-
name: 'tti',
|
|
84
|
-
value: interactiveTimeSeconds,
|
|
85
|
-
params: { routeParams },
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}, [screenId, navigation, pathname, storage, routeParams]);
|
|
89
|
-
return initializedAtMount.current ? markInteractive : null;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=useObserveForRouter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useObserveForRouter.js","sourceRoot":"","sources":["../../../src/integrations/expo-router/useObserveForRouter.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAyB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,W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AmB,CAAC;QACtE,MAAM,wBAAwB,GAC5B,uBAAuB,IAAI,IAAI,IAAI,iBAAiB,CAAC,YAAY,GAAG,uBAAuB,CAAC;QAE9F,IAAI,wBAAwB,EAAE,CAAC;YAC7B,yDAAyD;YACzD,OAAO;QACT,CAAC;QAED,8DAA8D;QAC9D,MAAM,sBAAsB,GAAG,CAAC,GAAG,GAAG,iBAAiB,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;QAC7E,MAAM,aAAa,GAAG,CAAC,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9D,6FAA6F;QAC7F,uEAAuE;QACvE,IAAI,aAAa,EAAE,CAAC;YAClB,MAAM,UAAU,CAAC,wBAAwB,CAAC;gBACxC,SAAS,EAAE,aAAa;gBACxB,SAAS;gBACT,QAAQ,EAAE,YAAY;gBACtB,oGAAoG;gBACpG,SAAS,EAAE,QAAQ;gBACnB,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,sBAAsB;gBAC7B,MAAM,EAAE,EAAE,WAAW,EAAE;aACxB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,EACD,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CACvD,CAAC;IAEF,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC","sourcesContent":["import AppMetrics, { type MetricAttributes } from 'expo-app-metrics';\nimport { use, useCallback, useEffect, useRef } from 'react';\n\nimport { ObserveRouterIntegrationContext } from './ObserveRouterIntegrationProvider';\nimport { isInitialized } from './init';\nimport { optionalRouter } from './router';\n\ntype MarkInteractive = (typeof AppMetrics)['markInteractive'];\n\nexport function useObserveForRouter(): MarkInteractive | null {\n const storage = use(ObserveRouterIntegrationContext);\n const isMounted = useRef(true);\n const route = optionalRouter?.useRoute();\n const navigation = optionalRouter?.useNavigation();\n const routeInfo = optionalRouter?.useCurrentRouteInfo();\n const { pathname, params: routeParams } = routeInfo ?? {};\n\n const initializedAtMount = useRef(isInitialized());\n if (initializedAtMount.current !== isInitialized()) {\n throw new Error(\n \"[expo-observe] Router integration was toggled during a screen's lifecycle. \" +\n 'Call `ExpoObserve.configure({ disableRouterIntegration })` once at startup before any screen mounts.'\n );\n }\n\n const screenId = route?.key;\n const prevScreenId = useRef(screenId);\n if (prevScreenId.current !== screenId) {\n console.warn(\n '[expo-observe] Screen ID changed between renders. This is most likely an expo-router bug.'\n );\n prevScreenId.current = screenId;\n }\n\n useEffect(() => {\n // Strict-mode mounts the effect twice (mount → cleanup → re-mount). Without\n // restoring isMounted here, the second mount would leave it permanently false\n // and every markInteractive call would warn \"unmounted screen\".\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n const markInteractive = useCallback(\n async (attributes?: MetricAttributes) => {\n const now = performance.now();\n const timestamp = new Date().toISOString();\n if (!isMounted.current) {\n console.warn('[expo-observe] Calling markInteractive on unmounted screen');\n return;\n }\n if (!screenId) {\n console.warn(\n '[expo-observe] No metadata available for the current screen. Make sure to call useObserve inside a screen component.'\n );\n return;\n }\n if (navigation?.isFocused()) {\n AppMetrics.markInteractive({\n ...(attributes ?? {}),\n routeName: pathname,\n });\n }\n\n if (!storage) {\n throw new Error(\n '[expo-observe] markInteractive was called without an active ObserveProvider. Wrap your app in ObserveRoot from expo-observe.'\n );\n }\n\n // Snapshot times BEFORE writing the new interactive timestamp so the\n // duplicate-detection logic below sees the *previous* call, not this one.\n const currentScreenData = storage.screenTimes[screenId];\n\n storage.interactiveScreensIds.add(screenId);\n if (storage.screenTimes[screenId]) {\n storage.screenTimes[screenId] = {\n ...storage.screenTimes[screenId],\n lastInteractiveCall: now,\n };\n }\n\n if (!currentScreenData?.dispatchTime) return;\n\n const previousInteractiveCall = currentScreenData.lastInteractiveCall;\n const previousWasAfterDispatch =\n previousInteractiveCall != null && currentScreenData.dispatchTime < previousInteractiveCall;\n\n if (previousWasAfterDispatch) {\n // We only want to record interactive once per navigation\n return;\n }\n\n // Stored in seconds to match the OTel `unit = \"s\"` convention\n const interactiveTimeSeconds = (now - currentScreenData.dispatchTime) / 1000;\n const mainSessionId = (await AppMetrics.getMainSession())?.id;\n // TODO(@ubax): we should count the time against the action which caused the first navigation\n // and add a param stating if during that time there was any navigation\n if (mainSessionId) {\n await AppMetrics.addCustomMetricToSession({\n sessionId: mainSessionId,\n timestamp,\n category: 'navigation',\n // TODO(@ubax): Use segments.join here to get full routeName and pass pathname and params via params\n routeName: pathname,\n name: 'tti',\n value: interactiveTimeSeconds,\n params: { routeParams },\n });\n }\n },\n [screenId, navigation, pathname, storage, routeParams]\n );\n\n return initializedAtMount.current ? markInteractive : null;\n}\n"]}
|
package/build/module.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { requireNativeModule } from 'expo';
|
|
2
|
-
import { initRouterIntegration } from './integrations/expo-router/init';
|
|
3
|
-
import { isRouterInstalled } from './integrations/expo-router/router';
|
|
4
|
-
const native = requireNativeModule('ExpoObserve');
|
|
5
|
-
const ExpoObserve = new Proxy(native, {
|
|
6
|
-
get(target, prop, receiver) {
|
|
7
|
-
if (prop === 'configure') {
|
|
8
|
-
return (config) => {
|
|
9
|
-
const { disableRouterIntegration, ...nativeConfig } = config;
|
|
10
|
-
if (!disableRouterIntegration && isRouterInstalled) {
|
|
11
|
-
initRouterIntegration();
|
|
12
|
-
}
|
|
13
|
-
return target.configure(nativeConfig);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
return Reflect.get(target, prop, receiver);
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
export default ExpoObserve;
|
|
20
|
-
//# sourceMappingURL=module.js.map
|
package/build/module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,MAAM,MAAM,GAAG,mBAAmB,CAAwB,aAAa,CAAC,CAAC;AAEzE,MAAM,WAAW,GAA0B,IAAI,KAAK,CAAC,MAAM,EAAE;IAC3D,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;QACxB,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACzB,OAAO,CAAC,MAAc,EAAE,EAAE;gBACxB,MAAM,EAAE,wBAAwB,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;gBAC7D,IAAI,CAAC,wBAAwB,IAAI,iBAAiB,EAAE,CAAC;oBACnD,qBAAqB,EAAE,CAAC;gBAC1B,CAAC;gBACD,OAAO,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACxC,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { requireNativeModule } from 'expo';\n\nimport { initRouterIntegration } from './integrations/expo-router/init';\nimport { isRouterInstalled } from './integrations/expo-router/router';\nimport type { Config, ExpoObserveModuleType } from './types';\n\nconst native = requireNativeModule<ExpoObserveModuleType>('ExpoObserve');\n\nconst ExpoObserve: ExpoObserveModuleType = new Proxy(native, {\n get(target, prop, receiver) {\n if (prop === 'configure') {\n return (config: Config) => {\n const { disableRouterIntegration, ...nativeConfig } = config;\n if (!disableRouterIntegration && isRouterInstalled) {\n initRouterIntegration();\n }\n return target.configure(nativeConfig);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n});\n\nexport default ExpoObserve;\n"]}
|
package/build/module.web.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NativeModule, registerWebModule } from 'expo';
|
|
2
|
-
export * from './types';
|
|
3
|
-
class ExpoObserveModule extends NativeModule {
|
|
4
|
-
async dispatchEvents() { }
|
|
5
|
-
configure(config) { }
|
|
6
|
-
setBundleDefaults(defaults) { }
|
|
7
|
-
}
|
|
8
|
-
export default registerWebModule(ExpoObserveModule, 'ExpoObserve');
|
|
9
|
-
//# sourceMappingURL=module.web.js.map
|
package/build/module.web.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.web.js","sourceRoot":"","sources":["../src/module.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAIvD,cAAc,SAAS,CAAC;AAExB,MAAM,iBAAkB,SAAQ,YAAY;IAC1C,KAAK,CAAC,cAAc,KAAI,CAAC;IACzB,SAAS,CAAC,MAAc,IAAS,CAAC;IAClC,iBAAiB,CAAC,QAAmD,IAAS,CAAC;CAChF;AAED,eAAe,iBAAiB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { NativeModule, registerWebModule } from 'expo';\n\nimport type { Config, ExpoObserveModuleType } from './types';\n\nexport * from './types';\n\nclass ExpoObserveModule extends NativeModule implements ExpoObserveModuleType {\n async dispatchEvents() {}\n configure(config: Config): void {}\n setBundleDefaults(defaults: { environment: string; isJsDev: boolean }): void {}\n}\n\nexport default registerWebModule(ExpoObserveModule, 'ExpoObserve');\n"]}
|
package/build/types.js
DELETED
package/build/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type Config = {\n /**\n * The environment for observability events\n *\n * @default process.env.NODE_ENV\n */\n environment?: string;\n /**\n * Whether to dispatch observability events to the server.\n *\n * When `false`, any pending metrics are marked as sent without being dispatched\n * and no further metrics are dispatched until this is set back to `true`.\n *\n * @default true\n */\n dispatchingEnabled?: boolean;\n /**\n * Whether to dispatch metrics that were collected in a debug build of the host app.\n *\n * When `false`, metrics produced by debug builds are marked as sent without being dispatched.\n * When `true`, debug-build metrics are dispatched alongside release-build metrics.\n *\n * Has no effect on release builds.\n *\n * If `dispatchingEnabled` is `false` or this device is out-of-sample for `sampleRate`, nothing\n * is dispatched regardless of `dispatchInDebug`.\n *\n * @default false\n */\n dispatchInDebug?: boolean;\n /**\n * Fraction of installations that should dispatch metrics, in `[0, 1]`. Values outside that range\n * are clamped.\n *\n * The decision is **deterministic per installation** — a device is either permanently in-sample\n * or out-of-sample for a given rate, so the choice is stable across app launches.\n *\n * Interaction with `dispatchingEnabled`:\n * - If `dispatchingEnabled` is `false`, metrics are never dispatched\n * - If `dispatchingEnabled` is `true` (or unset), metrics are dispatched only when this device\n * is in-sample.\n *\n * > Note: Devices that end up out-of-sample drop pending metrics rather than accumulating them.\n *\n * @default undefined - metrics from all devices are sent\n */\n sampleRate?: number;\n /**\n * Disables the automatic `expo-router` integration that records TTR/TTI per screen.\n *\n * When `true` or `expo-router` is not installed, the router integration will not be used.\n *\n * @default false\n */\n disableRouterIntegration?: boolean;\n};\n\nexport interface ExpoObserveModuleType {\n dispatchEvents(): Promise<void>;\n /**\n * Configures observability settings.\n */\n configure(config: Config): void;\n /**\n * Pushes JS-bundle-derived facts (`process.env.NODE_ENV`, `__DEV__`) into native\n * storage. Called automatically once when the package is first imported; should\n * not be called by host apps directly.\n *\n * @internal\n */\n setBundleDefaults(defaults: { environment: string; isJsDev: boolean }): void;\n}\n"]}
|
package/build/useObserve.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import AppMetrics from 'expo-app-metrics';
|
|
2
|
-
import { useObserveForRouter } from './integrations/expo-router';
|
|
3
|
-
export function useObserve() {
|
|
4
|
-
const routerMarkInteractive = useObserveForRouter();
|
|
5
|
-
return {
|
|
6
|
-
markInteractive: routerMarkInteractive ?? AppMetrics.markInteractive,
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=useObserve.js.map
|
package/build/useObserve.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useObserve.js","sourceRoot":"","sources":["../src/useObserve.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,UAAU,UAAU;IACxB,MAAM,qBAAqB,GAAG,mBAAmB,EAAE,CAAC;IACpD,OAAO;QACL,eAAe,EAAE,qBAAqB,IAAI,UAAU,CAAC,eAAe;KACrE,CAAC;AACJ,CAAC","sourcesContent":["import AppMetrics from 'expo-app-metrics';\n\nimport { useObserveForRouter } from './integrations/expo-router';\n\nexport function useObserve() {\n const routerMarkInteractive = useObserveForRouter();\n return {\n markInteractive: routerMarkInteractive ?? AppMetrics.markInteractive,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9d37f4e437a1184d84f51279d8dd5cdc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2dcdac1b44e90f5d16d9b81dab8d1149c15f12c6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f637193ac2d90191cbb8b523cde9988580eadba459afac1190b37d7dd00be469
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f946daf8d14567f7b3e7976ee5a5fccdbf166653715ad94fbd45d5feb5adb669c3cbf419cc9deae0d5e0057e434fed4f6ddb4c43a696c207745321963d008a25
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b903c7b3442f994436c586c19d824c1d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d87167e5c46bd2ed8ef986effeae582cb78a465e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cdf99ff3a945d9ad5f9c18d9f737d9097be1163a8e2a2f8647ff9c426e846dd6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c7c266e9429e5685ba21901c447323157abfa411d94d279782f8502fb02ea88d1e387074e96d82b1ec352105b3a7acd47d61a0dda7121b090901905becb05b8b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4aa33f01b4e04fd206ad797181743d06
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
43af7a3ca82db0379709454c40130f618b687956
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3163a69e327182a4580d94667ef33fe6486c8129b2a0329a582b34ce0a7be29c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bf8b6522bbfa605824bc3cffe394543ec3b6bd360eff80de235ba01d7fea22295d9568e369be02d341a78524c3284baa96be838edad2015fca79de887b828b00
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fbfe2a71888fea9dc4dbadeccf60553d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c4bd6c42be8ec9ae07c073f5b4305b2bd8b93f55
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e261cb703fb89083d51f837062cd3e7cc5677a4e3d702f8212490a20d8eaffb3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
80552ab04905c7320f07733b99bbd881a9eb779664c94eae06470a0344c23324f19f97ef0bf9fd38614f2d70f1158267c5b9a9cf72bc7d9d5f1f1d8670f0c810
|