peachsim 0.1.729 → 0.1.745
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 +15 -2
- package/cli/commands/control.ts +13 -3
- package/cli/commands/desktop.ts +1 -0
- package/cli/commands/electron.ts +12 -8
- package/cli/commands/flow.ts +1 -3
- package/cli/commands/install-desktop.ts +105 -66
- package/cli/commands/logout.ts +5 -1
- package/cli/commands/no-bridge-hint.ts +2 -2
- package/cli/commands/swift.ts +26 -9
- package/cli/desktop-companion.ts +36 -9
- package/cli/drivers/desktop.ts +65 -0
- package/cli/drivers/electron.ts +4 -66
- package/cli/drivers/index.ts +1 -0
- package/cli/drivers/playwright.ts +3 -3
- package/cli/drivers/registry.ts +7 -2
- package/cli/drivers/types.ts +4 -3
- package/cli/maestro-js.ts +10 -0
- package/cli/outbound-endpoints.ts +2 -2
- 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 +39 -9
- 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/capture-contract.cjs +13 -19
- package/dist-lib/capture-contract.mjs +13 -19
- 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 +20 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +32 -1
- package/dist-lib/host/bridge-host.cjs +1617 -533
- 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 +14 -19
- 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 +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +2307 -1068
- package/dist-lib/swift-compile.cjs +318 -61
- package/dist-lib/swift-compile.mjs +314 -62
- package/dist-lib/swift-package.cjs +146 -9
- package/dist-lib/swift-package.mjs +144 -9
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1311 -227
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/contrast/SKILL.md +1 -1
- package/src/auth/shared-session.ts +45 -9
- package/src/bridge-constants.ts +7 -7
- package/src/capture-contract.ts +18 -33
- package/src/desktop-host-delivery.ts +81 -0
- package/src/home-paths.ts +30 -0
- package/src/host/bridge-host.ts +11 -6
- package/src/native-seam-manifest.ts +0 -11
- package/src/sim-client.ts +1 -0
- package/src/swift-compile.ts +404 -69
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +316 -43
- package/src/swift-package.ts +204 -19
- package/src/swift-remote-packages.ts +255 -0
- package/src/swift-submit.ts +4 -1
- package/src/vite-plugin.ts +19 -8
- package/src/xcode-project.ts +527 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -24,7 +24,9 @@ var swift_package_exports = {};
|
|
|
24
24
|
__export(swift_package_exports, {
|
|
25
25
|
isSwiftManifestFile: () => isSwiftManifestFile,
|
|
26
26
|
swiftImplicitResourcePaths: () => swiftImplicitResourcePaths,
|
|
27
|
+
swiftManifestGraph: () => swiftManifestGraph,
|
|
27
28
|
swiftManifestTargets: () => swiftManifestTargets,
|
|
29
|
+
swiftPackageIdentity: () => swiftPackageIdentity,
|
|
28
30
|
swiftPackagePartition: () => swiftPackagePartition
|
|
29
31
|
});
|
|
30
32
|
module.exports = __toCommonJS(swift_package_exports);
|
|
@@ -39,14 +41,24 @@ function swiftImplicitResourcePaths(paths) {
|
|
|
39
41
|
) || /(?:^|\/)[^/]+\.lproj\/[^/]+$/.test(file))
|
|
40
42
|
).sort();
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
var MANIFEST_DECLARATIONS = [
|
|
45
|
+
"executableTarget",
|
|
46
|
+
"testTarget",
|
|
47
|
+
"binaryTarget",
|
|
48
|
+
"systemLibrary",
|
|
49
|
+
"macro",
|
|
50
|
+
"plugin",
|
|
51
|
+
"target",
|
|
52
|
+
"library",
|
|
53
|
+
"executable",
|
|
54
|
+
"package"
|
|
55
|
+
];
|
|
56
|
+
function manifestCalls(manifest, kinds) {
|
|
57
|
+
const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:"])\/\/[^\n]*/g, "$1");
|
|
58
|
+
const calls = [];
|
|
59
|
+
const pattern = new RegExp(`\\.(${MANIFEST_DECLARATIONS.join("|")})\\s*\\(`, "g");
|
|
47
60
|
let match;
|
|
48
61
|
while ((match = pattern.exec(code)) !== null) {
|
|
49
|
-
const executable = match[1] === "executableTarget";
|
|
50
62
|
let depth = 1;
|
|
51
63
|
const start = pattern.lastIndex;
|
|
52
64
|
let i = start;
|
|
@@ -74,18 +86,141 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
74
86
|
}
|
|
75
87
|
i++;
|
|
76
88
|
}
|
|
89
|
+
if (kinds.includes(match[1]))
|
|
90
|
+
calls.push({ kind: match[1], flat, call: code.slice(start, i) });
|
|
91
|
+
pattern.lastIndex = i;
|
|
92
|
+
}
|
|
93
|
+
return calls;
|
|
94
|
+
}
|
|
95
|
+
var NAME = /\bname\s*:\s*"([^"]+)"/;
|
|
96
|
+
function listArgument(call, label) {
|
|
97
|
+
const start = new RegExp(`\\b${label}\\s*:\\s*\\[`).exec(call);
|
|
98
|
+
if (!start) return [];
|
|
99
|
+
const items = [];
|
|
100
|
+
let depth = 0;
|
|
101
|
+
let inString = false;
|
|
102
|
+
let item = "";
|
|
103
|
+
for (let i = start.index + start[0].length; i < call.length; i++) {
|
|
104
|
+
const ch = call[i];
|
|
105
|
+
if (inString) {
|
|
106
|
+
item += ch;
|
|
107
|
+
if (ch === '"' && call[i - 1] !== "\\") inString = false;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (ch === '"') inString = true;
|
|
111
|
+
else if (ch === "(" || ch === "[") depth++;
|
|
112
|
+
else if (ch === ")" || ch === "]") {
|
|
113
|
+
if (depth === 0) break;
|
|
114
|
+
depth--;
|
|
115
|
+
} else if (ch === "," && depth === 0) {
|
|
116
|
+
items.push(item.trim());
|
|
117
|
+
item = "";
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
item += ch;
|
|
121
|
+
}
|
|
122
|
+
if (item.trim()) items.push(item.trim());
|
|
123
|
+
return items;
|
|
124
|
+
}
|
|
125
|
+
function swiftPackageIdentity(url) {
|
|
126
|
+
return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
|
|
127
|
+
}
|
|
128
|
+
function swiftManifestGraph(manifest) {
|
|
129
|
+
const graph = {
|
|
130
|
+
products: /* @__PURE__ */ new Map(),
|
|
131
|
+
dependencies: /* @__PURE__ */ new Map(),
|
|
132
|
+
binaryTargets: /* @__PURE__ */ new Set(),
|
|
133
|
+
systemLibraries: /* @__PURE__ */ new Set(),
|
|
134
|
+
packageURLs: /* @__PURE__ */ new Map(),
|
|
135
|
+
packagePaths: []
|
|
136
|
+
};
|
|
137
|
+
for (const { kind, flat, call } of manifestCalls(manifest, [
|
|
138
|
+
"library",
|
|
139
|
+
"executableTarget",
|
|
140
|
+
"target",
|
|
141
|
+
"binaryTarget",
|
|
142
|
+
"systemLibrary",
|
|
143
|
+
"package"
|
|
144
|
+
])) {
|
|
145
|
+
if (kind === "package") {
|
|
146
|
+
const local = /\bpath\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
147
|
+
if (local) graph.packagePaths.push(local);
|
|
148
|
+
const url = /\burl\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
149
|
+
if (!url) continue;
|
|
150
|
+
graph.packageURLs.set(swiftPackageIdentity(url), url);
|
|
151
|
+
const name2 = NAME.exec(flat)?.[1];
|
|
152
|
+
if (name2) graph.packageURLs.set(name2.toLowerCase(), url);
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const name = NAME.exec(flat)?.[1];
|
|
156
|
+
if (!name) continue;
|
|
157
|
+
if (kind === "library") {
|
|
158
|
+
graph.products.set(
|
|
159
|
+
name,
|
|
160
|
+
listArgument(call, "targets").flatMap(
|
|
161
|
+
(item) => /^"([^"]+)"$/.exec(item)?.[1] ?? []
|
|
162
|
+
)
|
|
163
|
+
);
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (kind === "binaryTarget") graph.binaryTargets.add(name);
|
|
167
|
+
if (kind === "systemLibrary") graph.systemLibraries.add(name);
|
|
168
|
+
const dependencies = [];
|
|
169
|
+
for (const item of listArgument(call, "dependencies")) {
|
|
170
|
+
const platforms = /condition\s*:\s*\.when\(\s*platforms\s*:\s*\[([^\]]*)\]/.exec(
|
|
171
|
+
item
|
|
172
|
+
)?.[1];
|
|
173
|
+
if (platforms !== void 0 && !/\.iOS\b/.test(platforms)) continue;
|
|
174
|
+
if (/condition\s*:\s*\.when\([^)]*\btraits\s*:/.test(item)) continue;
|
|
175
|
+
const plain = /^"([^"]+)"$/.exec(item)?.[1];
|
|
176
|
+
const product = /^\.product(?:Item)?\(\s*name\s*:\s*"([^"]+)"\s*,\s*package\s*:\s*"([^"]+)"/.exec(
|
|
177
|
+
item
|
|
178
|
+
);
|
|
179
|
+
const target = /^\.(?:target|byName)(?:Item)?\(\s*name\s*:\s*"([^"]+)"/.exec(
|
|
180
|
+
item
|
|
181
|
+
)?.[1];
|
|
182
|
+
if (plain) dependencies.push({ kind: "target", name: plain });
|
|
183
|
+
else if (product)
|
|
184
|
+
dependencies.push({
|
|
185
|
+
kind: "product",
|
|
186
|
+
name: product[1],
|
|
187
|
+
package: product[2].toLowerCase()
|
|
188
|
+
});
|
|
189
|
+
else if (target) dependencies.push({ kind: "target", name: target });
|
|
190
|
+
}
|
|
191
|
+
graph.dependencies.set(name, dependencies);
|
|
192
|
+
}
|
|
193
|
+
for (const dependencies of graph.dependencies.values()) {
|
|
194
|
+
for (const [index, dependency] of dependencies.entries()) {
|
|
195
|
+
if (dependency.kind === "target" && !graph.dependencies.has(dependency.name))
|
|
196
|
+
dependencies[index] = {
|
|
197
|
+
kind: "product",
|
|
198
|
+
name: dependency.name,
|
|
199
|
+
package: dependency.name.toLowerCase()
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return graph;
|
|
204
|
+
}
|
|
205
|
+
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
206
|
+
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
207
|
+
const targets = [];
|
|
208
|
+
for (const { kind, flat, call } of manifestCalls(manifest, [
|
|
209
|
+
"executableTarget",
|
|
210
|
+
"target"
|
|
211
|
+
])) {
|
|
212
|
+
const executable = kind === "executableTarget";
|
|
77
213
|
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
78
214
|
if (!name) continue;
|
|
79
215
|
const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
80
216
|
const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
81
|
-
const call = code.slice(start, i);
|
|
82
217
|
const languageMode = Number(
|
|
83
218
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
84
219
|
);
|
|
85
220
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
86
221
|
const excluded = [
|
|
87
222
|
...(/\bexclude\s*:\s*\[([^\]]*)\]/.exec(flat)?.[1] ?? "").matchAll(/"([^"]+)"/g)
|
|
88
|
-
].map((
|
|
223
|
+
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
89
224
|
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
90
225
|
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
91
226
|
if (!file.startsWith(prefix)) return false;
|
|
@@ -115,6 +250,8 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
115
250
|
0 && (module.exports = {
|
|
116
251
|
isSwiftManifestFile,
|
|
117
252
|
swiftImplicitResourcePaths,
|
|
253
|
+
swiftManifestGraph,
|
|
118
254
|
swiftManifestTargets,
|
|
255
|
+
swiftPackageIdentity,
|
|
119
256
|
swiftPackagePartition
|
|
120
257
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-package.ts
|
|
4
4
|
function isSwiftManifestFile(file) {
|
|
@@ -12,14 +12,24 @@ function swiftImplicitResourcePaths(paths) {
|
|
|
12
12
|
) || /(?:^|\/)[^/]+\.lproj\/[^/]+$/.test(file))
|
|
13
13
|
).sort();
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
var MANIFEST_DECLARATIONS = [
|
|
16
|
+
"executableTarget",
|
|
17
|
+
"testTarget",
|
|
18
|
+
"binaryTarget",
|
|
19
|
+
"systemLibrary",
|
|
20
|
+
"macro",
|
|
21
|
+
"plugin",
|
|
22
|
+
"target",
|
|
23
|
+
"library",
|
|
24
|
+
"executable",
|
|
25
|
+
"package"
|
|
26
|
+
];
|
|
27
|
+
function manifestCalls(manifest, kinds) {
|
|
28
|
+
const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:"])\/\/[^\n]*/g, "$1");
|
|
29
|
+
const calls = [];
|
|
30
|
+
const pattern = new RegExp(`\\.(${MANIFEST_DECLARATIONS.join("|")})\\s*\\(`, "g");
|
|
20
31
|
let match;
|
|
21
32
|
while ((match = pattern.exec(code)) !== null) {
|
|
22
|
-
const executable = match[1] === "executableTarget";
|
|
23
33
|
let depth = 1;
|
|
24
34
|
const start = pattern.lastIndex;
|
|
25
35
|
let i = start;
|
|
@@ -47,18 +57,141 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
|
47
57
|
}
|
|
48
58
|
i++;
|
|
49
59
|
}
|
|
60
|
+
if (kinds.includes(match[1]))
|
|
61
|
+
calls.push({ kind: match[1], flat, call: code.slice(start, i) });
|
|
62
|
+
pattern.lastIndex = i;
|
|
63
|
+
}
|
|
64
|
+
return calls;
|
|
65
|
+
}
|
|
66
|
+
var NAME = /\bname\s*:\s*"([^"]+)"/;
|
|
67
|
+
function listArgument(call, label) {
|
|
68
|
+
const start = new RegExp(`\\b${label}\\s*:\\s*\\[`).exec(call);
|
|
69
|
+
if (!start) return [];
|
|
70
|
+
const items = [];
|
|
71
|
+
let depth = 0;
|
|
72
|
+
let inString = false;
|
|
73
|
+
let item = "";
|
|
74
|
+
for (let i = start.index + start[0].length; i < call.length; i++) {
|
|
75
|
+
const ch = call[i];
|
|
76
|
+
if (inString) {
|
|
77
|
+
item += ch;
|
|
78
|
+
if (ch === '"' && call[i - 1] !== "\\") inString = false;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (ch === '"') inString = true;
|
|
82
|
+
else if (ch === "(" || ch === "[") depth++;
|
|
83
|
+
else if (ch === ")" || ch === "]") {
|
|
84
|
+
if (depth === 0) break;
|
|
85
|
+
depth--;
|
|
86
|
+
} else if (ch === "," && depth === 0) {
|
|
87
|
+
items.push(item.trim());
|
|
88
|
+
item = "";
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
item += ch;
|
|
92
|
+
}
|
|
93
|
+
if (item.trim()) items.push(item.trim());
|
|
94
|
+
return items;
|
|
95
|
+
}
|
|
96
|
+
function swiftPackageIdentity(url) {
|
|
97
|
+
return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
|
|
98
|
+
}
|
|
99
|
+
function swiftManifestGraph(manifest) {
|
|
100
|
+
const graph = {
|
|
101
|
+
products: /* @__PURE__ */ new Map(),
|
|
102
|
+
dependencies: /* @__PURE__ */ new Map(),
|
|
103
|
+
binaryTargets: /* @__PURE__ */ new Set(),
|
|
104
|
+
systemLibraries: /* @__PURE__ */ new Set(),
|
|
105
|
+
packageURLs: /* @__PURE__ */ new Map(),
|
|
106
|
+
packagePaths: []
|
|
107
|
+
};
|
|
108
|
+
for (const { kind, flat, call } of manifestCalls(manifest, [
|
|
109
|
+
"library",
|
|
110
|
+
"executableTarget",
|
|
111
|
+
"target",
|
|
112
|
+
"binaryTarget",
|
|
113
|
+
"systemLibrary",
|
|
114
|
+
"package"
|
|
115
|
+
])) {
|
|
116
|
+
if (kind === "package") {
|
|
117
|
+
const local = /\bpath\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
118
|
+
if (local) graph.packagePaths.push(local);
|
|
119
|
+
const url = /\burl\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
120
|
+
if (!url) continue;
|
|
121
|
+
graph.packageURLs.set(swiftPackageIdentity(url), url);
|
|
122
|
+
const name2 = NAME.exec(flat)?.[1];
|
|
123
|
+
if (name2) graph.packageURLs.set(name2.toLowerCase(), url);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const name = NAME.exec(flat)?.[1];
|
|
127
|
+
if (!name) continue;
|
|
128
|
+
if (kind === "library") {
|
|
129
|
+
graph.products.set(
|
|
130
|
+
name,
|
|
131
|
+
listArgument(call, "targets").flatMap(
|
|
132
|
+
(item) => /^"([^"]+)"$/.exec(item)?.[1] ?? []
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (kind === "binaryTarget") graph.binaryTargets.add(name);
|
|
138
|
+
if (kind === "systemLibrary") graph.systemLibraries.add(name);
|
|
139
|
+
const dependencies = [];
|
|
140
|
+
for (const item of listArgument(call, "dependencies")) {
|
|
141
|
+
const platforms = /condition\s*:\s*\.when\(\s*platforms\s*:\s*\[([^\]]*)\]/.exec(
|
|
142
|
+
item
|
|
143
|
+
)?.[1];
|
|
144
|
+
if (platforms !== void 0 && !/\.iOS\b/.test(platforms)) continue;
|
|
145
|
+
if (/condition\s*:\s*\.when\([^)]*\btraits\s*:/.test(item)) continue;
|
|
146
|
+
const plain = /^"([^"]+)"$/.exec(item)?.[1];
|
|
147
|
+
const product = /^\.product(?:Item)?\(\s*name\s*:\s*"([^"]+)"\s*,\s*package\s*:\s*"([^"]+)"/.exec(
|
|
148
|
+
item
|
|
149
|
+
);
|
|
150
|
+
const target = /^\.(?:target|byName)(?:Item)?\(\s*name\s*:\s*"([^"]+)"/.exec(
|
|
151
|
+
item
|
|
152
|
+
)?.[1];
|
|
153
|
+
if (plain) dependencies.push({ kind: "target", name: plain });
|
|
154
|
+
else if (product)
|
|
155
|
+
dependencies.push({
|
|
156
|
+
kind: "product",
|
|
157
|
+
name: product[1],
|
|
158
|
+
package: product[2].toLowerCase()
|
|
159
|
+
});
|
|
160
|
+
else if (target) dependencies.push({ kind: "target", name: target });
|
|
161
|
+
}
|
|
162
|
+
graph.dependencies.set(name, dependencies);
|
|
163
|
+
}
|
|
164
|
+
for (const dependencies of graph.dependencies.values()) {
|
|
165
|
+
for (const [index, dependency] of dependencies.entries()) {
|
|
166
|
+
if (dependency.kind === "target" && !graph.dependencies.has(dependency.name))
|
|
167
|
+
dependencies[index] = {
|
|
168
|
+
kind: "product",
|
|
169
|
+
name: dependency.name,
|
|
170
|
+
package: dependency.name.toLowerCase()
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return graph;
|
|
175
|
+
}
|
|
176
|
+
function swiftManifestTargets(manifest, resourcePaths = []) {
|
|
177
|
+
const implicitResources = swiftImplicitResourcePaths(resourcePaths);
|
|
178
|
+
const targets = [];
|
|
179
|
+
for (const { kind, flat, call } of manifestCalls(manifest, [
|
|
180
|
+
"executableTarget",
|
|
181
|
+
"target"
|
|
182
|
+
])) {
|
|
183
|
+
const executable = kind === "executableTarget";
|
|
50
184
|
const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
|
|
51
185
|
if (!name) continue;
|
|
52
186
|
const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
|
|
53
187
|
const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
54
|
-
const call = code.slice(start, i);
|
|
55
188
|
const languageMode = Number(
|
|
56
189
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
57
190
|
);
|
|
58
191
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
59
192
|
const excluded = [
|
|
60
193
|
...(/\bexclude\s*:\s*\[([^\]]*)\]/.exec(flat)?.[1] ?? "").matchAll(/"([^"]+)"/g)
|
|
61
|
-
].map((
|
|
194
|
+
].map((match) => match[1].replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
62
195
|
const prefix = targetPath === "." ? "" : `${targetPath}/`;
|
|
63
196
|
const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
|
|
64
197
|
if (!file.startsWith(prefix)) return false;
|
|
@@ -87,6 +220,8 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
87
220
|
export {
|
|
88
221
|
isSwiftManifestFile,
|
|
89
222
|
swiftImplicitResourcePaths,
|
|
223
|
+
swiftManifestGraph,
|
|
90
224
|
swiftManifestTargets,
|
|
225
|
+
swiftPackageIdentity,
|
|
91
226
|
swiftPackagePartition
|
|
92
227
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -51,7 +51,7 @@ var MAX_SWIFT_COMPILE_RESOURCE_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
51
51
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
52
52
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
53
53
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
54
|
-
var SWIFT_HOST_ABI =
|
|
54
|
+
var SWIFT_HOST_ABI = 24;
|
|
55
55
|
var POLL_INTERVAL_MS = 1500;
|
|
56
56
|
function swiftNativeEntry(native, file) {
|
|
57
57
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-submit.ts
|
|
4
4
|
var SWIFT_COMPILE_PATH = "/api/swift-compile";
|
|
@@ -12,7 +12,7 @@ var MAX_SWIFT_COMPILE_RESOURCE_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
12
12
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
13
13
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
14
14
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
15
|
-
var SWIFT_HOST_ABI =
|
|
15
|
+
var SWIFT_HOST_ABI = 24;
|
|
16
16
|
var POLL_INTERVAL_MS = 1500;
|
|
17
17
|
function swiftNativeEntry(native, file) {
|
|
18
18
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.745 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|