peachsim 0.1.2532 → 0.1.2534
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/detox/index.ts +16 -6
- 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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +63 -9
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +9 -6
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-TZ5PF3KN.mjs → acorn-GB67SLNU.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-42SSRZYU.mjs → chunk-2PUDNDU7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZHGKXGBN.mjs → chunk-65RCRIMW.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5QYIUNH4.mjs → chunk-6EGZPYF5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ID63CARL.mjs → chunk-75RKEQ6M.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-J4BQEGDW.mjs → chunk-AW5DPA3H.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JBDDB6NG.mjs → chunk-CAIVF3PI.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-XS6UNGOO.mjs → chunk-EKZXXZNX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5MPQROQI.mjs → chunk-GPA3KEFG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CLSNUKAZ.mjs → chunk-GUX4YTIU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UHYLBEKZ.mjs → chunk-HXSB45EC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2XASNK6T.mjs → chunk-KNOHRPR5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZZ6DQAJY.mjs → chunk-KORHX5QS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2MKQPSDN.mjs → chunk-LZ76GN6Q.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NCQGQ6PA.mjs → chunk-NIZ6J346.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IOTWFHYU.mjs → chunk-RUPB6BBQ.mjs} +27 -15
- package/dist-lib/esm-chunks/{chunk-YGCMYVJ5.mjs → chunk-UWAHIEUH.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-O6O4F2TV.mjs → chunk-W2E3WW5J.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Q3P3TYU7.mjs → chunk-W5QP7KUQ.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-6NED5Q2N.mjs → chunk-WXRYCPQZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AWTELPIZ.mjs → chunk-XPTK6MCE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-G5BCU5ZO.mjs → chunk-YVLL46OY.mjs} +2 -2
- package/dist-lib/esm-chunks/{metro-layout-parser-QE6OG7ST.mjs → metro-layout-parser-DRSCLVZZ.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-GSQHH7HN.mjs → swift-package-prebuilt-V5BV4JOC.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-Y6SPJUF6.mjs → swift-sdk-app-module-IF4ZL6UH.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-RLJ2JW6P.mjs → swift-sdk-image-L7IJHF2J.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-YOUR3PUP.mjs → swift-sdk-image-producer-NLBMGMMU.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +62 -8
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +63 -9
- package/dist-lib/host/fetch-proxy-handler.cjs +5 -5
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -79
- package/dist-lib/public-origins-lib.json +69 -69
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +7 -7
- package/dist-lib/skills.cjs +63 -9
- package/dist-lib/swift-compile.cjs +16 -4
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +5 -5
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/swift-compile.ts +18 -2
- package/src/turbo-source.ts +43 -1
package/src/swift-compile.ts
CHANGED
|
@@ -206,6 +206,7 @@ async function runCompiler(
|
|
|
206
206
|
signal?: AbortSignal
|
|
207
207
|
lease?: SwiftRootLease
|
|
208
208
|
frameworkLease?: SwiftRootLease
|
|
209
|
+
temporaryDirectory?: string
|
|
209
210
|
/** applied over the confined scratch environment, for a child that cannot use the host's. */
|
|
210
211
|
confined?: Record<string, string>
|
|
211
212
|
},
|
|
@@ -216,7 +217,11 @@ async function runCompiler(
|
|
|
216
217
|
signal?.throwIfAborted()
|
|
217
218
|
const launch = {
|
|
218
219
|
cwd: options.cwd,
|
|
219
|
-
env: {
|
|
220
|
+
env: {
|
|
221
|
+
...swiftEnvironment(options.env),
|
|
222
|
+
...(options.temporaryDirectory ? { TMPDIR: options.temporaryDirectory } : {}),
|
|
223
|
+
...options.confined,
|
|
224
|
+
},
|
|
220
225
|
uid: options.uid,
|
|
221
226
|
gid: options.gid,
|
|
222
227
|
detached: true,
|
|
@@ -8393,6 +8398,10 @@ async function compileSwiftProjectOnce(
|
|
|
8393
8398
|
const projectProcess = options.project
|
|
8394
8399
|
? prepareSwiftProjectProcess(root, options.project)
|
|
8395
8400
|
: undefined
|
|
8401
|
+
// swiftpm hashes TMPDIR into its plan. the root lock owns this scratch.
|
|
8402
|
+
const temporaryDirectory = projectProcess
|
|
8403
|
+
? undefined
|
|
8404
|
+
: path.join(root, '.build', 'peach-compiler-tmp')
|
|
8396
8405
|
const appOptions = projectProcess
|
|
8397
8406
|
? {
|
|
8398
8407
|
...buildOptions,
|
|
@@ -8400,7 +8409,11 @@ async function compileSwiftProjectOnce(
|
|
|
8400
8409
|
gid: projectProcess.gid,
|
|
8401
8410
|
confined: { ...projectProcess.env, ...compiler },
|
|
8402
8411
|
}
|
|
8403
|
-
: {
|
|
8412
|
+
: {
|
|
8413
|
+
...buildOptions,
|
|
8414
|
+
temporaryDirectory,
|
|
8415
|
+
env: { ...buildOptions.env, ...compiler },
|
|
8416
|
+
}
|
|
8404
8417
|
const unprepared = preparation.targetFailures.map(
|
|
8405
8418
|
(failure) => `error: target ${failure}`,
|
|
8406
8419
|
)
|
|
@@ -8752,6 +8765,7 @@ async function compileSwiftProjectOnce(
|
|
|
8752
8765
|
)
|
|
8753
8766
|
: runApp()
|
|
8754
8767
|
try {
|
|
8768
|
+
if (temporaryDirectory) mkdirSync(temporaryDirectory, { recursive: true })
|
|
8755
8769
|
await compileApp()
|
|
8756
8770
|
} catch (error) {
|
|
8757
8771
|
const output = outputOf(error)
|
|
@@ -8787,6 +8801,8 @@ async function compileSwiftProjectOnce(
|
|
|
8787
8801
|
)
|
|
8788
8802
|
}
|
|
8789
8803
|
} finally {
|
|
8804
|
+
if (temporaryDirectory)
|
|
8805
|
+
rmSync(temporaryDirectory, { recursive: true, force: true })
|
|
8790
8806
|
// a manifest, macro or build tool can leave processes behind that
|
|
8791
8807
|
// outlive the compiler's own group; none runs once the host reads.
|
|
8792
8808
|
if (options.project) endSwiftProjectProcesses(options.project)
|
package/src/turbo-source.ts
CHANGED
|
@@ -3301,6 +3301,7 @@ const FABRIC_HOST_INCLUDES = `#import <Foundation/Foundation.h>
|
|
|
3301
3301
|
#import <React/RCTComponentViewFactory.h>
|
|
3302
3302
|
#import <React/RCTComponentViewProtocol.h>
|
|
3303
3303
|
#import <React/RCTComponentViewRegistry.h>
|
|
3304
|
+
#import <React/RCTMountingTransactionObserverCoordinator.h>
|
|
3304
3305
|
#import <React/RCTViewComponentView.h>
|
|
3305
3306
|
#import <ReactCommon/RCTTurboModule.h>
|
|
3306
3307
|
#include <ReactCommon/CallInvoker.h>
|
|
@@ -4378,6 +4379,9 @@ struct PeachFabricView {
|
|
|
4378
4379
|
};
|
|
4379
4380
|
PeachFabricComponents *fabricComponents;
|
|
4380
4381
|
RCTComponentViewRegistry *fabricRegistry;
|
|
4382
|
+
// RCTMountingManager notifies the views that observe its transactions
|
|
4383
|
+
RCTMountingTransactionObserverCoordinator fabricObservers;
|
|
4384
|
+
react::MountingTransaction::Number fabricTransactions = 0;
|
|
4381
4385
|
std::shared_ptr<react::ContextContainer> fabricContext;
|
|
4382
4386
|
react::ComponentDescriptorRegistry::Shared fabricDescriptors;
|
|
4383
4387
|
std::shared_ptr<react::CallInvoker> fabricInvoker;
|
|
@@ -4943,6 +4947,7 @@ ${
|
|
|
4943
4947
|
} family->getEventEmitter()->setEnabled(true);
|
|
4944
4948
|
UIView<RCTComponentViewProtocol> *componentView =
|
|
4945
4949
|
[fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
|
|
4950
|
+
fabricObservers.registerViewComponentDescriptor([fabricRegistry componentViewDescriptorWithTag:tag], -1);
|
|
4946
4951
|
UIView *slotView = [[UIView alloc] initWithFrame:CGRectZero];
|
|
4947
4952
|
slotView.clipsToBounds = NO;
|
|
4948
4953
|
slotView.opaque = NO;
|
|
@@ -5015,6 +5020,7 @@ ${
|
|
|
5015
5020
|
}
|
|
5016
5021
|
view.family->getEventEmitter()->setEnabled(false);
|
|
5017
5022
|
RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
|
|
5023
|
+
fabricObservers.unregisterViewComponentDescriptor(descriptor, -1);
|
|
5018
5024
|
for (const auto &[hostId, viewTag] : fabricTagAliases) {
|
|
5019
5025
|
if (viewTag != tag) continue;
|
|
5020
5026
|
detachFabricChildren(hostId);
|
|
@@ -5090,6 +5096,37 @@ ${
|
|
|
5090
5096
|
auto desired = next.find(parent);
|
|
5091
5097
|
if (desired == next.end() || previous != desired->second) changedParents.push_back(parent);
|
|
5092
5098
|
}
|
|
5099
|
+
// the mutations RCTMountingManager hands the views observing its
|
|
5100
|
+
// transactions, such as a stack that pushes the screens mounted into it
|
|
5101
|
+
react::ShadowViewMutationList mutations;
|
|
5102
|
+
auto shadow = [](UIView *view) {
|
|
5103
|
+
react::ShadowView shadow;
|
|
5104
|
+
shadow.tag = static_cast<react::Tag>(view.tag);
|
|
5105
|
+
return shadow;
|
|
5106
|
+
};
|
|
5107
|
+
for (int parent : changedParents) {
|
|
5108
|
+
const auto &previous = fabricChildren.at(parent);
|
|
5109
|
+
const auto parentTag = static_cast<react::Tag>(fabricPeers.at(parent).tag);
|
|
5110
|
+
for (size_t index = previous.size(); index > 0; --index)
|
|
5111
|
+
mutations.push_back(react::ShadowViewMutation::RemoveMutation(
|
|
5112
|
+
parentTag, shadow(fabricPeers.at(previous[index - 1])), static_cast<int>(index - 1)));
|
|
5113
|
+
}
|
|
5114
|
+
for (const auto &[id, peer] : fabricPeers)
|
|
5115
|
+
if (!active.count(id) && peer.tag) mutations.push_back(react::ShadowViewMutation::DeleteMutation(shadow(peer)));
|
|
5116
|
+
for (const auto &[id, children] : next) {
|
|
5117
|
+
auto mounted = fabricChildren.find(id);
|
|
5118
|
+
if (mounted != fabricChildren.end() && mounted->second == children) continue;
|
|
5119
|
+
const auto parentTag = static_cast<react::Tag>(fabricPeers.at(id).tag);
|
|
5120
|
+
for (size_t index = 0; index < children.size(); ++index)
|
|
5121
|
+
mutations.push_back(react::ShadowViewMutation::InsertMutation(
|
|
5122
|
+
parentTag, shadow(fabricPeers.at(children[index])), static_cast<int>(index)));
|
|
5123
|
+
}
|
|
5124
|
+
std::optional<react::MountingTransaction> transaction;
|
|
5125
|
+
const react::SurfaceTelemetry telemetry;
|
|
5126
|
+
if (!mutations.empty()) {
|
|
5127
|
+
transaction.emplace(-1, ++fabricTransactions, std::move(mutations), react::TransactionTelemetry{});
|
|
5128
|
+
fabricObservers.notifyObserversMountingTransactionWillMount(*transaction, telemetry);
|
|
5129
|
+
}
|
|
5093
5130
|
for (int parent : changedParents) detachFabricChildren(parent);
|
|
5094
5131
|
for (auto it = fabricPeers.begin(); it != fabricPeers.end();) {
|
|
5095
5132
|
if (active.count(it->first)) ++it;
|
|
@@ -5114,6 +5151,7 @@ ${
|
|
|
5114
5151
|
}
|
|
5115
5152
|
fabricChildren[id] = std::move(desired->second);
|
|
5116
5153
|
}
|
|
5154
|
+
if (transaction) fabricObservers.notifyObserversMountingTransactionDidMount(*transaction, telemetry);
|
|
5117
5155
|
for (int id : roots) [fabricPeers.at(id) layoutIfNeeded];
|
|
5118
5156
|
std::vector<jsi::Value> results;
|
|
5119
5157
|
for (int hostId : active) {
|
|
@@ -5155,7 +5193,7 @@ ${
|
|
|
5155
5193
|
method("readOffsets", 0, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *, size_t) -> jsi::Value {
|
|
5156
5194
|
applyFabricFocus();
|
|
5157
5195
|
std::vector<double> packed;
|
|
5158
|
-
packed.reserve(fabricViews.size() *
|
|
5196
|
+
packed.reserve(fabricViews.size() * 4 + 4);
|
|
5159
5197
|
for (const auto &entry : fabricViews) {
|
|
5160
5198
|
int tag = entry.first;
|
|
5161
5199
|
UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
@@ -5167,6 +5205,9 @@ ${
|
|
|
5167
5205
|
packed.push_back(static_cast<double>(tag));
|
|
5168
5206
|
packed.push_back(dx);
|
|
5169
5207
|
packed.push_back(dy);
|
|
5208
|
+
// a view its native parent took out of the window draws nothing, as
|
|
5209
|
+
// UINavigationController does to a covered screen
|
|
5210
|
+
packed.push_back(componentView._peachDrawsInFabricSlot && !componentView.window ? 0.0 : 1.0);
|
|
5170
5211
|
}
|
|
5171
5212
|
UIWindow *kw = UIApplication.sharedApplication.keyWindow ?: RCTKeyWindow();
|
|
5172
5213
|
UIView *rootView = kw ? kw.rootViewController.viewIfLoaded : nil;
|
|
@@ -5175,6 +5216,7 @@ ${
|
|
|
5175
5216
|
packed.push_back(0.0);
|
|
5176
5217
|
packed.push_back(rootFrame.origin.x);
|
|
5177
5218
|
packed.push_back(rootFrame.origin.y);
|
|
5219
|
+
packed.push_back(1.0);
|
|
5178
5220
|
jsi::Array out(rt, packed.size());
|
|
5179
5221
|
for (size_t i = 0; i < packed.size(); i++) {
|
|
5180
5222
|
out.setValueAtIndex(rt, i, jsi::Value(packed[i]));
|