peachsim 0.1.2225 → 0.1.2228
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/cli/bridge-flow-runner.ts +56 -3
- package/cli/commands/control.ts +27 -1
- package/cli/commands/flow.ts +26 -0
- package/cli/commands/package.ts +9 -2
- package/cli/drivers/playwright.ts +1 -0
- package/cli/drivers/types.ts +3 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +78 -9
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +76 -7
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +78 -9
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +4 -4
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +11 -4
- package/dist-lib/metro-production-bundle.mjs +10 -4
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +54 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +153 -23
- package/dist-lib/swift-compile.cjs +68 -4
- package/dist-lib/swift-compile.mjs +67 -4
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +75 -6
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/bundle-parse-receipt.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/native-paragraph.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/metro-fingerprint.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +0 -5
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +2 -0
- package/dist-types/packages/peach-kit/src/internal.d.ts +1 -1
- package/dist-types/packages/peach-kit/src/ios-tint.d.ts +2 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIControl.h +0 -26
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +27 -0
- package/sdk/ios/usr/include/ObjectiveC.apinotes +380 -7
- package/src/metro-production-bundle.ts +15 -2
- package/src/swift-compile.ts +77 -2
- package/src/swift-standin-emit.ts +1 -0
- package/src/swift-standins.ts +8 -0
|
@@ -135,17 +135,390 @@ Protocols:
|
|
|
135
135
|
Tags:
|
|
136
136
|
- Name: _NSZone
|
|
137
137
|
SwiftName: _NSZone
|
|
138
|
-
Functions:
|
|
139
|
-
- Name: sel_registerName
|
|
140
|
-
NullabilityOfRet: N
|
|
141
|
-
Nullability: [N]
|
|
142
|
-
- Name: sel_getUid
|
|
143
|
-
NullabilityOfRet: N
|
|
144
|
-
Nullability: [N]
|
|
145
138
|
|
|
146
139
|
|
|
147
140
|
# Runtime functions did not yet have nullability in Swift 3.
|
|
148
141
|
|
|
142
|
+
Functions:
|
|
143
|
+
- Name: sel_getName
|
|
144
|
+
Nullability: [ N ]
|
|
145
|
+
NullabilityOfRet: N
|
|
146
|
+
- Name: sel_registerName
|
|
147
|
+
Nullability: [ N ]
|
|
148
|
+
NullabilityOfRet: N
|
|
149
|
+
- Name: object_getClassName
|
|
150
|
+
Nullability: [ O ]
|
|
151
|
+
NullabilityOfRet: N
|
|
152
|
+
- Name: object_getIndexedIvars
|
|
153
|
+
Nullability: [ O ]
|
|
154
|
+
NullabilityOfRet: O
|
|
155
|
+
- Name: sel_isMapped
|
|
156
|
+
Nullability: [ N ]
|
|
157
|
+
- Name: sel_getUid
|
|
158
|
+
Nullability: [ N ]
|
|
159
|
+
NullabilityOfRet: N
|
|
160
|
+
- Name: objc_retainedObject
|
|
161
|
+
Nullability: [ O ]
|
|
162
|
+
NullabilityOfRet: O
|
|
163
|
+
- Name: objc_unretainedObject
|
|
164
|
+
Nullability: [ O ]
|
|
165
|
+
NullabilityOfRet: O
|
|
166
|
+
- Name: objc_unretainedPointer
|
|
167
|
+
Nullability: [ O ]
|
|
168
|
+
NullabilityOfRet: O
|
|
169
|
+
- Name: object_copy
|
|
170
|
+
Nullability: [ O, S ]
|
|
171
|
+
NullabilityOfRet: O
|
|
172
|
+
- Name: object_dispose
|
|
173
|
+
Nullability: [ O ]
|
|
174
|
+
NullabilityOfRet: O
|
|
175
|
+
- Name: object_getClass
|
|
176
|
+
Nullability: [ O ]
|
|
177
|
+
NullabilityOfRet: O
|
|
178
|
+
- Name: object_setClass
|
|
179
|
+
Nullability: [ O, N ]
|
|
180
|
+
NullabilityOfRet: O
|
|
181
|
+
- Name: object_isClass
|
|
182
|
+
Nullability: [ O ]
|
|
183
|
+
- Name: object_getIvar
|
|
184
|
+
Nullability: [ O, N ]
|
|
185
|
+
NullabilityOfRet: O
|
|
186
|
+
- Name: object_setIvar
|
|
187
|
+
Nullability: [ O, N, O ]
|
|
188
|
+
- Name: object_setIvarWithStrongDefault
|
|
189
|
+
Nullability: [ O, N, O ]
|
|
190
|
+
- Name: object_setInstanceVariable
|
|
191
|
+
Nullability: [ O, N, O ]
|
|
192
|
+
NullabilityOfRet: O
|
|
193
|
+
- Name: object_setInstanceVariableWithStrongDefault
|
|
194
|
+
Nullability: [ O, N, O ]
|
|
195
|
+
NullabilityOfRet: O
|
|
196
|
+
- Name: object_getInstanceVariable
|
|
197
|
+
Nullability: [ O, N, O ]
|
|
198
|
+
Parameters:
|
|
199
|
+
- Position: 2
|
|
200
|
+
Type: "void * _Nullable * _Nullable"
|
|
201
|
+
NullabilityOfRet: O
|
|
202
|
+
- Name: objc_getClass
|
|
203
|
+
Nullability: [ N ]
|
|
204
|
+
- Name: objc_getMetaClass
|
|
205
|
+
Nullability: [ N ]
|
|
206
|
+
- Name: objc_lookUpClass
|
|
207
|
+
Nullability: [ N ]
|
|
208
|
+
NullabilityOfRet: O
|
|
209
|
+
- Name: objc_getRequiredClass
|
|
210
|
+
Nullability: [ N ]
|
|
211
|
+
NullabilityOfRet: N
|
|
212
|
+
- Name: objc_getClassList
|
|
213
|
+
Nullability: [ O, S ]
|
|
214
|
+
Parameters:
|
|
215
|
+
- Position: 0
|
|
216
|
+
Type: "Class _Nonnull * _Nullable"
|
|
217
|
+
- Name: objc_copyClassList
|
|
218
|
+
Nullability: [ O ]
|
|
219
|
+
NullabilityOfRet: O
|
|
220
|
+
ResultType: "Class _Nonnull * _Nullable"
|
|
221
|
+
- Name: objc_enumerateClasses
|
|
222
|
+
Nullability: [ O, O, O, O, S ]
|
|
223
|
+
Parameters:
|
|
224
|
+
- Position: 4
|
|
225
|
+
Type: "void (^)(Class _Nonnull, BOOL * _Nonnull)"
|
|
226
|
+
NoEscape: true
|
|
227
|
+
- Name: class_getName
|
|
228
|
+
Nullability: [ O ]
|
|
229
|
+
NullabilityOfRet: N
|
|
230
|
+
- Name: class_isMetaClass
|
|
231
|
+
Nullability: [ O ]
|
|
232
|
+
- Name: class_getSuperclass
|
|
233
|
+
Nullability: [ O ]
|
|
234
|
+
NullabilityOfRet: O
|
|
235
|
+
- Name: class_setSuperclass
|
|
236
|
+
Nullability: [ N, N ]
|
|
237
|
+
NullabilityOfRet: N
|
|
238
|
+
- Name: class_getVersion
|
|
239
|
+
Nullability: [ O ]
|
|
240
|
+
- Name: class_setVersion
|
|
241
|
+
Nullability: [ O, S ]
|
|
242
|
+
- Name: class_getInstanceSize
|
|
243
|
+
Nullability: [ O ]
|
|
244
|
+
- Name: class_getInstanceVariable
|
|
245
|
+
Nullability: [ O, N ]
|
|
246
|
+
NullabilityOfRet: O
|
|
247
|
+
- Name: class_getClassVariable
|
|
248
|
+
Nullability: [ O, N ]
|
|
249
|
+
NullabilityOfRet: O
|
|
250
|
+
- Name: class_copyIvarList
|
|
251
|
+
Nullability: [ O, O ]
|
|
252
|
+
NullabilityOfRet: O
|
|
253
|
+
ResultType: "Ivar _Nonnull * _Nullable"
|
|
254
|
+
- Name: class_getInstanceMethod
|
|
255
|
+
Nullability: [ O, N ]
|
|
256
|
+
NullabilityOfRet: O
|
|
257
|
+
- Name: class_getClassMethod
|
|
258
|
+
Nullability: [ O, N ]
|
|
259
|
+
NullabilityOfRet: O
|
|
260
|
+
- Name: class_getMethodImplementation
|
|
261
|
+
Nullability: [ O, N ]
|
|
262
|
+
NullabilityOfRet: O
|
|
263
|
+
- Name: class_getMethodImplementation_stret
|
|
264
|
+
Nullability: [ O, N ]
|
|
265
|
+
NullabilityOfRet: O
|
|
266
|
+
- Name: class_respondsToSelector
|
|
267
|
+
Nullability: [ O, N ]
|
|
268
|
+
- Name: class_copyMethodList
|
|
269
|
+
Nullability: [ O, O ]
|
|
270
|
+
NullabilityOfRet: O
|
|
271
|
+
ResultType: "Method _Nonnull * _Nullable"
|
|
272
|
+
- Name: class_conformsToProtocol
|
|
273
|
+
Nullability: [ O, O ]
|
|
274
|
+
- Name: class_copyProtocolList
|
|
275
|
+
Nullability: [ O, O ]
|
|
276
|
+
NullabilityOfRet: O
|
|
277
|
+
ResultType: "Protocol * _Nonnull * _Nullable"
|
|
278
|
+
- Name: class_getProperty
|
|
279
|
+
Nullability: [ O, N ]
|
|
280
|
+
NullabilityOfRet: O
|
|
281
|
+
- Name: class_copyPropertyList
|
|
282
|
+
Nullability: [ O, O ]
|
|
283
|
+
NullabilityOfRet: O
|
|
284
|
+
ResultType: "objc_property_t _Nonnull * _Nullable"
|
|
285
|
+
- Name: class_getIvarLayout
|
|
286
|
+
Nullability: [ O ]
|
|
287
|
+
NullabilityOfRet: O
|
|
288
|
+
- Name: class_getWeakIvarLayout
|
|
289
|
+
Nullability: [ O ]
|
|
290
|
+
NullabilityOfRet: O
|
|
291
|
+
- Name: class_addMethod
|
|
292
|
+
Nullability: [ O, N, N, O ]
|
|
293
|
+
- Name: class_replaceMethod
|
|
294
|
+
Nullability: [ O, N, N, O ]
|
|
295
|
+
NullabilityOfRet: O
|
|
296
|
+
- Name: class_addIvar
|
|
297
|
+
Nullability: [ O, N, S, S, O ]
|
|
298
|
+
- Name: class_addProtocol
|
|
299
|
+
Nullability: [ O, N ]
|
|
300
|
+
- Name: class_addProperty
|
|
301
|
+
Nullability: [ O, N, O, S ]
|
|
302
|
+
- Name: class_replaceProperty
|
|
303
|
+
Nullability: [ O, N, O, S ]
|
|
304
|
+
- Name: class_setIvarLayout
|
|
305
|
+
Nullability: [ O, O ]
|
|
306
|
+
- Name: class_setWeakIvarLayout
|
|
307
|
+
Nullability: [ O, O ]
|
|
308
|
+
- Name: objc_getFutureClass
|
|
309
|
+
Nullability: [ N ]
|
|
310
|
+
NullabilityOfRet: N
|
|
311
|
+
- Name: class_createInstance
|
|
312
|
+
Nullability: [ O, S ]
|
|
313
|
+
NullabilityOfRet: O
|
|
314
|
+
- Name: objc_constructInstance
|
|
315
|
+
Nullability: [ O, O ]
|
|
316
|
+
NullabilityOfRet: O
|
|
317
|
+
- Name: objc_destructInstance
|
|
318
|
+
Nullability: [ O ]
|
|
319
|
+
NullabilityOfRet: O
|
|
320
|
+
- Name: objc_allocateClassPair
|
|
321
|
+
Nullability: [ O, N, S ]
|
|
322
|
+
NullabilityOfRet: O
|
|
323
|
+
- Name: objc_registerClassPair
|
|
324
|
+
Nullability: [ N ]
|
|
325
|
+
- Name: objc_duplicateClass
|
|
326
|
+
Nullability: [ N, N, S ]
|
|
327
|
+
NullabilityOfRet: N
|
|
328
|
+
- Name: objc_disposeClassPair
|
|
329
|
+
Nullability: [ N ]
|
|
330
|
+
- Name: method_getName
|
|
331
|
+
Nullability: [ N ]
|
|
332
|
+
NullabilityOfRet: N
|
|
333
|
+
- Name: method_getImplementation
|
|
334
|
+
Nullability: [ N ]
|
|
335
|
+
NullabilityOfRet: N
|
|
336
|
+
- Name: method_getTypeEncoding
|
|
337
|
+
Nullability: [ N ]
|
|
338
|
+
NullabilityOfRet: O
|
|
339
|
+
- Name: method_getNumberOfArguments
|
|
340
|
+
Nullability: [ N ]
|
|
341
|
+
- Name: method_copyReturnType
|
|
342
|
+
Nullability: [ N ]
|
|
343
|
+
NullabilityOfRet: N
|
|
344
|
+
- Name: method_copyArgumentType
|
|
345
|
+
Nullability: [ N, S ]
|
|
346
|
+
NullabilityOfRet: O
|
|
347
|
+
- Name: method_getReturnType
|
|
348
|
+
Nullability: [ N, N, S ]
|
|
349
|
+
- Name: method_getArgumentType
|
|
350
|
+
Nullability: [ N, S, O, S ]
|
|
351
|
+
- Name: method_getDescription
|
|
352
|
+
Nullability: [ N ]
|
|
353
|
+
NullabilityOfRet: N
|
|
354
|
+
- Name: method_setImplementation
|
|
355
|
+
Nullability: [ N, N ]
|
|
356
|
+
NullabilityOfRet: N
|
|
357
|
+
- Name: method_exchangeImplementations
|
|
358
|
+
Nullability: [ N, N ]
|
|
359
|
+
- Name: ivar_getName
|
|
360
|
+
Nullability: [ N ]
|
|
361
|
+
NullabilityOfRet: O
|
|
362
|
+
- Name: ivar_getTypeEncoding
|
|
363
|
+
Nullability: [ N ]
|
|
364
|
+
NullabilityOfRet: O
|
|
365
|
+
- Name: ivar_getOffset
|
|
366
|
+
Nullability: [ N ]
|
|
367
|
+
- Name: property_getName
|
|
368
|
+
Nullability: [ N ]
|
|
369
|
+
NullabilityOfRet: N
|
|
370
|
+
- Name: property_getAttributes
|
|
371
|
+
Nullability: [ N ]
|
|
372
|
+
NullabilityOfRet: O
|
|
373
|
+
- Name: property_copyAttributeList
|
|
374
|
+
Nullability: [ N, O ]
|
|
375
|
+
NullabilityOfRet: O
|
|
376
|
+
- Name: property_copyAttributeValue
|
|
377
|
+
Nullability: [ N, N ]
|
|
378
|
+
NullabilityOfRet: O
|
|
379
|
+
- Name: objc_getProtocol
|
|
380
|
+
Nullability: [ N ]
|
|
381
|
+
NullabilityOfRet: O
|
|
382
|
+
- Name: objc_copyProtocolList
|
|
383
|
+
Nullability: [ O ]
|
|
384
|
+
NullabilityOfRet: O
|
|
385
|
+
ResultType: "Protocol * _Nonnull * _Nullable"
|
|
386
|
+
- Name: protocol_conformsToProtocol
|
|
387
|
+
Nullability: [ O, O ]
|
|
388
|
+
- Name: protocol_isEqual
|
|
389
|
+
Nullability: [ O, O ]
|
|
390
|
+
- Name: protocol_getName
|
|
391
|
+
Nullability: [ N ]
|
|
392
|
+
NullabilityOfRet: N
|
|
393
|
+
- Name: protocol_getMethodDescription
|
|
394
|
+
Nullability: [ N, N, S, S ]
|
|
395
|
+
- Name: protocol_copyMethodDescriptionList
|
|
396
|
+
Nullability: [ N, S, S, O ]
|
|
397
|
+
NullabilityOfRet: O
|
|
398
|
+
- Name: protocol_getProperty
|
|
399
|
+
Nullability: [ N, N, S, S ]
|
|
400
|
+
NullabilityOfRet: O
|
|
401
|
+
- Name: protocol_copyPropertyList
|
|
402
|
+
Nullability: [ N, O ]
|
|
403
|
+
NullabilityOfRet: O
|
|
404
|
+
ResultType: "objc_property_t _Nonnull * _Nullable"
|
|
405
|
+
- Name: protocol_copyPropertyList2
|
|
406
|
+
Nullability: [ N, O, S, S ]
|
|
407
|
+
NullabilityOfRet: O
|
|
408
|
+
ResultType: "objc_property_t _Nonnull * _Nullable"
|
|
409
|
+
- Name: protocol_copyProtocolList
|
|
410
|
+
Nullability: [ N, O ]
|
|
411
|
+
NullabilityOfRet: O
|
|
412
|
+
ResultType: "Protocol * _Nonnull * _Nullable"
|
|
413
|
+
- Name: objc_allocateProtocol
|
|
414
|
+
Nullability: [ N ]
|
|
415
|
+
NullabilityOfRet: O
|
|
416
|
+
- Name: objc_registerProtocol
|
|
417
|
+
Nullability: [ N ]
|
|
418
|
+
- Name: protocol_addMethodDescription
|
|
419
|
+
Nullability: [ N, N, O, S, S ]
|
|
420
|
+
- Name: protocol_addProtocol
|
|
421
|
+
Nullability: [ N, N ]
|
|
422
|
+
- Name: protocol_addProperty
|
|
423
|
+
Nullability: [ N, N, O, S, S, S ]
|
|
424
|
+
- Name: objc_copyImageNames
|
|
425
|
+
Nullability: [ O ]
|
|
426
|
+
NullabilityOfRet: N
|
|
427
|
+
ResultType: "const char * _Nonnull * _Nonnull"
|
|
428
|
+
- Name: objc_copyImageHeaders
|
|
429
|
+
Nullability: [ O ]
|
|
430
|
+
NullabilityOfRet: N
|
|
431
|
+
ResultType: "const struct mach_header * _Nonnull * _Nonnull"
|
|
432
|
+
- Name: class_getImageName
|
|
433
|
+
Nullability: [ O ]
|
|
434
|
+
NullabilityOfRet: O
|
|
435
|
+
- Name: objc_copyClassNamesForImage
|
|
436
|
+
Nullability: [ N, O ]
|
|
437
|
+
NullabilityOfRet: O
|
|
438
|
+
ResultType: "const char * _Nonnull * _Nullable"
|
|
439
|
+
- Name: sel_isEqual
|
|
440
|
+
Nullability: [ N, N ]
|
|
441
|
+
- Name: objc_enumerationMutation
|
|
442
|
+
Nullability: [ N ]
|
|
443
|
+
- Name: objc_setEnumerationMutationHandler
|
|
444
|
+
Nullability: [ S ]
|
|
445
|
+
Parameters:
|
|
446
|
+
- Position: 0
|
|
447
|
+
Type: "void ( * _Nullable)(id _Nonnull)"
|
|
448
|
+
- Name: objc_setForwardHandler
|
|
449
|
+
Nullability: [ N, N ]
|
|
450
|
+
- Name: imp_implementationWithBlock
|
|
451
|
+
Nullability: [ N ]
|
|
452
|
+
NullabilityOfRet: N
|
|
453
|
+
- Name: imp_getBlock
|
|
454
|
+
Nullability: [ N ]
|
|
455
|
+
NullabilityOfRet: O
|
|
456
|
+
- Name: imp_removeBlock
|
|
457
|
+
Nullability: [ N ]
|
|
458
|
+
- Name: objc_loadWeak
|
|
459
|
+
Nullability: [ N ]
|
|
460
|
+
Parameters:
|
|
461
|
+
- Position: 0
|
|
462
|
+
Type: "id _Nullable * _Nonnull"
|
|
463
|
+
NullabilityOfRet: O
|
|
464
|
+
- Name: objc_storeWeak
|
|
465
|
+
Nullability: [ N, O ]
|
|
466
|
+
Parameters:
|
|
467
|
+
- Position: 0
|
|
468
|
+
Type: "id _Nullable * _Nonnull"
|
|
469
|
+
NullabilityOfRet: O
|
|
470
|
+
- Name: objc_setAssociatedObject
|
|
471
|
+
Nullability: [ N, N, O, S ]
|
|
472
|
+
- Name: objc_getAssociatedObject
|
|
473
|
+
Nullability: [ N, N ]
|
|
474
|
+
NullabilityOfRet: O
|
|
475
|
+
- Name: objc_removeAssociatedObjects
|
|
476
|
+
Nullability: [ N ]
|
|
477
|
+
- Name: objc_setHook_getImageName
|
|
478
|
+
Nullability: [ N, N ]
|
|
479
|
+
Parameters:
|
|
480
|
+
- Position: 1
|
|
481
|
+
Type: "objc_hook_getImageName _Nullable * _Nonnull"
|
|
482
|
+
- Name: objc_setHook_getClass
|
|
483
|
+
Nullability: [ N, N ]
|
|
484
|
+
Parameters:
|
|
485
|
+
- Position: 1
|
|
486
|
+
Type: "objc_hook_getClass _Nullable * _Nonnull"
|
|
487
|
+
- Name: objc_addLoadImageFunc
|
|
488
|
+
Nullability: [ N ]
|
|
489
|
+
- Name: objc_setHook_lazyClassNamer
|
|
490
|
+
Nullability: [ N, N ]
|
|
491
|
+
Parameters:
|
|
492
|
+
- Position: 1
|
|
493
|
+
Type: "objc_hook_lazyClassNamer _Nonnull * _Nonnull"
|
|
494
|
+
- Name: _objc_realizeClassFromSwift
|
|
495
|
+
Nullability: [ O, O ]
|
|
496
|
+
NullabilityOfRet: O
|
|
497
|
+
- Name: _objc_flush_caches
|
|
498
|
+
Nullability: [ O ]
|
|
499
|
+
- Name: class_lookupMethod
|
|
500
|
+
Nullability: [ O, N ]
|
|
501
|
+
NullabilityOfRet: O
|
|
502
|
+
- Name: class_respondsToMethod
|
|
503
|
+
Nullability: [ O, N ]
|
|
504
|
+
- Name: object_copyFromZone
|
|
505
|
+
Nullability: [ O, S, S ]
|
|
506
|
+
NullabilityOfRet: O
|
|
507
|
+
- Name: class_createInstanceFromZone
|
|
508
|
+
Nullability: [ O, S, S ]
|
|
509
|
+
NullabilityOfRet: O
|
|
510
|
+
- Name: objc_msgSend
|
|
511
|
+
- Name: objc_msgSendSuper
|
|
512
|
+
- Name: objc_msgSend_stret
|
|
513
|
+
- Name: objc_msgSendSuper_stret
|
|
514
|
+
- Name: method_invoke
|
|
515
|
+
- Name: method_invoke_stret
|
|
516
|
+
- Name: _objc_msgForward
|
|
517
|
+
- Name: _objc_msgForward_stret
|
|
518
|
+
- Name: objc_sync_enter
|
|
519
|
+
Nullability: [ N ]
|
|
520
|
+
- Name: objc_sync_exit
|
|
521
|
+
Nullability: [ N ]
|
|
149
522
|
SwiftVersions:
|
|
150
523
|
- Version: 3
|
|
151
524
|
Functions:
|
|
@@ -394,7 +394,14 @@ export async function validateRNXMetroModulePaths(
|
|
|
394
394
|
source: string,
|
|
395
395
|
modulePaths: RNXMetroModulePathMap,
|
|
396
396
|
): Promise<void> {
|
|
397
|
-
|
|
397
|
+
checkRNXMetroModulePaths(await readRNXMetroBundleLayout(source), modulePaths)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/** the identity contract against a layout the caller already read. */
|
|
401
|
+
export function checkRNXMetroModulePaths(
|
|
402
|
+
layout: RNXMetroBundleLayout,
|
|
403
|
+
modulePaths: RNXMetroModulePathMap,
|
|
404
|
+
): void {
|
|
398
405
|
if (layout.moduleIdFailures > 0) {
|
|
399
406
|
throw new Error(
|
|
400
407
|
`Metro module identity could not read ${layout.moduleIdFailures} module IDs`,
|
|
@@ -431,8 +438,14 @@ export async function validateRNXMetroModulePaths(
|
|
|
431
438
|
|
|
432
439
|
export async function validateRNXMetroModuleIdentity(
|
|
433
440
|
identity: RNXMetroModuleIdentity,
|
|
441
|
+
// the layout of the bundle this identity was read from. its footers follow
|
|
442
|
+
// the graph and register nothing, so its defines are the identity source's.
|
|
443
|
+
layout?: RNXMetroBundleLayout,
|
|
434
444
|
): Promise<void> {
|
|
435
|
-
|
|
445
|
+
checkRNXMetroModulePaths(
|
|
446
|
+
layout ?? (await readRNXMetroBundleLayout(identity.source)),
|
|
447
|
+
identity.modulePaths,
|
|
448
|
+
)
|
|
436
449
|
for (const moduleId of Object.keys(identity.logicalSpecifiers)) {
|
|
437
450
|
if (!Object.prototype.hasOwnProperty.call(identity.modulePaths, moduleId)) {
|
|
438
451
|
throw new Error(
|
package/src/swift-compile.ts
CHANGED
|
@@ -437,6 +437,26 @@ const clangInterfaceHeader = (header: string): string =>
|
|
|
437
437
|
.replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, '$1')
|
|
438
438
|
.replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, '')
|
|
439
439
|
|
|
440
|
+
export function swiftHeaderWithSuperclassImports(
|
|
441
|
+
header: string,
|
|
442
|
+
interfaceFor: (name: string) => { file: string; header: string } | null,
|
|
443
|
+
): string {
|
|
444
|
+
const superclasses = new Set(
|
|
445
|
+
[...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1]!),
|
|
446
|
+
)
|
|
447
|
+
return header.replace(/^@import (\w+);$/gm, (statement, name: string) => {
|
|
448
|
+
const dependency = interfaceFor(name)
|
|
449
|
+
if (
|
|
450
|
+
!dependency ||
|
|
451
|
+
![...swiftInterfaceDeclarations(dependency.header)].some((name) =>
|
|
452
|
+
superclasses.has(name),
|
|
453
|
+
)
|
|
454
|
+
)
|
|
455
|
+
return statement
|
|
456
|
+
return `${statement}\n#import ${JSON.stringify(dependency.file)}`
|
|
457
|
+
})
|
|
458
|
+
}
|
|
459
|
+
|
|
440
460
|
/** the Objective-C protocols and classes a generated interface header defines. */
|
|
441
461
|
export const swiftInterfaceDeclarations = (header: string): Set<string> =>
|
|
442
462
|
new Set([
|
|
@@ -908,7 +928,7 @@ export function swiftOptionalFramework(name: string): boolean {
|
|
|
908
928
|
// an import may carry attributes (`@_exported`, `@preconcurrency`) and a
|
|
909
929
|
// declaration kind (`import struct Nuke.ImageRequest`).
|
|
910
930
|
const SWIFT_IMPORT =
|
|
911
|
-
/^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/
|
|
931
|
+
/^\s*(?:@\w+(?:\([^)]*\))?\s+|(?:public|package|internal|fileprivate|private)\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/
|
|
912
932
|
|
|
913
933
|
// three-valued (kleene) logic shared by the swift and c condition
|
|
914
934
|
// evaluators: an undecided operand only decides when the other forces the
|
|
@@ -7437,6 +7457,58 @@ function compileSwiftProjectOnce(
|
|
|
7437
7457
|
if (existsSync(linked) && statSync(linked).size <= 8)
|
|
7438
7458
|
rmSync(linked, { force: true })
|
|
7439
7459
|
report('compiling and linking Swift modules')
|
|
7460
|
+
const frameworkInterfaces = new Map<
|
|
7461
|
+
string,
|
|
7462
|
+
{ file: string; header: string } | null
|
|
7463
|
+
>()
|
|
7464
|
+
const frameworkInterface = (
|
|
7465
|
+
name: string,
|
|
7466
|
+
): { file: string; header: string } | null => {
|
|
7467
|
+
if (frameworkInterfaces.has(name)) return frameworkInterfaces.get(name)!
|
|
7468
|
+
const source = distribution
|
|
7469
|
+
? path.join(frameworkRoot, 'modules', `${name}-Swift.h`)
|
|
7470
|
+
: path.join(
|
|
7471
|
+
prebuilt!.modules,
|
|
7472
|
+
'..',
|
|
7473
|
+
`${name}.build/include/${name}-Swift.h`,
|
|
7474
|
+
)
|
|
7475
|
+
if (!existsSync(source)) {
|
|
7476
|
+
frameworkInterfaces.set(name, null)
|
|
7477
|
+
return null
|
|
7478
|
+
}
|
|
7479
|
+
const headers = path.join(
|
|
7480
|
+
swiftSdkPaths(frameworkRoot, options.toolchainBin).darwin,
|
|
7481
|
+
`System/Library/Frameworks/${name}.framework/Headers`,
|
|
7482
|
+
)
|
|
7483
|
+
const declared = new Set<string>()
|
|
7484
|
+
if (existsSync(headers))
|
|
7485
|
+
for (const file of readdirSync(headers, {
|
|
7486
|
+
recursive: true,
|
|
7487
|
+
encoding: 'utf8',
|
|
7488
|
+
}))
|
|
7489
|
+
if (file.endsWith('.h'))
|
|
7490
|
+
for (const name of swiftInterfaceDeclarations(
|
|
7491
|
+
readFileSync(path.join(headers, file), 'utf8'),
|
|
7492
|
+
))
|
|
7493
|
+
declared.add(name)
|
|
7494
|
+
const header = withoutSwiftDeclarations(
|
|
7495
|
+
clangInterfaceHeader(readFileSync(source, 'utf8')),
|
|
7496
|
+
declared,
|
|
7497
|
+
`#import <${name}/${name}.h>`,
|
|
7498
|
+
)
|
|
7499
|
+
const value = {
|
|
7500
|
+
file: path.join(root, '.build/peach-framework-objc', `${name}-Swift.h`),
|
|
7501
|
+
header,
|
|
7502
|
+
}
|
|
7503
|
+
frameworkInterfaces.set(name, value)
|
|
7504
|
+
writeBuildFile(
|
|
7505
|
+
value.file,
|
|
7506
|
+
(existsSync(path.join(headers, `${name}.h`))
|
|
7507
|
+
? `#import <${name}/${name}.h>\n`
|
|
7508
|
+
: '') + swiftHeaderWithSuperclassImports(header, frameworkInterface),
|
|
7509
|
+
)
|
|
7510
|
+
return value
|
|
7511
|
+
}
|
|
7440
7512
|
try {
|
|
7441
7513
|
// clang consumes the real emitted headers after swift finishes.
|
|
7442
7514
|
// swiftpm's transitive swift module maps are not C declarations:
|
|
@@ -7475,7 +7547,10 @@ function compileSwiftProjectOnce(
|
|
|
7475
7547
|
writeBuildFile(
|
|
7476
7548
|
emitted,
|
|
7477
7549
|
withoutSwiftDeclarations(
|
|
7478
|
-
|
|
7550
|
+
swiftHeaderWithSuperclassImports(
|
|
7551
|
+
clangInterfaceHeader(readFileSync(original, 'utf8')),
|
|
7552
|
+
frameworkInterface,
|
|
7553
|
+
),
|
|
7479
7554
|
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
7480
7555
|
`#import <${producer}/${producer}.h>`,
|
|
7481
7556
|
),
|
|
@@ -1529,6 +1529,7 @@ export function emitSwiftStandin(
|
|
|
1529
1529
|
].includes(name)
|
|
1530
1530
|
) &&
|
|
1531
1531
|
!(name === nsObjectProtocol && externalRoot(id) === nsObject) &&
|
|
1532
|
+
!options.unconformed?.get(path)?.has(name.split(/::|\./).pop()!) &&
|
|
1532
1533
|
!options.unconformed?.get(path)?.has(name),
|
|
1533
1534
|
),
|
|
1534
1535
|
].filter((name, at, all) => all.indexOf(name) === at)
|
package/src/swift-standins.ts
CHANGED
|
@@ -1703,6 +1703,14 @@ function graphStandin(
|
|
|
1703
1703
|
unconformed.set(owner, new Set([...(unconformed.get(owner) ?? []), conformance]))
|
|
1704
1704
|
continue
|
|
1705
1705
|
}
|
|
1706
|
+
// a superclass another module declares already brings this conformance
|
|
1707
|
+
const redundant = /^redundant conformance of '\w+' to protocol '(\w+)'$/.exec(
|
|
1708
|
+
match[3]!,
|
|
1709
|
+
)?.[1]
|
|
1710
|
+
if (owner && redundant) {
|
|
1711
|
+
unconformed.set(owner, new Set([...(unconformed.get(owner) ?? []), redundant]))
|
|
1712
|
+
continue
|
|
1713
|
+
}
|
|
1706
1714
|
if (owner && swiftPaths.has(owner))
|
|
1707
1715
|
throw new Error(
|
|
1708
1716
|
`Swift declaration ${module}.${owner} does not typecheck: ${match[3]}`,
|