peachsim 0.1.570 → 0.1.571

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 (79) hide show
  1. package/README.md +2 -2
  2. package/cli/bridge-flow-runner.ts +15 -7
  3. package/cli/cloud-dispatch.ts +1 -0
  4. package/cli/cloud-test-result-files.ts +97 -0
  5. package/cli/commands/maestro.ts +123 -31
  6. package/cli/commands/test.ts +161 -3
  7. package/cli/maestro-report.ts +3 -1
  8. package/cli/outbound-endpoints.ts +2 -0
  9. package/cli/run-registry.ts +2 -1
  10. package/detox/jest-preset.cjs +2 -2
  11. package/dist-lib/agent-daemon-client.cjs +1 -1
  12. package/dist-lib/agent-events.cjs +1 -1
  13. package/dist-lib/agent-identity.cjs +1 -1
  14. package/dist-lib/agent-sessions.cjs +1 -1
  15. package/dist-lib/attached-projects.cjs +1 -1
  16. package/dist-lib/auth/shared-session.cjs +1 -1
  17. package/dist-lib/backend-origin.cjs +1 -1
  18. package/dist-lib/beta.cjs +1 -1
  19. package/dist-lib/beta.mjs +1 -1
  20. package/dist-lib/bridge-constants.cjs +1 -1
  21. package/dist-lib/bridge-contract-input.cjs +1 -1
  22. package/dist-lib/bridge-contract-input.mjs +1 -1
  23. package/dist-lib/bridge-contract.cjs +1 -1
  24. package/dist-lib/bridge-contract.mjs +1 -1
  25. package/dist-lib/capture-contract.cjs +1 -1
  26. package/dist-lib/capture-contract.mjs +1 -1
  27. package/dist-lib/cli-constants.cjs +1 -1
  28. package/dist-lib/cloud-contract.cjs +1 -1
  29. package/dist-lib/cloud-contract.mjs +1 -1
  30. package/dist-lib/cloud-test-args.cjs +116 -0
  31. package/dist-lib/cloud-test-args.mjs +86 -0
  32. package/dist-lib/cloud.cjs +1 -1
  33. package/dist-lib/cloud.mjs +1 -1
  34. package/dist-lib/config.cjs +1 -1
  35. package/dist-lib/detox/index.cjs +1 -1
  36. package/dist-lib/detox/jest-preset.cjs +2 -2
  37. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  38. package/dist-lib/home-paths.cjs +1 -1
  39. package/dist-lib/host/bridge-host.cjs +16 -7
  40. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  41. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  42. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  43. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  44. package/dist-lib/host/websocket-proxy.cjs +1 -1
  45. package/dist-lib/index.cjs +16 -26
  46. package/dist-lib/jump-to-source-babel.cjs +1 -1
  47. package/dist-lib/jump-to-source-native.cjs +1 -1
  48. package/dist-lib/menu.cjs +1 -1
  49. package/dist-lib/menu.mjs +1 -1
  50. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  51. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  52. package/dist-lib/metro-production-bundle.cjs +1 -1
  53. package/dist-lib/metro-production-bundle.mjs +1 -1
  54. package/dist-lib/metro.cjs +1 -1
  55. package/dist-lib/profiles.cjs +1 -1
  56. package/dist-lib/public-brand.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.mjs +1 -1
  59. package/dist-lib/render-mode.cjs +1 -1
  60. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  61. package/dist-lib/sdk.cjs +1 -1
  62. package/dist-lib/sdk.mjs +1 -1
  63. package/dist-lib/skills.cjs +119 -106
  64. package/dist-lib/swift-compile.cjs +372 -0
  65. package/dist-lib/swift-compile.mjs +339 -0
  66. package/dist-lib/swift-package.cjs +78 -0
  67. package/dist-lib/swift-package.mjs +52 -0
  68. package/dist-lib/swift-submit.cjs +1 -1
  69. package/dist-lib/swift-submit.mjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite.cjs +456 -138
  72. package/package.json +22 -1
  73. package/skills/rnx-test/SKILL.md +3 -3
  74. package/src/cloud-test-args.ts +100 -0
  75. package/src/rolldown-plugin-swift.ts +8 -7
  76. package/src/swift-compile.ts +359 -0
  77. package/src/swift-package.ts +69 -0
  78. package/src/swift-submit.ts +3 -2
  79. package/src/vite-plugin-swift.ts +103 -107
@@ -0,0 +1,339 @@
1
+ /*! rnx v0.1.571 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+
3
+ // src/swift-compile.ts
4
+ import { execFile } from "node:child_process";
5
+ import { createHash } from "node:crypto";
6
+ import {
7
+ existsSync,
8
+ mkdirSync,
9
+ readFileSync,
10
+ readdirSync,
11
+ realpathSync,
12
+ rmSync,
13
+ statSync,
14
+ writeFileSync
15
+ } from "node:fs";
16
+ import path from "node:path";
17
+ import { promisify } from "node:util";
18
+
19
+ // src/swift-package.ts
20
+ function swiftManifestTargets(manifest) {
21
+ const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
22
+ const targets = [];
23
+ const pattern = /\.(executableTarget|target)\s*\(/g;
24
+ let match;
25
+ while ((match = pattern.exec(code)) !== null) {
26
+ const executable = match[1] === "executableTarget";
27
+ let depth = 1;
28
+ let i = pattern.lastIndex;
29
+ let inString = false;
30
+ let escaped = false;
31
+ let flat = "";
32
+ while (i < code.length && depth > 0) {
33
+ const ch = code[i];
34
+ if (inString) {
35
+ if (escaped) escaped = false;
36
+ else if (ch === "\\") escaped = true;
37
+ else if (ch === '"') inString = false;
38
+ if (depth === 1) flat += ch;
39
+ } else if (ch === '"') {
40
+ inString = true;
41
+ if (depth === 1) flat += ch;
42
+ } else if (ch === "(") {
43
+ depth++;
44
+ if (depth === 1) flat += ch;
45
+ } else if (ch === ")") {
46
+ depth--;
47
+ if (depth >= 1) flat += ch;
48
+ } else if (depth === 1) {
49
+ flat += ch;
50
+ }
51
+ i++;
52
+ }
53
+ const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
54
+ if (!name) continue;
55
+ const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
56
+ const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
57
+ targets.push({ name, path: targetPath, executable });
58
+ }
59
+ return targets;
60
+ }
61
+
62
+ // src/swift-compile.ts
63
+ var run = promisify(execFile);
64
+ var WASM_TRIPLE = "wasm32-unknown-wasip1";
65
+ function swiftModuleInputFiles(root) {
66
+ const files = ["Package.swift", "scripts/contrast-app-Package.swift"];
67
+ const walk = (dir) => {
68
+ for (const entry of readdirSync(path.join(root, dir), { withFileTypes: true })) {
69
+ const relative = `${dir}/${entry.name}`;
70
+ if (entry.isDirectory()) walk(relative);
71
+ else if (entry.name.endsWith(".swift")) files.push(relative);
72
+ }
73
+ };
74
+ walk("Sources");
75
+ return files.sort();
76
+ }
77
+ var linkedModuleDigests = /* @__PURE__ */ new Map();
78
+ function clearLinkedModuleDigests(root) {
79
+ if (root === void 0) linkedModuleDigests.clear();
80
+ else linkedModuleDigests.delete(root);
81
+ }
82
+ function linkedModuleDigest(root) {
83
+ const files = swiftModuleInputFiles(root);
84
+ const stampHash = createHash("sha256");
85
+ for (const file of files) {
86
+ const stat = statSync(path.join(root, file), { bigint: true });
87
+ stampHash.update(file);
88
+ stampHash.update(
89
+ `${stat.dev}:${stat.ino}:${stat.size}:${stat.mtimeNs}:${stat.ctimeNs}
90
+ `
91
+ );
92
+ }
93
+ const stamp = stampHash.digest("hex");
94
+ const cached = linkedModuleDigests.get(root);
95
+ if (cached?.stamp === stamp) return cached.digest;
96
+ const hash = createHash("sha256");
97
+ for (const file of files) {
98
+ hash.update(createHash("sha256").update(file).digest());
99
+ hash.update(
100
+ createHash("sha256").update(readFileSync(path.join(root, file))).digest()
101
+ );
102
+ }
103
+ const digest = hash.digest();
104
+ linkedModuleDigests.set(root, { stamp, digest });
105
+ return digest;
106
+ }
107
+ function compileTargets(input) {
108
+ const manifest = input.files["Package.swift"];
109
+ return manifest === void 0 ? [] : swiftManifestTargets(manifest);
110
+ }
111
+ function swiftSiblingDependencies(files, targets) {
112
+ const names = new Set(targets.map((target) => target.name));
113
+ const siblings = /* @__PURE__ */ new Map();
114
+ for (const target of targets) {
115
+ const prefix = `${target.path}/`;
116
+ const deps = /* @__PURE__ */ new Set();
117
+ for (const [file, contents] of Object.entries(files)) {
118
+ if (file === "Package.swift" || !file.startsWith(prefix)) continue;
119
+ for (const match of contents.matchAll(/^\s*import\s+([A-Za-z_][A-Za-z0-9_]*)/gm)) {
120
+ if (names.has(match[1]) && match[1] !== target.name) deps.add(match[1]);
121
+ }
122
+ }
123
+ siblings.set(target.name, [...deps].sort());
124
+ }
125
+ return siblings;
126
+ }
127
+ var MULTI_MANIFEST_VERSION = 1;
128
+ function swiftArtifactHash(input, release, moduleRoot) {
129
+ const hash = createHash("sha256");
130
+ hash.update(`swift-compile/v1
131
+ ${release}
132
+ `);
133
+ hash.update(linkedModuleDigest(moduleRoot));
134
+ for (const file of Object.keys(input.files).sort()) {
135
+ hash.update(createHash("sha256").update(file).digest());
136
+ hash.update(createHash("sha256").update(input.files[file]).digest());
137
+ }
138
+ for (const base of Object.keys(input.resources ?? {}).sort()) {
139
+ hash.update(createHash("sha256").update(base).digest());
140
+ hash.update(
141
+ createHash("sha256").update(input.resources?.[base] ?? "").digest()
142
+ );
143
+ }
144
+ for (const name of Object.keys(input.images ?? {}).sort()) {
145
+ const image = input.images?.[name];
146
+ if (!image) continue;
147
+ hash.update(createHash("sha256").update(name).digest());
148
+ hash.update(createHash("sha256").update(image.file).digest());
149
+ hash.update(createHash("sha256").update(image.data).digest());
150
+ }
151
+ const targets = compileTargets(input);
152
+ if (targets.length > 0) {
153
+ hash.update(`swift-multi/v${MULTI_MANIFEST_VERSION}
154
+ `);
155
+ hash.update(
156
+ JSON.stringify({
157
+ targets,
158
+ siblings: [...swiftSiblingDependencies(input.files, targets)].sort(
159
+ (a, b) => String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0
160
+ )
161
+ })
162
+ );
163
+ }
164
+ return hash.digest("hex");
165
+ }
166
+ function emitSwiftPackageManifest(args) {
167
+ const { targets, siblings, moduleRoot } = args;
168
+ const executable = targets.find((target) => target.executable);
169
+ if (!executable) throw new Error("swift-compile: no executable target to emit");
170
+ const swiftSettings = 'swiftSettings: [.swiftLanguageMode(.v5), .unsafeFlags(["-Osize"])]';
171
+ const stanza = (target) => {
172
+ const deps = [
173
+ '.product(name: "SwiftUI", package: "sootsim-swift")',
174
+ ...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`)
175
+ ].join(", ");
176
+ const kind = target.executable ? ".executableTarget" : ".target";
177
+ const link = target.executable ? `,
178
+ linkerSettings: [
179
+ .unsafeFlags([
180
+ "-Xclang-linker", "-mexec-model=reactor",
181
+ "-Xlinker", "--export-if-defined=__main_argc_argv",
182
+ ]),
183
+ .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
184
+ ]` : "";
185
+ return [
186
+ ` ${kind}(`,
187
+ ` name: "${target.name}",`,
188
+ ` dependencies: [${deps}],`,
189
+ ` path: "${target.path}",`,
190
+ ` ${swiftSettings}${link}`,
191
+ ` ),`
192
+ ].join("\n");
193
+ };
194
+ return [
195
+ "// swift-tools-version: 6.0",
196
+ "import PackageDescription",
197
+ "",
198
+ "// generated by swift-compile from the project package partition.",
199
+ "let package = Package(",
200
+ ' name: "app",',
201
+ ` products: [.executable(name: "${executable.name}", targets: ["${executable.name}"])],`,
202
+ ` dependencies: [.package(path: "${moduleRoot}")],`,
203
+ " targets: [",
204
+ ...targets.map(stanza),
205
+ " ]",
206
+ ")",
207
+ ""
208
+ ].join("\n");
209
+ }
210
+ function writeSwiftProject(layout, input, moduleRoot) {
211
+ const targets = compileTargets(input);
212
+ if (targets.length === 0) {
213
+ rmSync(layout.sources, { recursive: true, force: true });
214
+ for (const [file, contents] of Object.entries(input.files)) {
215
+ const target = path.join(layout.sources, file);
216
+ mkdirSync(path.dirname(target), { recursive: true });
217
+ writeFileSync(target, contents, "utf8");
218
+ }
219
+ const manifest = readFileSync(
220
+ path.join(moduleRoot, "scripts/contrast-app-Package.swift"),
221
+ "utf8"
222
+ ).replaceAll("__SOOTSIM_SWIFT_PACKAGE__", moduleRoot);
223
+ writeFileSync(path.join(layout.root, "Package.swift"), manifest, "utf8");
224
+ return;
225
+ }
226
+ mkdirSync(layout.root, { recursive: true });
227
+ for (const child of readdirSync(layout.root)) {
228
+ if (child === ".build") continue;
229
+ rmSync(path.join(layout.root, child), { recursive: true, force: true });
230
+ }
231
+ for (const [file, contents] of Object.entries(input.files)) {
232
+ if (file === "Package.swift") continue;
233
+ const target = path.join(layout.root, file);
234
+ mkdirSync(path.dirname(target), { recursive: true });
235
+ writeFileSync(target, contents, "utf8");
236
+ }
237
+ writeFileSync(
238
+ path.join(layout.root, "Package.swift"),
239
+ emitSwiftPackageManifest({
240
+ targets,
241
+ siblings: swiftSiblingDependencies(input.files, targets),
242
+ moduleRoot
243
+ }),
244
+ "utf8"
245
+ );
246
+ }
247
+ function streamText(value) {
248
+ if (typeof value === "string") return value.trim();
249
+ if (Buffer.isBuffer(value)) return value.toString("utf8").trim();
250
+ return "";
251
+ }
252
+ function outputOf(error) {
253
+ if (error && typeof error === "object") {
254
+ const streams = [
255
+ streamText(Reflect.get(error, "stdout")),
256
+ streamText(Reflect.get(error, "stderr"))
257
+ ].filter(Boolean);
258
+ if (streams.length > 0) return streams.join("\n");
259
+ }
260
+ return error instanceof Error ? error.message : String(error);
261
+ }
262
+ function builtArtifact(layout) {
263
+ const binDir = path.join(layout.root, ".build", WASM_TRIPLE, "release");
264
+ const artifacts = existsSync(binDir) ? readdirSync(binDir).filter((name) => name.endsWith(".wasm")).sort() : [];
265
+ if (artifacts.length !== 1) {
266
+ throw new Error(
267
+ `swift-compile: the build produced ${artifacts.length} wasm artifacts; exactly one executable is the app`
268
+ );
269
+ }
270
+ return path.join(binDir, artifacts[0]);
271
+ }
272
+ function projectDiagnostic(output, layout) {
273
+ const base = layout.multi ? layout.root : layout.sources;
274
+ const prefix = `${base}${path.sep}`;
275
+ return output.split("\n").map((line) => line.startsWith(prefix) ? line.slice(prefix.length) : line).join("\n").trim();
276
+ }
277
+ var ROOT_LOCKS = Symbol.for("peachsim.swiftCompile.rootLocks");
278
+ var host = globalThis;
279
+ var rootLocks = host[ROOT_LOCKS] ?? (host[ROOT_LOCKS] = /* @__PURE__ */ new Map());
280
+ function serialize(root, work) {
281
+ const current = rootLocks.get(root) ?? Promise.resolve();
282
+ const next = current.then(work, work);
283
+ rootLocks.set(
284
+ root,
285
+ next.catch(() => {
286
+ })
287
+ );
288
+ return next;
289
+ }
290
+ function compileSwiftProjectUnit(input, options) {
291
+ mkdirSync(options.buildRoot, { recursive: true });
292
+ const root = realpathSync(options.buildRoot);
293
+ const moduleRoot = path.resolve(options.moduleRoot);
294
+ const layout = {
295
+ root,
296
+ sources: path.join(root, "Sources", "App"),
297
+ multi: compileTargets(input).length > 0
298
+ };
299
+ const hash = swiftArtifactHash(input, options.release, moduleRoot);
300
+ return serialize(root, async () => {
301
+ writeSwiftProject(layout, input, moduleRoot);
302
+ const swift = path.join(options.toolchainBin, "swift");
303
+ if (!existsSync(swift)) {
304
+ throw new Error(
305
+ `swift-compile: no swift.org toolchain at ${options.toolchainBin}; install ${options.release} and its matching wasm sdk`
306
+ );
307
+ }
308
+ try {
309
+ await run(
310
+ swift,
311
+ [
312
+ "build",
313
+ "--package-path",
314
+ root,
315
+ "--swift-sdk",
316
+ `${options.release}_wasm`,
317
+ "-c",
318
+ "release",
319
+ "-Xswiftc",
320
+ "-Osize"
321
+ ],
322
+ { maxBuffer: 64 * 1024 * 1024, timeout: options.timeoutMs }
323
+ );
324
+ } catch (error) {
325
+ throw new Error(projectDiagnostic(outputOf(error), layout), { cause: error });
326
+ }
327
+ return { hash, bytes: readFileSync(builtArtifact(layout)) };
328
+ });
329
+ }
330
+ export {
331
+ MULTI_MANIFEST_VERSION,
332
+ clearLinkedModuleDigests,
333
+ compileSwiftProjectUnit,
334
+ compileTargets,
335
+ emitSwiftPackageManifest,
336
+ swiftArtifactHash,
337
+ swiftModuleInputFiles,
338
+ writeSwiftProject
339
+ };
@@ -0,0 +1,78 @@
1
+ /*! rnx v0.1.571 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/swift-package.ts
23
+ var swift_package_exports = {};
24
+ __export(swift_package_exports, {
25
+ isSwiftManifestFile: () => isSwiftManifestFile,
26
+ swiftManifestTargets: () => swiftManifestTargets
27
+ });
28
+ module.exports = __toCommonJS(swift_package_exports);
29
+ function isSwiftManifestFile(file) {
30
+ const segments = file.split("/");
31
+ return segments[segments.length - 1] === "Package.swift";
32
+ }
33
+ function swiftManifestTargets(manifest) {
34
+ const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
35
+ const targets = [];
36
+ const pattern = /\.(executableTarget|target)\s*\(/g;
37
+ let match;
38
+ while ((match = pattern.exec(code)) !== null) {
39
+ const executable = match[1] === "executableTarget";
40
+ let depth = 1;
41
+ let i = pattern.lastIndex;
42
+ let inString = false;
43
+ let escaped = false;
44
+ let flat = "";
45
+ while (i < code.length && depth > 0) {
46
+ const ch = code[i];
47
+ if (inString) {
48
+ if (escaped) escaped = false;
49
+ else if (ch === "\\") escaped = true;
50
+ else if (ch === '"') inString = false;
51
+ if (depth === 1) flat += ch;
52
+ } else if (ch === '"') {
53
+ inString = true;
54
+ if (depth === 1) flat += ch;
55
+ } else if (ch === "(") {
56
+ depth++;
57
+ if (depth === 1) flat += ch;
58
+ } else if (ch === ")") {
59
+ depth--;
60
+ if (depth >= 1) flat += ch;
61
+ } else if (depth === 1) {
62
+ flat += ch;
63
+ }
64
+ i++;
65
+ }
66
+ const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
67
+ if (!name) continue;
68
+ const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
69
+ const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
70
+ targets.push({ name, path: targetPath, executable });
71
+ }
72
+ return targets;
73
+ }
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ isSwiftManifestFile,
77
+ swiftManifestTargets
78
+ });
@@ -0,0 +1,52 @@
1
+ /*! rnx v0.1.571 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+
3
+ // src/swift-package.ts
4
+ function isSwiftManifestFile(file) {
5
+ const segments = file.split("/");
6
+ return segments[segments.length - 1] === "Package.swift";
7
+ }
8
+ function swiftManifestTargets(manifest) {
9
+ const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
10
+ const targets = [];
11
+ const pattern = /\.(executableTarget|target)\s*\(/g;
12
+ let match;
13
+ while ((match = pattern.exec(code)) !== null) {
14
+ const executable = match[1] === "executableTarget";
15
+ let depth = 1;
16
+ let i = pattern.lastIndex;
17
+ let inString = false;
18
+ let escaped = false;
19
+ let flat = "";
20
+ while (i < code.length && depth > 0) {
21
+ const ch = code[i];
22
+ if (inString) {
23
+ if (escaped) escaped = false;
24
+ else if (ch === "\\") escaped = true;
25
+ else if (ch === '"') inString = false;
26
+ if (depth === 1) flat += ch;
27
+ } else if (ch === '"') {
28
+ inString = true;
29
+ if (depth === 1) flat += ch;
30
+ } else if (ch === "(") {
31
+ depth++;
32
+ if (depth === 1) flat += ch;
33
+ } else if (ch === ")") {
34
+ depth--;
35
+ if (depth >= 1) flat += ch;
36
+ } else if (depth === 1) {
37
+ flat += ch;
38
+ }
39
+ i++;
40
+ }
41
+ const name = /\bname\s*:\s*"([^"]+)"/.exec(flat)?.[1];
42
+ if (!name) continue;
43
+ const rawPath = /\bpath\s*:\s*"([^"]*)"/.exec(flat)?.[1];
44
+ const targetPath = rawPath == null || rawPath === "" ? `Sources/${name}` : rawPath.replace(/^\.\//, "").replace(/\/+$/, "");
45
+ targets.push({ name, path: targetPath, executable });
46
+ }
47
+ return targets;
48
+ }
49
+ export {
50
+ isSwiftManifestFile,
51
+ swiftManifestTargets
52
+ };
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.570 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.571 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.570 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.571 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.570 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.571 | (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;