expo 56.0.0-preview.9 → 56.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.
Files changed (33) hide show
  1. package/android/build.gradle +5 -2
  2. package/android/proguard-rules.pro +3 -0
  3. package/android/src/main/java/expo/modules/fetch/CompressionInterceptor.kt +78 -0
  4. package/android/src/main/java/expo/modules/fetch/ExpoFetchModule.kt +1 -0
  5. package/android/src/test/java/expo/modules/fetch/CompressionInterceptorTest.kt +171 -0
  6. package/build/Expo.d.ts +2 -0
  7. package/build/Expo.d.ts.map +1 -1
  8. package/build/launch/AppRegistry.web.d.ts.map +1 -1
  9. package/build/winter/AbortSignal.d.ts +4 -0
  10. package/build/winter/AbortSignal.d.ts.map +1 -0
  11. package/build/winter/DOMException.d.ts +17 -0
  12. package/build/winter/DOMException.d.ts.map +1 -0
  13. package/build/winter/fetch/FetchResponse.d.ts +14 -5
  14. package/build/winter/fetch/FetchResponse.d.ts.map +1 -1
  15. package/build/winter/fetch/NativeRequest.d.ts +6 -6
  16. package/build/winter/fetch/NativeRequest.d.ts.map +1 -1
  17. package/build/winter/fetch/fetch.d.ts.map +1 -1
  18. package/bundledNativeModules.json +53 -53
  19. package/ios/Fetch/NativeResponse.swift +5 -5
  20. package/package.json +20 -21
  21. package/src/Expo.ts +9 -0
  22. package/src/async-require/messageSocket.ts +4 -0
  23. package/src/launch/AppRegistry.web.tsx +10 -6
  24. package/src/winter/AbortSignal.ts +132 -0
  25. package/src/winter/DOMException.ts +100 -0
  26. package/src/winter/__tests__/AbortSignal.test.native.ts +163 -0
  27. package/src/winter/__tests__/DOMException.test.native.ts +103 -0
  28. package/src/winter/fetch/FetchResponse.ts +291 -47
  29. package/src/winter/fetch/NativeRequest.ts +6 -6
  30. package/src/winter/fetch/__tests__/FetchResponse-test.ts +239 -1
  31. package/src/winter/fetch/fetch.ts +27 -4
  32. package/src/winter/runtime.native.ts +4 -0
  33. package/template.tgz +0 -0
@@ -10,7 +10,7 @@ buildscript {
10
10
  }
11
11
 
12
12
  group = 'host.exp.exponent'
13
- version = '56.0.0-preview.9'
13
+ version = '56.0.1'
14
14
 
15
15
  expoModule {
16
16
  // We can't prebuild the module because it depends on the generated files.
@@ -21,7 +21,7 @@ android {
21
21
  namespace "expo.core"
22
22
  defaultConfig {
23
23
  versionCode 1
24
- versionName "56.0.0-preview.9"
24
+ versionName "56.0.1"
25
25
  consumerProguardFiles("proguard-rules.pro")
26
26
  }
27
27
  testOptions {
@@ -44,6 +44,9 @@ android {
44
44
 
45
45
  dependencies { dependencyHandler ->
46
46
  implementation 'com.facebook.react:react-android'
47
+ implementation 'com.squareup.okio:okio:3.16.0'
48
+ implementation 'com.squareup.zstd:zstd-kmp-okio:0.4.0'
49
+ implementation 'org.brotli:dec:0.1.2'
47
50
 
48
51
  testImplementation 'junit:junit:4.13.2'
49
52
  testImplementation 'io.mockk:mockk:1.13.5'
@@ -29,3 +29,6 @@
29
29
  -keep class com.facebook.react.views.view.WindowUtilKt {
30
30
  *;
31
31
  }
32
+
33
+ # Workaround zstd-kmp R8 issue - https://github.com/square/zstd-kmp/issues/108
34
+ -keep class com.squareup.zstd.** { *; }
@@ -0,0 +1,78 @@
1
+ // Copyright 2015-present 650 Industries. All rights reserved.
2
+ /*
3
+ * Copyright (C) 2025 Square, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ package expo.modules.fetch
19
+
20
+ import com.squareup.zstd.okio.zstdDecompress
21
+ import okhttp3.Interceptor
22
+ import okhttp3.Response
23
+ import okhttp3.ResponseBody.Companion.asResponseBody
24
+ import okhttp3.internal.http.promisesBody
25
+ import okio.GzipSource
26
+ import okio.buffer
27
+ import okio.source
28
+ import org.brotli.dec.BrotliInputStream
29
+
30
+ /**
31
+ * Transparent compressed response support for Zstandard, Brotli and Gzip.
32
+ *
33
+ * Adds `Accept-Encoding: zstd, br, gzip` to outgoing requests when the caller has not set the
34
+ * header, and decompresses (and strips `Content-Encoding`/`Content-Length` from) responses
35
+ * encoded with any of the three.
36
+ *
37
+ * Modeled after `okhttp3.brotli.BrotliInterceptor`; this replaces the transparent gzip
38
+ * compression in okhttp's `BridgeInterceptor`. Callers who set their own `Accept-Encoding`
39
+ * opt out of automatic decompression.
40
+ */
41
+ object CompressionInterceptor : Interceptor {
42
+ override fun intercept(chain: Interceptor.Chain): Response =
43
+ if (chain.request().header("Accept-Encoding") == null) {
44
+ val request = chain.request().newBuilder()
45
+ .header("Accept-Encoding", "zstd, br, gzip")
46
+ .build()
47
+
48
+ val response = chain.proceed(request)
49
+
50
+ uncompress(response)
51
+ } else {
52
+ chain.proceed(chain.request())
53
+ }
54
+
55
+ internal fun uncompress(response: Response): Response {
56
+ if (!response.promisesBody()) {
57
+ return response
58
+ }
59
+ val body = response.body ?: return response
60
+ val encoding = response.header("Content-Encoding") ?: return response
61
+
62
+ val decompressedSource = when {
63
+ encoding.equals("zstd", ignoreCase = true) ->
64
+ body.source().zstdDecompress().buffer()
65
+ encoding.equals("br", ignoreCase = true) ->
66
+ BrotliInputStream(body.source().inputStream()).source().buffer()
67
+ encoding.equals("gzip", ignoreCase = true) ->
68
+ GzipSource(body.source()).buffer()
69
+ else -> return response
70
+ }
71
+
72
+ return response.newBuilder()
73
+ .removeHeader("Content-Encoding")
74
+ .removeHeader("Content-Length")
75
+ .body(decompressedSource.asResponseBody(body.contentType(), -1))
76
+ .build()
77
+ }
78
+ }
@@ -26,6 +26,7 @@ class ExpoFetchModule : Module() {
26
26
  OkHttpClientProvider.createClient(reactContext)
27
27
  .newBuilder()
28
28
  .addInterceptor(OkHttpFileUrlInterceptor(reactContext))
29
+ .addInterceptor(CompressionInterceptor)
29
30
  .build()
30
31
  }
31
32
  private val cookieHandler by lazy { ForwardingCookieHandler(reactContext) }
@@ -0,0 +1,171 @@
1
+ // Copyright 2015-present 650 Industries. All rights reserved.
2
+
3
+ package expo.modules.fetch
4
+
5
+ import com.google.common.truth.Truth.assertThat
6
+ import io.mockk.every
7
+ import io.mockk.mockk
8
+ import io.mockk.slot
9
+ import okhttp3.Interceptor
10
+ import okhttp3.MediaType.Companion.toMediaType
11
+ import okhttp3.Protocol
12
+ import okhttp3.Request
13
+ import okhttp3.Response
14
+ import okhttp3.ResponseBody.Companion.toResponseBody
15
+ import okio.Buffer
16
+ import okio.GzipSink
17
+ import okio.buffer
18
+ import org.junit.Test
19
+
20
+ class CompressionInterceptorTest {
21
+ // brotli of "hello world" produced offline with `printf 'hello world' | brotli`.
22
+ // Avoids pulling in a brotli encoder just for this test; the decoder side is what we exercise.
23
+ private val brotliHelloWorld = hexToBytes("0f058068656c6c6f20776f726c6403")
24
+
25
+ // region intercept() — Accept-Encoding behavior
26
+
27
+ @Test
28
+ fun `should add zstd, br, gzip Accept-Encoding when caller sets none`() {
29
+ val capturedRequest = interceptAndCapture(initialAcceptEncoding = null)
30
+
31
+ assertThat(capturedRequest.header("Accept-Encoding")).isEqualTo("zstd, br, gzip")
32
+ }
33
+
34
+ @Test
35
+ fun `should pass through unchanged when caller sets Accept-Encoding`() {
36
+ val capturedRequest = interceptAndCapture(initialAcceptEncoding = "gzip")
37
+
38
+ assertThat(capturedRequest.header("Accept-Encoding")).isEqualTo("gzip")
39
+ }
40
+
41
+ // endregion
42
+
43
+ // region uncompress() — decompression
44
+
45
+ @Test
46
+ fun `should decompress gzip response and strip Content-Encoding and Content-Length headers`() {
47
+ val payload = "hello world"
48
+ val response = encodedResponse(payload.toByteArray().gzipCompressed(), "gzip")
49
+
50
+ val uncompressed = CompressionInterceptor.uncompress(response)
51
+
52
+ assertThat(uncompressed.body!!.string()).isEqualTo(payload)
53
+ assertThat(uncompressed.header("Content-Encoding")).isNull()
54
+ assertThat(uncompressed.header("Content-Length")).isNull()
55
+ }
56
+
57
+ @Test
58
+ fun `should decompress br response and strip Content-Encoding and Content-Length headers`() {
59
+ val response = encodedResponse(brotliHelloWorld, "br")
60
+
61
+ val uncompressed = CompressionInterceptor.uncompress(response)
62
+
63
+ assertThat(uncompressed.body!!.string()).isEqualTo("hello world")
64
+ assertThat(uncompressed.header("Content-Encoding")).isNull()
65
+ assertThat(uncompressed.header("Content-Length")).isNull()
66
+ }
67
+
68
+ @Test
69
+ fun `should match Content-Encoding case-insensitively`() {
70
+ val payload = "hello world"
71
+ val response = encodedResponse(payload.toByteArray().gzipCompressed(), "GZIP")
72
+
73
+ val uncompressed = CompressionInterceptor.uncompress(response)
74
+
75
+ assertThat(uncompressed.body!!.string()).isEqualTo(payload)
76
+ }
77
+
78
+ // endregion
79
+
80
+ // region uncompress() — pass-through cases
81
+
82
+ @Test
83
+ fun `should leave response unchanged when Content-Encoding is absent`() {
84
+ val response = baseResponseBuilder()
85
+ .body("plain".toResponseBody("text/plain".toMediaType()))
86
+ .build()
87
+
88
+ val result = CompressionInterceptor.uncompress(response)
89
+
90
+ assertThat(result).isSameInstanceAs(response)
91
+ }
92
+
93
+ @Test
94
+ fun `should leave response unchanged when Content-Encoding is unknown`() {
95
+ val response = encodedResponse("noop".toByteArray(), "lz4")
96
+
97
+ val result = CompressionInterceptor.uncompress(response)
98
+
99
+ assertThat(result).isSameInstanceAs(response)
100
+ }
101
+
102
+ @Test
103
+ fun `should leave 204 response untouched`() {
104
+ val response = baseResponseBuilder()
105
+ .code(204)
106
+ .message("No Content")
107
+ .body("".toResponseBody())
108
+ .header("Content-Encoding", "gzip")
109
+ .build()
110
+
111
+ val result = CompressionInterceptor.uncompress(response)
112
+
113
+ assertThat(result).isSameInstanceAs(response)
114
+ }
115
+
116
+ // endregion
117
+
118
+ // region helpers
119
+
120
+ private fun interceptAndCapture(initialAcceptEncoding: String?): Request {
121
+ val builder = Request.Builder().url("https://example.test/")
122
+ if (initialAcceptEncoding != null) {
123
+ builder.header("Accept-Encoding", initialAcceptEncoding)
124
+ }
125
+ val request = builder.build()
126
+
127
+ val chain = mockk<Interceptor.Chain>()
128
+ every { chain.request() } returns request
129
+
130
+ val captured = slot<Request>()
131
+ every { chain.proceed(capture(captured)) } answers {
132
+ Response.Builder()
133
+ .request(captured.captured)
134
+ .protocol(Protocol.HTTP_1_1)
135
+ .code(200)
136
+ .message("OK")
137
+ .body("".toResponseBody())
138
+ .build()
139
+ }
140
+
141
+ CompressionInterceptor.intercept(chain)
142
+ return captured.captured
143
+ }
144
+
145
+ private fun baseResponseBuilder(): Response.Builder =
146
+ Response.Builder()
147
+ .request(Request.Builder().url("https://example.test/").build())
148
+ .protocol(Protocol.HTTP_1_1)
149
+ .code(200)
150
+ .message("OK")
151
+
152
+ private fun encodedResponse(body: ByteArray, encoding: String): Response =
153
+ baseResponseBuilder()
154
+ .header("Content-Encoding", encoding)
155
+ .header("Content-Length", body.size.toString())
156
+ .body(body.toResponseBody("application/octet-stream".toMediaType()))
157
+ .build()
158
+
159
+ private fun ByteArray.gzipCompressed(): ByteArray {
160
+ val sink = Buffer()
161
+ GzipSink(sink).buffer().use { it.write(this) }
162
+ return sink.readByteArray()
163
+ }
164
+
165
+ private fun hexToBytes(hex: String): ByteArray =
166
+ ByteArray(hex.length / 2) { i ->
167
+ hex.substring(i * 2, i * 2 + 2).toInt(16).toByte()
168
+ }
169
+
170
+ // endregion
171
+ }
package/build/Expo.d.ts CHANGED
@@ -12,5 +12,7 @@ EventEmitter as EventEmitterType,
12
12
  NativeModule as NativeModuleType,
13
13
  /** @deprecated Move to `SharedObject` with a type-only import instead */
14
14
  SharedObject as SharedObjectType, } from 'expo-modules-core/types';
15
+ export { PermissionStatus, type PermissionExpiration, type PermissionResponse, type PermissionHookOptions, } from 'expo-modules-core';
16
+ export { createPermissionHook } from 'expo-modules-core';
15
17
  export { useEvent, useEventListener } from './hooks/useEvent';
16
18
  //# sourceMappingURL=Expo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EAGZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,IAAI,iBAAiB,EAC7C,iBAAiB,EACjB,cAAc,EAGd,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACV,sEAAsE;AACtE,SAAS,IAAI,aAAa;AAC1B,yEAAyE;AACzE,YAAY,IAAI,gBAAgB;AAChC,yEAAyE;AACzE,YAAY,IAAI,gBAAgB;AAChC,yEAAyE;AACzE,YAAY,IAAI,gBAAgB,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EAGZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,IAAI,iBAAiB,E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MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,SAAS,CAAA;CAAE,CASrF;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,GAAG,CAmBzE;;;;;;AAED,wBAAqE"}
1
+ {"version":3,"file":"AppRegistry.web.d.ts","sourceRoot":"","sources":["../../src/launch/AppRegistry.web.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,KAAK,iBAAiB,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;AASlD,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAsBF,iBAAS,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,MAAM,CAiDvF;AAED,iBAAS,cAAc,CACrB,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,aAAa,GAC5B;IAAE,OAAO,EAAE,SAAS,CAAC;IAAC,eAAe,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,SAAS,CAAA;CAAE,CASrF;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,GAAG,CAuBzE;;;;;;AAED,wBAAqE"}
@@ -0,0 +1,4 @@
1
+ type AbortSignalConstructor = typeof AbortSignal;
2
+ export declare function installAbortSignalPatch(abortSignal: AbortSignalConstructor): AbortSignalConstructor;
3
+ export {};
4
+ //# sourceMappingURL=AbortSignal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AbortSignal.d.ts","sourceRoot":"","sources":["../../src/winter/AbortSignal.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,GAAG,OAAO,WAAW,CAAC;AAKjD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,sBAAsB,GAClC,sBAAsB,CASxB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright © 2026 650 Industries.
3
+ * Copyright © Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ * Forked from React Native's DOMException implementation
9
+ * https://github.com/facebook/react-native/blob/f5bd86c31105bb6a994acb03c8149bd7ee03dac6/packages/react-native/src/private/webapis/errors/DOMException.js
10
+ */
11
+ export declare class DOMException extends Error {
12
+ #private;
13
+ constructor(message?: string, name?: string);
14
+ get name(): string;
15
+ get code(): number;
16
+ }
17
+ //# sourceMappingURL=DOMException.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DOMException.d.ts","sourceRoot":"","sources":["../../src/winter/DOMException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuDH,qBAAa,YAAa,SAAQ,KAAK;;gBAIzB,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAY3C,IAAa,IAAI,IAAI,MAAM,CAE1B;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
@@ -1,20 +1,26 @@
1
- import type { NativeResponse } from './NativeRequest';
1
+ import type { NativeHeadersType, NativeResponse } from './NativeRequest';
2
2
  declare const ConcreteNativeResponse: typeof NativeResponse;
3
3
  export type AbortSubscriptionCleanupFunction = () => void;
4
4
  type RNFormData = Awaited<ReturnType<globalThis.Response['formData']>>;
5
5
  type UniversalFormData = globalThis.FormData & RNFormData;
6
+ declare const stateKey: unique symbol;
6
7
  /**
7
8
  * A response implementation for the `fetch.Response` API.
8
9
  */
9
10
  export declare class FetchResponse extends ConcreteNativeResponse implements Response {
10
11
  private readonly abortCleanupFunction;
11
- private streamingState;
12
- private bodyStream;
12
+ private [stateKey];
13
13
  constructor(abortCleanupFunction: AbortSubscriptionCleanupFunction);
14
+ get _rawHeaders(): NativeHeadersType;
15
+ get status(): number;
16
+ get statusText(): string;
17
+ get url(): string;
18
+ get redirected(): boolean;
19
+ get type(): 'default';
14
20
  get body(): ReadableStream<Uint8Array<ArrayBuffer>> | null;
21
+ get bodyUsed(): boolean;
15
22
  get headers(): Headers;
16
23
  get ok(): boolean;
17
- readonly type = "default";
18
24
  /**
19
25
  * This method is not currently supported by react-native's Blob constructor.
20
26
  */
@@ -22,9 +28,12 @@ export declare class FetchResponse extends ConcreteNativeResponse implements Res
22
28
  formData(): Promise<UniversalFormData>;
23
29
  json(): Promise<any>;
24
30
  bytes(): Promise<Uint8Array<ArrayBuffer>>;
31
+ arrayBuffer(): Promise<ArrayBuffer>;
32
+ text(): Promise<string>;
25
33
  toString(): string;
26
34
  toJSON(): object;
27
- clone(): Response;
35
+ clone(): FetchResponse;
36
+ private checkBodyUsedError;
28
37
  private finalize;
29
38
  }
30
39
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"FetchResponse.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/FetchResponse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,QAAA,MAAM,sBAAsB,EAAqC,OAAO,cAAc,CAAC;AACvF,MAAM,MAAM,gCAAgC,GAAG,MAAM,IAAI,CAAC;AAI1D,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACvE,KAAK,iBAAiB,GAAG,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC;AAE1D;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAuB,YAAW,QAAQ;IAI/D,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IA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,EAAE,gCAAgC;IAQnF,IAAa,WAAW,IAAI,iBAAiB,CAE5C;IAED,IAAa,MAAM,IAAI,MAAM,CAE5B;IAED,IAAa,UAAU,IAAI,MAAM,CAEhC;IAED,IAAa,GAAG,IAAI,MAAM,CAEzB;IAED,IAAa,UAAU,IAAI,OAAO,CAEjC;IAED,IAAI,IAAI,IAAI,SAAS,CAEpB;IAED,IAAI,IAAI,IAAI,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAoEzD;IAED,IAAa,QAAQ,IAAI,OAAO,CAE/B;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,EAAE,IAAI,OAAO,CAEhB;IAED;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMrB,QAAQ,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAgBtC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAMpB,KAAK,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAKhC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IAanC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAatC,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,MAAM;IAShB,KAAK,IAAI,aAAa;IAsCtB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,QAAQ,CAQd;CACH"}
@@ -17,12 +17,12 @@ export type NativeResponseEvents = {
17
17
  readyForJSFinalization(): void;
18
18
  };
19
19
  export declare class NativeResponse extends SharedObject<NativeResponseEvents> {
20
- readonly bodyUsed: boolean;
21
- readonly _rawHeaders: NativeHeadersType;
22
- readonly status: number;
23
- readonly statusText: string;
24
- readonly url: string;
25
- readonly redirected: boolean;
20
+ get bodyUsed(): boolean;
21
+ get _rawHeaders(): NativeHeadersType;
22
+ get status(): number;
23
+ get statusText(): string;
24
+ get url(): string;
25
+ get redirected(): boolean;
26
26
  startStreaming(): Promise<Uint8Array<ArrayBuffer> | null>;
27
27
  cancelStreaming(reason: string): void;
28
28
  arrayBuffer(): Promise<ArrayBuffer>;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRequest.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/NativeRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IAC9C,KAAK,CACV,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,iBAAiB,EAC9B,WAAW,EAAE,UAAU,GAAG,IAAI,GAC7B,OAAO,CAAC,cAAc,CAAC;IACnB,MAAM,IAAI,IAAI;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/C,WAAW,IAAI,IAAI,CAAC;IACpB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,sBAAsB,IAAI,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY,CAAC,oBAAoB,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UA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AM,IAAI,MAAM,CAAC;IACrB,IAAI,UAAU,IAAI,MAAM,CAAC;IACzB,IAAI,GAAG,IAAI,MAAM,CAAC;IAClB,IAAI,UAAU,IAAI,OAAO,CAAC;IAC1B,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IACzD,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IACrC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IACnC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAyC,MAAM,iBAAiB,CAAC;AAQvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAOxE,wBAAsB,KAAK,CACzB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,gBAAgB,EACtC,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAiDxB"}
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/winter/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAyC,MAAM,iBAAiB,CAAC;AAQvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBxE,wBAAsB,KAAK,CACzB,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,gBAAgB,EACtC,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAuDxB"}
@@ -1,8 +1,8 @@
1
1
  {
2
- "@expo/fingerprint": "~0.17.4",
3
- "@expo/metro-runtime": "~56.0.6",
2
+ "@expo/fingerprint": "~0.19.0",
3
+ "@expo/metro-runtime": "~56.0.10",
4
4
  "@expo/vector-icons": "^15.0.2",
5
- "@expo/ui": "~56.0.5",
5
+ "@expo/ui": "~56.0.10",
6
6
  "@react-native-async-storage/async-storage": "2.2.0",
7
7
  "@react-native-community/datetimepicker": "9.1.0",
8
8
  "@react-native-masked-view/masked-view": "0.3.2",
@@ -12,89 +12,89 @@
12
12
  "@react-native-picker/picker": "2.11.4",
13
13
  "@react-native-segmented-control/segmented-control": "2.5.7",
14
14
  "@stripe/stripe-react-native": "0.64.0",
15
- "eslint-config-expo": "~56.0.2",
15
+ "eslint-config-expo": "~56.0.4",
16
16
  "expo-analytics-amplitude": "~11.3.0",
17
17
  "expo-app-auth": "~11.1.0",
18
18
  "expo-app-loader-provider": "~8.0.0",
19
- "expo-app-metrics": "~56.0.6",
19
+ "expo-app-metrics": "~56.0.11",
20
20
  "expo-apple-authentication": "~56.0.3",
21
21
  "expo-application": "~56.0.3",
22
- "expo-asset": "~56.0.7",
23
- "expo-audio": "~56.0.4",
24
- "expo-auth-session": "~56.0.5",
25
- "expo-background-fetch": "~56.0.6",
26
- "expo-background-task": "~56.0.6",
27
- "expo-battery": "~56.0.3",
22
+ "expo-asset": "~56.0.12",
23
+ "expo-audio": "~56.0.8",
24
+ "expo-auth-session": "~56.0.10",
25
+ "expo-background-fetch": "~56.0.11",
26
+ "expo-background-task": "~56.0.11",
27
+ "expo-battery": "~56.0.4",
28
28
  "expo-blur": "~56.0.3",
29
- "expo-brightness": "~56.0.3",
30
- "expo-brownfield": "~56.0.6",
31
- "expo-build-properties": "~56.0.6",
32
- "expo-calendar": "~56.0.4",
33
- "expo-camera": "~56.0.3",
34
- "expo-cellular": "~56.0.3",
29
+ "expo-brightness": "~56.0.4",
30
+ "expo-brownfield": "~56.0.12",
31
+ "expo-build-properties": "~56.0.12",
32
+ "expo-calendar": "~56.0.7",
33
+ "expo-camera": "~56.0.5",
34
+ "expo-cellular": "~56.0.4",
35
35
  "expo-checkbox": "~56.0.1",
36
36
  "expo-clipboard": "~56.0.3",
37
- "expo-constants": "~56.0.7",
38
- "expo-contacts": "~56.0.3",
37
+ "expo-constants": "~56.0.13",
38
+ "expo-contacts": "~56.0.6",
39
39
  "expo-crypto": "~56.0.3",
40
- "expo-dev-client": "~56.0.6",
40
+ "expo-dev-client": "~56.0.13",
41
41
  "expo-device": "~56.0.4",
42
42
  "expo-document-picker": "~56.0.3",
43
- "expo-file-system": "~56.0.4",
44
- "expo-font": "~56.0.3",
45
- "expo-gl": "~56.0.3",
43
+ "expo-file-system": "~56.0.7",
44
+ "expo-font": "~56.0.5",
45
+ "expo-gl": "~56.0.5",
46
46
  "expo-glass-effect": "~56.0.4",
47
47
  "expo-google-app-auth": "~8.3.0",
48
48
  "expo-haptics": "~56.0.3",
49
- "expo-image": "~56.0.4",
49
+ "expo-image": "~56.0.6",
50
50
  "expo-image-loader": "~56.0.3",
51
- "expo-image-manipulator": "~56.0.6",
52
- "expo-image-picker": "~56.0.6",
53
- "expo-intent-launcher": "~56.0.3",
54
- "expo-insights": "~56.0.6",
51
+ "expo-image-manipulator": "~56.0.11",
52
+ "expo-image-picker": "~56.0.11",
53
+ "expo-intent-launcher": "~56.0.4",
54
+ "expo-insights": "~56.0.11",
55
55
  "expo-keep-awake": "~56.0.3",
56
56
  "expo-linear-gradient": "~56.0.4",
57
- "expo-linking": "~56.0.5",
57
+ "expo-linking": "~56.0.10",
58
58
  "expo-local-authentication": "~56.0.3",
59
- "expo-localization": "~56.0.3",
60
- "expo-location": "~56.0.6",
59
+ "expo-localization": "~56.0.5",
60
+ "expo-location": "~56.0.11",
61
61
  "expo-mail-composer": "~56.0.3",
62
- "expo-manifests": "~56.0.2",
63
- "expo-maps": "~56.0.4",
62
+ "expo-manifests": "~56.0.4",
63
+ "expo-maps": "~56.0.5",
64
64
  "expo-mcp": "~0.2.1",
65
- "expo-media-library": "~56.0.3",
65
+ "expo-media-library": "~56.0.5",
66
66
  "expo-mesh-gradient": "~56.0.3",
67
- "expo-module-template": "~56.0.4",
68
- "expo-modules-core": "~56.0.6",
67
+ "expo-module-template": "~56.0.8",
68
+ "expo-modules-core": "~56.0.11",
69
69
  "expo-navigation-bar": "~56.0.3",
70
- "expo-network": "~56.0.3",
71
- "expo-notifications": "~56.0.6",
72
- "expo-observe": "~56.0.6",
70
+ "expo-network": "~56.0.4",
71
+ "expo-notifications": "~56.0.11",
72
+ "expo-observe": "~56.0.12",
73
73
  "expo-print": "~56.0.3",
74
74
  "expo-live-photo": "~56.0.3",
75
- "expo-router": "~56.1.3",
76
- "expo-screen-capture": "~56.0.3",
77
- "expo-screen-orientation": "~56.0.3",
75
+ "expo-router": "~56.2.3",
76
+ "expo-screen-capture": "~56.0.4",
77
+ "expo-screen-orientation": "~56.0.4",
78
78
  "expo-secure-store": "~56.0.3",
79
- "expo-sensors": "~56.0.3",
80
- "expo-server": "~56.0.1",
81
- "expo-sharing": "~56.0.6",
79
+ "expo-sensors": "~56.0.4",
80
+ "expo-server": "~56.0.4",
81
+ "expo-sharing": "~56.0.11",
82
82
  "expo-sms": "~56.0.3",
83
83
  "expo-speech": "~56.0.3",
84
- "expo-splash-screen": "~56.0.4",
84
+ "expo-splash-screen": "~56.0.9",
85
85
  "expo-sqlite": "~56.0.3",
86
86
  "expo-status-bar": "~56.0.4",
87
87
  "expo-store-review": "~56.0.3",
88
88
  "expo-symbols": "~56.0.5",
89
89
  "expo-system-ui": "~56.0.4",
90
- "expo-task-manager": "~56.0.6",
91
- "expo-tracking-transparency": "~56.0.3",
92
- "expo-updates": "~56.0.7",
90
+ "expo-task-manager": "~56.0.11",
91
+ "expo-tracking-transparency": "~56.0.4",
92
+ "expo-updates": "~56.0.14",
93
93
  "expo-video-thumbnails": "~56.0.3",
94
- "expo-video": "~56.1.0",
94
+ "expo-video": "~56.1.1",
95
95
  "expo-web-browser": "~56.0.4",
96
- "expo-widgets": "~56.0.6",
97
- "jest-expo": "~56.0.0",
96
+ "expo-widgets": "~56.0.11",
97
+ "jest-expo": "~56.0.4",
98
98
  "lottie-react-native": "~7.3.4",
99
99
  "react": "19.2.3",
100
100
  "react-dom": "19.2.3",
@@ -107,7 +107,7 @@
107
107
  "react-native-pager-view": "8.0.1",
108
108
  "react-native-worklets": "0.8.3",
109
109
  "react-native-reanimated": "4.3.1",
110
- "react-native-screens": "4.25.0",
110
+ "react-native-screens": "4.25.1",
111
111
  "react-native-safe-area-context": "~5.7.0",
112
112
  "react-native-svg": "15.15.4",
113
113
  "react-native-view-shot": "4.0.3",
@@ -44,7 +44,7 @@ internal final class NativeResponse: SharedObject, ExpoURLSessionTaskDelegate, @
44
44
  if state == .responseReceived {
45
45
  state = .bodyStreamingStarted
46
46
  let queuedData = self.sink.finalize()
47
- emit(event: "didReceiveResponseData", arguments: queuedData)
47
+ emit(event: "didReceiveResponseData", payload: queuedData)
48
48
  } else if state == .bodyCompleted {
49
49
  let queuedData = self.sink.finalize()
50
50
  return queuedData
@@ -63,7 +63,7 @@ internal final class NativeResponse: SharedObject, ExpoURLSessionTaskDelegate, @
63
63
  let error = FetchRequestCanceledException()
64
64
  self.error = error
65
65
  if state == .bodyStreamingStarted {
66
- emit(event: "didFailWithError", arguments: error.localizedDescription)
66
+ emit(event: "didFailWithError", payload: error.localizedDescription)
67
67
  }
68
68
  state = .errorReceived
69
69
  emit(event: "readyForJSFinalization")
@@ -152,7 +152,7 @@ internal final class NativeResponse: SharedObject, ExpoURLSessionTaskDelegate, @
152
152
  if state == .responseReceived {
153
153
  self.sink.appendBufferBody(data: data)
154
154
  } else if state == .bodyStreamingStarted {
155
- emit(event: "didReceiveResponseData", arguments: data)
155
+ emit(event: "didReceiveResponseData", payload: data)
156
156
  }
157
157
  // no-op in .bodyStreamingCanceled state
158
158
  }
@@ -172,7 +172,7 @@ internal final class NativeResponse: SharedObject, ExpoURLSessionTaskDelegate, @
172
172
  let error = FetchRedirectException()
173
173
  self.error = error
174
174
  if state == .bodyStreamingStarted {
175
- emit(event: "didFailWithError", arguments: error.localizedDescription)
175
+ emit(event: "didFailWithError", payload: error.localizedDescription)
176
176
  }
177
177
  state = .errorReceived
178
178
  emit(event: "readyForJSFinalization")
@@ -209,7 +209,7 @@ internal final class NativeResponse: SharedObject, ExpoURLSessionTaskDelegate, @
209
209
 
210
210
  if state == .bodyStreamingStarted {
211
211
  if let error {
212
- emit(event: "didFailWithError", arguments: error.localizedDescription)
212
+ emit(event: "didFailWithError", payload: error.localizedDescription)
213
213
  } else {
214
214
  emit(event: "didComplete")
215
215
  }