peachsim 0.1.800 → 0.1.809
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/drivers/playwright-sim-host.ts +2 -0
- package/cli/outbound-endpoints.ts +0 -4
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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 +132 -10
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +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/detox/index.cjs +46 -7
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +132 -10
- 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 +252 -108
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- 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/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/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.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 +252 -108
- package/dist-lib/swift-compile.cjs +141 -11
- package/dist-lib/swift-compile.mjs +140 -11
- 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 +132 -10
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +119 -0
- package/dist-lib/worklet-executable.mjs +93 -0
- package/package.json +9 -1
- package/src/swift-compile.ts +160 -11
- package/src/vite-plugin.ts +5 -2
- package/src/worklet-executable.ts +125 -0
- package/src/worklets-babel.ts +47 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -2045,7 +2045,7 @@ var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"'
|
|
|
2045
2045
|
var MULTI_MANIFEST_VERSION = 12;
|
|
2046
2046
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
2047
2047
|
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
2048
|
-
hash.update(`swift-compile/
|
|
2048
|
+
hash.update(`swift-compile/v20
|
|
2049
2049
|
${release}
|
|
2050
2050
|
`);
|
|
2051
2051
|
if (input.oneModule) hash.update("one-module\n");
|
|
@@ -2643,6 +2643,125 @@ function lowerNotificationDelegate(source) {
|
|
|
2643
2643
|
result = result.slice(0, at) + text3 + result.slice(at + count);
|
|
2644
2644
|
return result;
|
|
2645
2645
|
}
|
|
2646
|
+
function tableProtocolConformances(sources) {
|
|
2647
|
+
const parents = /* @__PURE__ */ new Map();
|
|
2648
|
+
for (const source of sources) {
|
|
2649
|
+
const code = swiftCodeMask(source);
|
|
2650
|
+
for (const owner of code.matchAll(
|
|
2651
|
+
/\b(?:class|extension)\s+([A-Za-z_]\w*)\s*:\s*([^{}]+)\{/g
|
|
2652
|
+
)) {
|
|
2653
|
+
const inherited = parents.get(owner[1]) ?? /* @__PURE__ */ new Set();
|
|
2654
|
+
for (const type of owner[2].matchAll(/\b[A-Za-z_]\w*\b/g)) inherited.add(type[0]);
|
|
2655
|
+
parents.set(owner[1], inherited);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
const result = /* @__PURE__ */ new Map();
|
|
2659
|
+
const protocols = ["UITableViewDataSource", "UITableViewDelegate"];
|
|
2660
|
+
for (const type of parents.keys()) {
|
|
2661
|
+
const pending = [type];
|
|
2662
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2663
|
+
const conformances = /* @__PURE__ */ new Set();
|
|
2664
|
+
while (pending.length) {
|
|
2665
|
+
const next = pending.pop();
|
|
2666
|
+
if (seen.has(next)) continue;
|
|
2667
|
+
seen.add(next);
|
|
2668
|
+
if (protocols.includes(next)) conformances.add(next);
|
|
2669
|
+
for (const parent of parents.get(next) ?? []) pending.push(parent);
|
|
2670
|
+
}
|
|
2671
|
+
if (conformances.size) result.set(type, conformances);
|
|
2672
|
+
}
|
|
2673
|
+
return result;
|
|
2674
|
+
}
|
|
2675
|
+
function lowerTableProtocolMethods(source, conformances) {
|
|
2676
|
+
const code = swiftCodeMask(source);
|
|
2677
|
+
const dataSource = {
|
|
2678
|
+
numberOfRowsInSection: "tableView:numberOfRowsInSection:",
|
|
2679
|
+
cellForRowAt: "tableView:cellForRowAtIndexPath:",
|
|
2680
|
+
titleForHeaderInSection: "tableView:titleForHeaderInSection:",
|
|
2681
|
+
titleForFooterInSection: "tableView:titleForFooterInSection:",
|
|
2682
|
+
canEditRowAt: "tableView:canEditRowAtIndexPath:",
|
|
2683
|
+
commit: "tableView:commitEditingStyle:forRowAtIndexPath:"
|
|
2684
|
+
};
|
|
2685
|
+
const delegate = {
|
|
2686
|
+
willDisplay: "tableView:willDisplayCell:forRowAtIndexPath:",
|
|
2687
|
+
didEndDisplaying: "tableView:didEndDisplayingCell:forRowAtIndexPath:",
|
|
2688
|
+
heightForRowAt: "tableView:heightForRowAtIndexPath:",
|
|
2689
|
+
estimatedHeightForRowAt: "tableView:estimatedHeightForRowAtIndexPath:",
|
|
2690
|
+
heightForHeaderInSection: "tableView:heightForHeaderInSection:",
|
|
2691
|
+
heightForFooterInSection: "tableView:heightForFooterInSection:",
|
|
2692
|
+
estimatedHeightForHeaderInSection: "tableView:estimatedHeightForHeaderInSection:",
|
|
2693
|
+
estimatedHeightForFooterInSection: "tableView:estimatedHeightForFooterInSection:",
|
|
2694
|
+
viewForHeaderInSection: "tableView:viewForHeaderInSection:",
|
|
2695
|
+
viewForFooterInSection: "tableView:viewForFooterInSection:",
|
|
2696
|
+
willDisplayHeaderView: "tableView:willDisplayHeaderView:forSection:",
|
|
2697
|
+
willDisplayFooterView: "tableView:willDisplayFooterView:forSection:",
|
|
2698
|
+
didEndDisplayingHeaderView: "tableView:didEndDisplayingHeaderView:forSection:",
|
|
2699
|
+
didEndDisplayingFooterView: "tableView:didEndDisplayingFooterView:forSection:",
|
|
2700
|
+
shouldHighlightRowAt: "tableView:shouldHighlightRowAtIndexPath:",
|
|
2701
|
+
didHighlightRowAt: "tableView:didHighlightRowAtIndexPath:",
|
|
2702
|
+
didUnhighlightRowAt: "tableView:didUnhighlightRowAtIndexPath:",
|
|
2703
|
+
willSelectRowAt: "tableView:willSelectRowAtIndexPath:",
|
|
2704
|
+
willDeselectRowAt: "tableView:willDeselectRowAtIndexPath:",
|
|
2705
|
+
didSelectRowAt: "tableView:didSelectRowAtIndexPath:",
|
|
2706
|
+
didDeselectRowAt: "tableView:didDeselectRowAtIndexPath:",
|
|
2707
|
+
accessoryButtonTappedForRowWith: "tableView:accessoryButtonTappedForRowWithIndexPath:",
|
|
2708
|
+
editingStyleForRowAt: "tableView:editingStyleForRowAtIndexPath:",
|
|
2709
|
+
leadingSwipeActionsConfigurationForRowAt: "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
|
|
2710
|
+
trailingSwipeActionsConfigurationForRowAt: "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
|
|
2711
|
+
willBeginEditingRowAt: "tableView:willBeginEditingRowAtIndexPath:",
|
|
2712
|
+
didEndEditingRowAt: "tableView:didEndEditingRowAtIndexPath:"
|
|
2713
|
+
};
|
|
2714
|
+
const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
|
|
2715
|
+
const edits = [];
|
|
2716
|
+
for (const owner of code.matchAll(/\b(?:class|extension)\s+([A-Za-z_]\w*)[^{}]*\{/g)) {
|
|
2717
|
+
const conforms = conformances.get(owner[1]);
|
|
2718
|
+
if (!conforms) continue;
|
|
2719
|
+
const selectors = {
|
|
2720
|
+
...conforms.has("UITableViewDataSource") ? dataSource : {},
|
|
2721
|
+
...conforms.has("UITableViewDelegate") ? delegate : {}
|
|
2722
|
+
};
|
|
2723
|
+
const open = owner.index + owner[0].length - 1;
|
|
2724
|
+
const close = closingBrace(code, braces, open);
|
|
2725
|
+
let depth = 1;
|
|
2726
|
+
let previous = open + 1;
|
|
2727
|
+
for (const token of swiftCodeScan(code.slice(open + 1, close - 1)).tokens) {
|
|
2728
|
+
const at = open + 1 + token;
|
|
2729
|
+
if (code[at] === "{") depth++;
|
|
2730
|
+
else if (code[at] === "}") {
|
|
2731
|
+
depth--;
|
|
2732
|
+
if (depth === 1) previous = at + 1;
|
|
2733
|
+
} else if (depth === 1 && /^func\b/.test(code.slice(at))) {
|
|
2734
|
+
const signature2 = code.slice(at, code.indexOf("{", at));
|
|
2735
|
+
const prefix = code.slice(previous, at);
|
|
2736
|
+
const attributes = /(?:@\w+(?:\([^{}]*\))?\s*|(?:public|open|private|fileprivate|internal|final|override|static|class|nonisolated|dynamic)\s+)*$/.exec(
|
|
2737
|
+
prefix
|
|
2738
|
+
)?.[0] ?? "";
|
|
2739
|
+
if (/\b(?:override|static|class)\b|@(?:objc|ObjC|IBAction)\b/.test(attributes))
|
|
2740
|
+
continue;
|
|
2741
|
+
let selector;
|
|
2742
|
+
if (conforms.has("UITableViewDataSource") && /^func\s+numberOfSections\s*\(\s*in\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*\)/.test(
|
|
2743
|
+
signature2
|
|
2744
|
+
))
|
|
2745
|
+
selector = "numberOfSectionsInTableView:";
|
|
2746
|
+
else {
|
|
2747
|
+
const match = /^func\s+tableView\s*\(\s*_\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*,\s*(\w+)\b/.exec(
|
|
2748
|
+
signature2
|
|
2749
|
+
);
|
|
2750
|
+
if (match) selector = selectors[match[1]];
|
|
2751
|
+
}
|
|
2752
|
+
if (selector)
|
|
2753
|
+
edits.push([
|
|
2754
|
+
at,
|
|
2755
|
+
`${/\bnonisolated\b/.test(attributes) ? "" : "@MainActor "}@ObjC(${JSON.stringify(selector)}) `
|
|
2756
|
+
]);
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
let result = source;
|
|
2761
|
+
for (const [at, text3] of edits.sort((a, b) => b[0] - a[0]))
|
|
2762
|
+
result = result.slice(0, at) + text3 + result.slice(at);
|
|
2763
|
+
return result;
|
|
2764
|
+
}
|
|
2646
2765
|
function swiftCodeMask(source) {
|
|
2647
2766
|
const chars = source.split("");
|
|
2648
2767
|
const blank = (from, to) => {
|
|
@@ -2746,9 +2865,9 @@ function swiftCodeMask(source) {
|
|
|
2746
2865
|
scanCode(0, false);
|
|
2747
2866
|
return chars.join("");
|
|
2748
2867
|
}
|
|
2749
|
-
function swiftSourceAsIOS(original, extraObjCExtensions) {
|
|
2868
|
+
function swiftSourceAsIOS(original, extraObjCExtensions, tableConformances = tableProtocolConformances([original])) {
|
|
2750
2869
|
const source = liftExtensionOverrides(
|
|
2751
|
-
lowerNotificationDelegate(original),
|
|
2870
|
+
lowerTableProtocolMethods(lowerNotificationDelegate(original), tableConformances),
|
|
2752
2871
|
extraObjCExtensions
|
|
2753
2872
|
);
|
|
2754
2873
|
const { lineStarts, tokens } = swiftCodeScan(source);
|
|
@@ -2990,7 +3109,7 @@ function swiftCodeScan(source) {
|
|
|
2990
3109
|
}
|
|
2991
3110
|
return { lineStarts: starts, tokens };
|
|
2992
3111
|
}
|
|
2993
|
-
var compiledSource = (file, contents, extraObjCExtensions) => file.endsWith(".swift") ? swiftSourceAsIOS(contents, extraObjCExtensions) : contents;
|
|
3112
|
+
var compiledSource = (file, contents, extraObjCExtensions, tableConformances) => file.endsWith(".swift") ? swiftSourceAsIOS(contents, extraObjCExtensions, tableConformances) : contents;
|
|
2994
3113
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
2995
3114
|
const resourceTargets = swiftManifestTargets(
|
|
2996
3115
|
input.files["Package.swift"] ?? "",
|
|
@@ -3023,15 +3142,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
3023
3142
|
// sootsim-swift files ${modulePlan.digest("hex").slice(0, 16)}
|
|
3024
3143
|
// resource accessors ${resourcePlan}
|
|
3025
3144
|
`;
|
|
3026
|
-
const
|
|
3027
|
-
|
|
3028
|
-
);
|
|
3145
|
+
const swiftSources = Object.entries(input.files).filter(([file]) => file.endsWith(".swift")).map(([, contents]) => contents);
|
|
3146
|
+
const objcExtensions = objcExtensionMemberIndex(swiftSources);
|
|
3147
|
+
const tableConformances = tableProtocolConformances(swiftSources);
|
|
3029
3148
|
if (targets.length === 0) {
|
|
3030
3149
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
3031
3150
|
if (file === "Package.swift") continue;
|
|
3032
3151
|
files2.set(
|
|
3033
3152
|
import_node_path2.default.join(layout.sources, file),
|
|
3034
|
-
compiledSource(file, contents, objcExtensions)
|
|
3153
|
+
compiledSource(file, contents, objcExtensions, tableConformances)
|
|
3035
3154
|
);
|
|
3036
3155
|
}
|
|
3037
3156
|
let manifest = (0, import_node_fs2.readFileSync)(
|
|
@@ -3078,7 +3197,10 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
3078
3197
|
const base = layout.multi ? layout.root : layout.sources;
|
|
3079
3198
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
3080
3199
|
if (file === "Package.swift") continue;
|
|
3081
|
-
files2.set(
|
|
3200
|
+
files2.set(
|
|
3201
|
+
import_node_path2.default.join(base, file),
|
|
3202
|
+
compiledSource(file, contents, objcExtensions, tableConformances)
|
|
3203
|
+
);
|
|
3082
3204
|
}
|
|
3083
3205
|
files2.set(
|
|
3084
3206
|
import_node_path2.default.join(layout.root, "Package.swift"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|