peachsim 0.1.2253 → 0.1.2257

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 (144) hide show
  1. package/cli/bridge-flow-runner.ts +41 -0
  2. package/cli/commands/compat.ts +1 -1
  3. package/cli/commands/control.ts +9 -3
  4. package/cli/commands/flow.ts +9 -0
  5. package/cli/commands/package.ts +1 -1
  6. package/cli/commands/runtime.ts +1 -1
  7. package/cli/commands/swift.ts +5 -0
  8. package/cli/commands/upgrade.ts +2 -5
  9. package/cli/commands/version.ts +1 -1
  10. package/cli/current-sim.ts +23 -15
  11. package/cli/native-input.ts +1 -1
  12. package/cli/outbound-endpoints.ts +0 -2
  13. package/cli/secure-file.ts +8 -2
  14. package/dist-lib/agent-daemon-client.cjs +1 -1
  15. package/dist-lib/agent-events.cjs +1 -1
  16. package/dist-lib/attached-projects.cjs +1 -1
  17. package/dist-lib/auth/shared-session.cjs +1 -1
  18. package/dist-lib/backend-origin.cjs +1 -1
  19. package/dist-lib/beta.cjs +1 -1
  20. package/dist-lib/beta.mjs +1 -1
  21. package/dist-lib/bridge-constants.cjs +1 -1
  22. package/dist-lib/bridge-contract-input.cjs +1 -1
  23. package/dist-lib/bridge-contract-input.mjs +1 -1
  24. package/dist-lib/bridge-contract.cjs +1 -1
  25. package/dist-lib/bridge-contract.mjs +1 -1
  26. package/dist-lib/bundle-channel.cjs +3295 -2329
  27. package/dist-lib/capture-contract.cjs +1 -1
  28. package/dist-lib/capture-contract.mjs +1 -1
  29. package/dist-lib/cloud-contract.cjs +1 -1
  30. package/dist-lib/cloud-contract.mjs +1 -1
  31. package/dist-lib/cloud-test-args.cjs +1 -1
  32. package/dist-lib/cloud-test-args.mjs +1 -1
  33. package/dist-lib/cloud.cjs +1 -1
  34. package/dist-lib/cloud.mjs +1 -1
  35. package/dist-lib/config.cjs +16 -1
  36. package/dist-lib/config.mjs +14 -1
  37. package/dist-lib/detox/index.cjs +16 -12
  38. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  39. package/dist-lib/expo-swift-bundle.cjs +3345 -2401
  40. package/dist-lib/expo-swift-metadata.cjs +1 -1
  41. package/dist-lib/expo-swift-metadata.mjs +1 -1
  42. package/dist-lib/home-paths.cjs +1 -1
  43. package/dist-lib/host/bridge-host.cjs +3869 -2832
  44. package/dist-lib/host/fetch-proxy-handler.cjs +3607 -1627
  45. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  46. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  47. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  48. package/dist-lib/host/websocket-proxy.cjs +1 -1
  49. package/dist-lib/index.cjs +14284 -12772
  50. package/dist-lib/jump-to-source-babel.cjs +1 -1
  51. package/dist-lib/jump-to-source-native.cjs +1 -1
  52. package/dist-lib/kotlin-host.cjs +6 -4
  53. package/dist-lib/menu.cjs +1 -1
  54. package/dist-lib/menu.mjs +1 -1
  55. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  56. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  57. package/dist-lib/metro-production-bundle.cjs +1 -1
  58. package/dist-lib/metro-production-bundle.mjs +1 -1
  59. package/dist-lib/metro.cjs +9796 -8347
  60. package/dist-lib/native-app-identity-project.cjs +2 -2
  61. package/dist-lib/native-app-identity-project.mjs +2 -3
  62. package/dist-lib/native-app-identity.cjs +1 -1
  63. package/dist-lib/native-app-identity.mjs +1 -1
  64. package/dist-lib/native-firebase-metadata.cjs +1 -1
  65. package/dist-lib/native-firebase-metadata.mjs +1 -1
  66. package/dist-lib/pdfium-raster.cjs +1 -1
  67. package/dist-lib/pdfium-raster.mjs +1 -1
  68. package/dist-lib/plist.cjs +1 -1
  69. package/dist-lib/plist.mjs +1 -1
  70. package/dist-lib/profiles.cjs +1 -1
  71. package/dist-lib/public-brand.cjs +1 -1
  72. package/dist-lib/public-origins-lib-esm.json +24 -24
  73. package/dist-lib/public-origins-lib.json +682 -292
  74. package/dist-lib/react-native-host-modules.cjs +1 -1
  75. package/dist-lib/react-native-host-modules.mjs +1 -1
  76. package/dist-lib/reap-browser.cjs +1 -1
  77. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  78. package/dist-lib/sdk.cjs +1 -1
  79. package/dist-lib/sdk.mjs +1 -1
  80. package/dist-lib/skills.cjs +4580 -3494
  81. package/dist-lib/swift-compile.cjs +426 -126
  82. package/dist-lib/swift-compile.mjs +429 -126
  83. package/dist-lib/swift-package.cjs +1 -1
  84. package/dist-lib/swift-package.mjs +1 -1
  85. package/dist-lib/swift-submit.cjs +1 -1
  86. package/dist-lib/swift-submit.mjs +1 -1
  87. package/dist-lib/swift-toolchain.cjs +1 -1
  88. package/dist-lib/swift.cjs +1 -1
  89. package/dist-lib/vite-swift.cjs +2529 -1611
  90. package/dist-lib/vite.cjs +7138 -4012
  91. package/dist-lib/worklet-executable.cjs +1 -1
  92. package/dist-lib/worklet-executable.mjs +1 -1
  93. package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
  94. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
  95. package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
  96. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +33 -1
  97. package/dist-types/packages/peach-engine/src/render-worker/reanimated-readiness.d.ts +1 -0
  98. package/dist-types/packages/peach-globals/src/appLifecycleBridgeContract.d.ts +1 -0
  99. package/dist-types/packages/peach-globals/src/index.d.ts +2 -1
  100. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +12 -0
  101. package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +6 -0
  102. package/java-platform/licenses/android.txt +183 -0
  103. package/java-platform/licenses/arm-optimized-routines.txt +256 -0
  104. package/java-platform/licenses/fdlibm.txt +72 -0
  105. package/java-platform/licenses/icu.txt +50 -0
  106. package/java-platform/licenses/openjdk.txt +395 -0
  107. package/java-platform/licenses/teavm.txt +182 -0
  108. package/java-platform/licenses/threeten-backport.txt +29 -0
  109. package/kotlin/README.md +1 -1
  110. package/kotlin/sdk.tar.gz +0 -0
  111. package/package.json +2 -1
  112. package/runtime-companion.json +1 -1
  113. package/sdk/ios/wasm/include/__typedef_time_t.h +5 -0
  114. package/sdk/ios/wasm/include/ifaddrs.h +75 -0
  115. package/sdk/ios/wasm/include/machine/_types.h +1 -1
  116. package/sdk/ios/wasm/include/pthread.h +4 -0
  117. package/sdk/ios/wasm/include/unistd.h +2 -0
  118. package/{cli → src}/app-config.ts +5 -5
  119. package/src/bundle-channel.mjs +1 -1
  120. package/src/config.ts +29 -0
  121. package/src/core-data-entity-classes.ts +2 -2
  122. package/src/core-data-model.ts +681 -0
  123. package/src/expo-autolinking.ts +47 -4
  124. package/src/expo-pod-prebuilt.ts +96 -9
  125. package/src/expo-swift-host.ts +30 -10
  126. package/src/kotlin-host.ts +4 -2
  127. package/src/kotlinSdkContract.ts +1 -0
  128. package/src/metro-plugin.ts +1 -3
  129. package/src/native-package-slice.ts +810 -0
  130. package/src/native-prebuilt.ts +4 -0
  131. package/src/native-seam-manifest.ts +0 -8
  132. package/src/nitro-adapter.lock.json +261 -261
  133. package/src/nitro-bundle.ts +1 -1
  134. package/src/nitro-superset.lock.json +4 -4
  135. package/src/plist-bytes.ts +113 -0
  136. package/src/swift-compile.ts +2 -0
  137. package/src/swift-distribution.lock.json +11 -11
  138. package/src/swift-guest-image-ledger.ts +2 -1
  139. package/src/swift-host.ts +14 -2
  140. package/src/swift-link-roots.ts +23 -22
  141. package/src/swift-wasm-prune.ts +436 -105
  142. package/src/turbo-bundle.ts +1 -1
  143. package/src/turbo-runtime.lock.json +22 -22
  144. package/src/vite-plugin-one.ts +68 -0
@@ -0,0 +1,182 @@
1
+ The Java platform translates TeaVM classlib 0.16.0 (https://github.com/konsoletyper/teavm, classlib/)
2
+ and its overlay/ files adapt it.
3
+ Copyright 2013-2021 Alexey Andreev and TeaVM contributors
4
+
5
+ Licensed under the Apache License, Version 2.0:
6
+
7
+ Apache License
8
+ Version 2.0, January 2004
9
+ http://www.apache.org/licenses/
10
+
11
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12
+
13
+ 1. Definitions.
14
+
15
+ "License" shall mean the terms and conditions for use, reproduction,
16
+ and distribution as defined by Sections 1 through 9 of this document.
17
+
18
+ "Licensor" shall mean the copyright owner or entity authorized by
19
+ the copyright owner that is granting the License.
20
+
21
+ "Legal Entity" shall mean the union of the acting entity and all
22
+ other entities that control, are controlled by, or are under common
23
+ control with that entity. For the purposes of this definition,
24
+ "control" means (i) the power, direct or indirect, to cause the
25
+ direction or management of such entity, whether by contract or
26
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
27
+ outstanding shares, or (iii) beneficial ownership of such entity.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity
30
+ exercising permissions granted by this License.
31
+
32
+ "Source" form shall mean the preferred form for making modifications,
33
+ including but not limited to software source code, documentation
34
+ source, and configuration files.
35
+
36
+ "Object" form shall mean any form resulting from mechanical
37
+ transformation or translation of a Source form, including but
38
+ not limited to compiled object code, generated documentation,
39
+ and conversions to other media types.
40
+
41
+ "Work" shall mean the work of authorship, whether in Source or
42
+ Object form, made available under the License, as indicated by a
43
+ copyright notice that is included in or attached to the work
44
+ (an example is provided in the Appendix below).
45
+
46
+ "Derivative Works" shall mean any work, whether in Source or Object
47
+ form, that is based on (or derived from) the Work and for which the
48
+ editorial revisions, annotations, elaborations, or other modifications
49
+ represent, as a whole, an original work of authorship. For the purposes
50
+ of this License, Derivative Works shall not include works that remain
51
+ separable from, or merely link (or bind by name) to the interfaces of,
52
+ the Work and Derivative Works thereof.
53
+
54
+ "Contribution" shall mean any work of authorship, including
55
+ the original version of the Work and any modifications or additions
56
+ to that Work or Derivative Works thereof, that is intentionally
57
+ submitted to Licensor for inclusion in the Work by the copyright owner
58
+ or by an individual or Legal Entity authorized to submit on behalf of
59
+ the copyright owner. For the purposes of this definition, "submitted"
60
+ means any form of electronic, verbal, or written communication sent
61
+ to the Licensor or its representatives, including but not limited to
62
+ communication on electronic mailing lists, source code control systems,
63
+ and issue tracking systems that are managed by, or on behalf of, the
64
+ Licensor for the purpose of discussing and improving the Work, but
65
+ excluding communication that is conspicuously marked or otherwise
66
+ designated in writing by the copyright owner as "Not a Contribution."
67
+
68
+ "Contributor" shall mean Licensor and any individual or Legal Entity
69
+ on behalf of whom a Contribution has been received by Licensor and
70
+ subsequently incorporated within the Work.
71
+
72
+ 2. Grant of Copyright License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ copyright license to reproduce, prepare Derivative Works of,
76
+ publicly display, publicly perform, sublicense, and distribute the
77
+ Work and such Derivative Works in Source or Object form.
78
+
79
+ 3. Grant of Patent License. Subject to the terms and conditions of
80
+ this License, each Contributor hereby grants to You a perpetual,
81
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82
+ (except as stated in this section) patent license to make, have made,
83
+ use, offer to sell, sell, import, and otherwise transfer the Work,
84
+ where such license applies only to those patent claims licensable
85
+ by such Contributor that are necessarily infringed by their
86
+ Contribution(s) alone or by combination of their Contribution(s)
87
+ with the Work to which such Contribution(s) was submitted. If You
88
+ institute patent litigation against any entity (including a
89
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
90
+ or a Contribution incorporated within the Work constitutes direct
91
+ or contributory patent infringement, then any patent licenses
92
+ granted to You under this License for that Work shall terminate
93
+ as of the date such litigation is filed.
94
+
95
+ 4. Redistribution. You may reproduce and distribute copies of the
96
+ Work or Derivative Works thereof in any medium, with or without
97
+ modifications, and in Source or Object form, provided that You
98
+ meet the following conditions:
99
+
100
+ (a) You must give any other recipients of the Work or
101
+ Derivative Works a copy of this License; and
102
+
103
+ (b) You must cause any modified files to carry prominent notices
104
+ stating that You changed the files; and
105
+
106
+ (c) You must retain, in the Source form of any Derivative Works
107
+ that You distribute, all copyright, patent, trademark, and
108
+ attribution notices from the Source form of the Work,
109
+ excluding those notices that do not pertain to any part of
110
+ the Derivative Works; and
111
+
112
+ (d) If the Work includes a "NOTICE" text file as part of its
113
+ distribution, then any Derivative Works that You distribute must
114
+ include a readable copy of the attribution notices contained
115
+ within such NOTICE file, excluding those notices that do not
116
+ pertain to any part of the Derivative Works, in at least one
117
+ of the following places: within a NOTICE text file distributed
118
+ as part of the Derivative Works; within the Source form or
119
+ documentation, if provided along with the Derivative Works; or,
120
+ within a display generated by the Derivative Works, if and
121
+ wherever such third-party notices normally appear. The contents
122
+ of the NOTICE file are for informational purposes only and
123
+ do not modify the License. You may add Your own attribution
124
+ notices within Derivative Works that You distribute, alongside
125
+ or as an addendum to the NOTICE text from the Work, provided
126
+ that such additional attribution notices cannot be construed
127
+ as modifying the License.
128
+
129
+ You may add Your own copyright statement to Your modifications and
130
+ may provide additional or different license terms and conditions
131
+ for use, reproduction, or distribution of Your modifications, or
132
+ for any such Derivative Works as a whole, provided Your use,
133
+ reproduction, and distribution of the Work otherwise complies with
134
+ the conditions stated in this License.
135
+
136
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
137
+ any Contribution intentionally submitted for inclusion in the Work
138
+ by You to the Licensor shall be under the terms and conditions of
139
+ this License, without any additional terms or conditions.
140
+ Notwithstanding the above, nothing herein shall supersede or modify
141
+ the terms of any separate license agreement you may have executed
142
+ with Licensor regarding such Contributions.
143
+
144
+ 6. Trademarks. This License does not grant permission to use the trade
145
+ names, trademarks, service marks, or product names of the Licensor,
146
+ except as required for reasonable and customary use in describing the
147
+ origin of the Work and reproducing the content of the NOTICE file.
148
+
149
+ 7. Disclaimer of Warranty. Unless required by applicable law or
150
+ agreed to in writing, Licensor provides the Work (and each
151
+ Contributor provides its Contributions) on an "AS IS" BASIS,
152
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
153
+ implied, including, without limitation, any warranties or conditions
154
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
155
+ PARTICULAR PURPOSE. You are solely responsible for determining the
156
+ appropriateness of using or redistributing the Work and assume any
157
+ risks associated with Your exercise of permissions under this License.
158
+
159
+ 8. Limitation of Liability. In no event and under no legal theory,
160
+ whether in tort (including negligence), contract, or otherwise,
161
+ unless required by applicable law (such as deliberate and grossly
162
+ negligent acts) or agreed to in writing, shall any Contributor be
163
+ liable to You for damages, including any direct, indirect, special,
164
+ incidental, or consequential damages of any character arising as a
165
+ result of this License or out of the use or inability to use the
166
+ Work (including but not limited to damages for loss of goodwill,
167
+ work stoppage, computer failure or malfunction, or any and all
168
+ other commercial damages or losses), even if such Contributor
169
+ has been advised of the possibility of such damages.
170
+
171
+ 9. Accepting Warranty or Additional Liability. While redistributing
172
+ the Work or Derivative Works thereof, You may choose to offer,
173
+ and charge a fee for, acceptance of support, warranty, indemnity,
174
+ or other liability obligations and/or rights consistent with this
175
+ License. However, in accepting such obligations, You may act only
176
+ on Your own behalf and on Your sole responsibility, not on behalf
177
+ of any other Contributor, and only if You agree to indemnify,
178
+ defend, and hold each Contributor harmless for any liability
179
+ incurred by, or claims asserted against, such Contributor by reason
180
+ of your accepting any such warranty or additional liability.
181
+
182
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,29 @@
1
+ Copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos.
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ * Neither the name of JSR-310 nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software
17
+ without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/kotlin/README.md CHANGED
@@ -96,7 +96,7 @@ runtime behavior, with no Compose UI or Android pixel grade. UI fixtures still
96
96
  use the paired Compose oracle.
97
97
 
98
98
  The npm package publishes `sdk.tar.gz`, `toolchain.json`, this documentation
99
- and fork licenses and notices. The standalone embeds those same binary SDK and
99
+ and fork and Java platform licenses and notices. The standalone embeds those same binary SDK and
100
100
  toolchain bytes. Raw Kotlin SDK sources, compiler sources, JVM tool sources,
101
101
  fork recipes and development fixtures remain in private Git. The package smoke
102
102
  check verifies the compiled archive and rejects raw SDK inputs in actual npm
package/kotlin/sdk.tar.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2253",
3
+ "version": "0.1.2257",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -331,6 +331,7 @@
331
331
  "kotlin/fork/LICENSE",
332
332
  "kotlin/fork/SKIA_LICENSE",
333
333
  "kotlin/fork/NOTICE",
334
+ "java-platform/licenses/",
334
335
  "skills/",
335
336
  "scripts/dev-server-scanner.ts",
336
337
  "scripts/optional-demo-registry.ts",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"3f866674ef9cb3c9dd8d40d8b28a4b9c1131b5c5f7fa6504651570ed7ce753a3","file":"node/cli-3f866674ef9cb3c9dd8d40d8b28a4b9c1131b5c5f7fa6504651570ed7ce753a3.cjs"}
1
+ {"abi":1,"sha256":"57b07bccdba28c1c59c27ea3e84683c1b3ffed983ede473771ab16d1c5068e8c","file":"node/cli-57b07bccdba28c1c59c27ea3e84683c1b3ffed983ede473771ab16d1c5068e8c.cjs"}
@@ -0,0 +1,5 @@
1
+ #pragma once
2
+ #define __wasilibc___typedef_time_t_h
3
+ // darwin's time_t is long, which swift imports as Int; the installed libc's long
4
+ // long imports as Int64. both are 64 bits wide in the guest.
5
+ typedef long time_t;
@@ -0,0 +1,75 @@
1
+ #pragma once
2
+ // darwin's ifaddrs record, as the ios sdk declares it: the installed libc's keeps the
3
+ // destination in a union and defines ifa_dstaddr as a macro, which swift cannot import.
4
+ #include <sys/types.h>
5
+ #include <sys/socket.h>
6
+ /*
7
+ * Copyright (c) 2018 Apple Inc. All rights reserved.
8
+ */
9
+ /* $FreeBSD: src/include/ifaddrs.h,v 1.3.32.1.4.1 2010/06/14 02:09:06 kensmith Exp $ */
10
+
11
+ /*
12
+ * Copyright (c) 1995, 1999
13
+ * Berkeley Software Design, Inc. All rights reserved.
14
+ *
15
+ * Redistribution and use in source and binary forms, with or without
16
+ * modification, are permitted provided that the following conditions
17
+ * are met:
18
+ * 1. Redistributions of source code must retain the above copyright
19
+ * notice, this list of conditions and the following disclaimer.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
22
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
+ * SUCH DAMAGE.
32
+ *
33
+ * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
34
+ */
35
+
36
+ #ifndef _IFADDRS_H_
37
+ #define _IFADDRS_H_
38
+
39
+ #include <os/availability.h>
40
+
41
+ struct ifaddrs {
42
+ struct ifaddrs *ifa_next;
43
+ char *ifa_name;
44
+ unsigned int ifa_flags;
45
+ struct sockaddr *ifa_addr;
46
+ struct sockaddr *ifa_netmask;
47
+ struct sockaddr *ifa_dstaddr;
48
+ void *ifa_data;
49
+ };
50
+
51
+ /*
52
+ * This may have been defined in <net/if.h>. Note that if <net/if.h> is
53
+ * to be included it must be included before this header file.
54
+ */
55
+ #ifndef ifa_broadaddr
56
+ #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
57
+ #endif
58
+
59
+ struct ifmaddrs {
60
+ struct ifmaddrs *ifma_next;
61
+ struct sockaddr *ifma_name;
62
+ struct sockaddr *ifma_addr;
63
+ struct sockaddr *ifma_lladdr;
64
+ };
65
+
66
+ #include <sys/cdefs.h>
67
+
68
+ __BEGIN_DECLS
69
+ extern int getifaddrs(struct ifaddrs **);
70
+ extern void freeifaddrs(struct ifaddrs *);
71
+ extern int getifmaddrs(struct ifmaddrs **) API_AVAILABLE(macos(10.7), ios(4.3), watchos(4.0), tvos(11.0));
72
+ extern void freeifmaddrs(struct ifmaddrs *) API_AVAILABLE(macos(10.7), ios(4.3), watchos(4.0), tvos(11.0));
73
+ __END_DECLS
74
+
75
+ #endif
@@ -143,7 +143,7 @@ typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */
143
143
  typedef long long __darwin_clock_t; /* clock() */
144
144
  typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */
145
145
  typedef long __darwin_ssize_t; /* byte count or error */
146
- typedef long long __darwin_time_t; /* time() */
146
+ typedef long __darwin_time_t; /* time() */
147
147
 
148
148
  #undef USE_CLANG_TYPES
149
149
  #else
@@ -57,7 +57,11 @@ int pthread_cond_timedwait(pthread_cond_t *__restrict, pthread_mutex_t *__restri
57
57
  int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *, const struct timespec *)
58
58
  __asm__("__peach_darwin_pthread_cond_timedwait_relative_np");
59
59
  // darwin hands out 512 thread-specific keys from 256; these bind to its table.
60
+ #pragma clang assume_nonnull begin
60
61
  int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *)) __asm__("__peach_darwin_pthread_key_create");
62
+ // darwin's swift-importer shape: the start routine and its argument import non-optional.
63
+ int pthread_create(pthread_t _Nullable * _Nonnull __restrict, const pthread_attr_t * _Nullable __restrict, void * _Nullable (* _Nonnull)(void *), void * _Nullable __restrict);
64
+ #pragma clang assume_nonnull end
61
65
  int pthread_key_delete(pthread_key_t) __asm__("__peach_darwin_pthread_key_delete");
62
66
  void * _Nullable pthread_getspecific(pthread_key_t) __asm__("__peach_darwin_pthread_getspecific");
63
67
  int pthread_setspecific(pthread_key_t, const void * _Nullable) __asm__("__peach_darwin_pthread_setspecific");
@@ -8,6 +8,7 @@
8
8
  // darwin's cancellation points bind to the darwin provider, which acts on a
9
9
  // pending cancel first, and getcwd binds to the provider that refuses an
10
10
  // empty buffer as darwin does.
11
+ #include <sys/_types/_mode_t.h>
11
12
  #include_next <unistd.h>
12
13
  // darwin unistd.h includes Availability.h, which defines __API_AVAILABLE for
13
14
  // headers such as vImage_Types.h that only include os/availability.h.
@@ -30,6 +31,7 @@ int pthread_getugid_np(uid_t *, gid_t *);
30
31
  int dup(int) __asm__("__peach_darwin_dup");
31
32
  int dup2(int, int) __asm__("__peach_darwin_dup2");
32
33
  int pipe(int [2]);
34
+ int mkpath_np(const char *, mode_t);
33
35
  #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
34
36
  long syscall(long, ...);
35
37
  #endif
@@ -1,11 +1,11 @@
1
1
  import { readFileSync } from 'node:fs'
2
2
  import path from 'node:path'
3
3
  import { createJiti } from 'jiti'
4
- import * as peachConfigModule from '../src/config'
5
- import { isPeachConfig, type PeachConfig } from '../src/config'
6
- import { rnxPublicBrand } from '../src/public-brand'
7
- import { resolveAppProject, type ResolvedAppProject } from './app-project'
8
- import { resolveAppStubs, wireSlotMigration, type AppStubs } from './app-stubs'
4
+ import { resolveAppProject, type ResolvedAppProject } from '../cli/app-project'
5
+ import { resolveAppStubs, wireSlotMigration, type AppStubs } from '../cli/app-stubs'
6
+ import * as peachConfigModule from './config'
7
+ import { isPeachConfig, type PeachConfig } from './config'
8
+ import { rnxPublicBrand } from './public-brand'
9
9
 
10
10
  // `{ file }` entries are relative to the config file; the engine loads them by
11
11
  // absolute path from the runtime's replacement-module endpoint.
@@ -391,7 +391,7 @@ async function packagePlatformBundle(
391
391
  }
392
392
 
393
393
  async function readPackagingInputs(projectRoot) {
394
- const { resolveRNXAppConfig } = await import('../cli/app-config')
394
+ const { resolveRNXAppConfig } = await import('./app-config')
395
395
  const { config } = await resolveRNXAppConfig(projectRoot)
396
396
  return { config, versions: await readInstalledNativePackageVersionsAsync(projectRoot) }
397
397
  }
package/src/config.ts CHANGED
@@ -28,6 +28,35 @@ export type ModuleResolution =
28
28
  | { file: string } // resolve to a file relative to the config
29
29
  | { inline: Record<string, any> } // inline stub object
30
30
 
31
+ // a production bundle has no module paths, so the build tags each workspace
32
+ // module a config `modules` entry names with an assignment of this global to the
33
+ // entry's key; the engine finds the tagged factory and substitutes it
34
+ export const PEACH_WORKSPACE_MODULE_MARKER = '__peach_workspace_module'
35
+
36
+ // match a metro module name against config.modules patterns.
37
+ // config keys match as path prefixes: key "modules/bottom-sheet" matches
38
+ // any module whose name contains "/modules/bottom-sheet/"
39
+ export function matchConfigModule(
40
+ name: string,
41
+ modules: Record<string, ModuleResolution>,
42
+ ): { pattern: string; resolution: ModuleResolution } | undefined {
43
+ // sort by specificity (longest key first)
44
+ const entries = Object.entries(modules).sort((a, b) => b[0].length - a[0].length)
45
+ const modulePath = name.startsWith('/') ? name : `/${name}`
46
+ for (const [pattern, resolution] of entries) {
47
+ if (
48
+ modulePath.includes(`/${pattern}/`) ||
49
+ modulePath.endsWith(`/${pattern}`) ||
50
+ modulePath.endsWith(`/${pattern}.js`) ||
51
+ modulePath.endsWith(`/${pattern}.ts`) ||
52
+ modulePath.endsWith(`/${pattern}.tsx`)
53
+ ) {
54
+ return { pattern, resolution }
55
+ }
56
+ }
57
+ return undefined
58
+ }
59
+
31
60
  export type NativeModuleResolution = ModuleResolution | Record<string, any> // direct native module object for non-url configs
32
61
 
33
62
  // an app's own native view, keyed by its `requireNativeComponent` name or, for
@@ -7,7 +7,7 @@ import { parsePlistSource } from './plist'
7
7
  // rule here was read from momc 27.1 --action generate (swift 5, iOS 17); a model
8
8
  // feature whose output was not observed is refused, never guessed.
9
9
 
10
- type Tag = { name: string; attrs: Record<string, string>; children: Tag[] }
10
+ export type Tag = { name: string; attrs: Record<string, string>; children: Tag[] }
11
11
 
12
12
  const unescapeXml = (value: string) =>
13
13
  value
@@ -18,7 +18,7 @@ const unescapeXml = (value: string) =>
18
18
  .replace(/&amp;/g, '&')
19
19
 
20
20
  // the model format is plain tags and attributes with no text content.
21
- function parseModel(xml: string): Tag {
21
+ export function parseModel(xml: string): Tag {
22
22
  const root: Tag = { name: '#root', attrs: {}, children: [] }
23
23
  const stack = [root]
24
24
  for (const match of xml.matchAll(