peachsim 0.1.774 → 0.1.775
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/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/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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1768 -799
- 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 +2136 -1154
- package/dist-lib/swift-compile.cjs +45 -15
- package/dist-lib/swift-compile.mjs +43 -15
- 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 +1382 -413
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/swift-compile.ts +56 -18
- package/src/swift-host.ts +60 -11
- package/src/swift-packages.ts +18 -3
- package/src/swift-standins.ts +546 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.775 | (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;
|
|
@@ -49,10 +49,12 @@ __export(swift_compile_exports, {
|
|
|
49
49
|
swiftDistributionAt: () => swiftDistributionAt,
|
|
50
50
|
swiftIcuAsset: () => swiftIcuAsset,
|
|
51
51
|
swiftImportNames: () => swiftImportNames,
|
|
52
|
+
swiftMacroPlugins: () => swiftMacroPlugins,
|
|
52
53
|
swiftModuleDigest: () => swiftModuleDigest,
|
|
53
54
|
swiftModuleInputFiles: () => swiftModuleInputFiles,
|
|
54
55
|
swiftModuleSdk: () => swiftModuleSdk,
|
|
55
56
|
swiftPeachModules: () => swiftPeachModules,
|
|
57
|
+
swiftSdkPaths: () => swiftSdkPaths,
|
|
56
58
|
swiftSourceAsIOS: () => swiftSourceAsIOS,
|
|
57
59
|
swiftTargetDependencies: () => swiftTargetDependencies,
|
|
58
60
|
syncSwiftTree: () => syncSwiftTree,
|
|
@@ -347,10 +349,13 @@ function swiftModuleInputFiles(root) {
|
|
|
347
349
|
walk("Sources");
|
|
348
350
|
return files.sort();
|
|
349
351
|
}
|
|
350
|
-
|
|
352
|
+
function swiftMacroPlugins(moduleRoot) {
|
|
351
353
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
352
354
|
if (distribution)
|
|
353
|
-
return
|
|
355
|
+
return {
|
|
356
|
+
libraries: distribution.plugins.map((plugin) => import_node_path2.default.join(moduleRoot, plugin)),
|
|
357
|
+
stale: false
|
|
358
|
+
};
|
|
354
359
|
const dir = import_node_path2.default.join(moduleRoot, ".build/host/RnxPreviewMacros");
|
|
355
360
|
const ext = process.platform === "darwin" ? "dylib" : "so";
|
|
356
361
|
const plugins = [
|
|
@@ -363,17 +368,23 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
|
|
|
363
368
|
source: import_node_path2.default.join(moduleRoot, "Sources/FoundationMacros/PredicateMacro.swift")
|
|
364
369
|
}
|
|
365
370
|
];
|
|
366
|
-
|
|
367
|
-
({ library
|
|
368
|
-
|
|
371
|
+
return {
|
|
372
|
+
libraries: plugins.map(({ library }) => library),
|
|
373
|
+
stale: plugins.some(
|
|
374
|
+
({ library, source }) => !(0, import_node_fs2.existsSync)(library) || (0, import_node_fs2.statSync)(source).mtimeMs > (0, import_node_fs2.statSync)(library).mtimeMs
|
|
375
|
+
)
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
async function ensureMacroPlugins(moduleRoot, toolchainBin) {
|
|
379
|
+
const { libraries, stale } = swiftMacroPlugins(moduleRoot);
|
|
369
380
|
if (stale) {
|
|
370
381
|
await run2("sh", [
|
|
371
382
|
import_node_path2.default.join(moduleRoot, "scripts/build-preview-plugin.sh"),
|
|
372
383
|
toolchainBin,
|
|
373
|
-
|
|
384
|
+
libraries[0]
|
|
374
385
|
]);
|
|
375
386
|
}
|
|
376
|
-
return
|
|
387
|
+
return libraries;
|
|
377
388
|
}
|
|
378
389
|
var linkedModuleDigests = /* @__PURE__ */ new Map();
|
|
379
390
|
function clearLinkedModuleDigests(root) {
|
|
@@ -532,20 +543,37 @@ function swiftPeachModules(moduleRoot) {
|
|
|
532
543
|
)
|
|
533
544
|
].map((match) => match[1]);
|
|
534
545
|
}
|
|
535
|
-
var
|
|
536
|
-
function
|
|
546
|
+
var sdkPaths = /* @__PURE__ */ new Map();
|
|
547
|
+
function swiftSdkPaths(moduleRoot, toolchainBin) {
|
|
537
548
|
const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
|
|
538
|
-
const key = `${
|
|
539
|
-
const cached =
|
|
549
|
+
const key = `${toolchainBin}\0${sdk}`;
|
|
550
|
+
const cached = sdkPaths.get(key);
|
|
540
551
|
if (cached) return cached;
|
|
541
|
-
const modules = new Set(swiftPeachModules(moduleRoot));
|
|
542
552
|
const configuration = (0, import_node_child_process2.execFileSync)(
|
|
543
553
|
import_node_path2.default.join(toolchainBin, "swift"),
|
|
544
554
|
["sdk", "configure", "--show-configuration", sdk, "wasm32-unknown-wasip1"],
|
|
545
555
|
{ encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
|
|
546
556
|
);
|
|
547
|
-
const
|
|
548
|
-
|
|
557
|
+
const field = (name) => {
|
|
558
|
+
const value = new RegExp(`^${name}:\\s*(.+)$`, "m").exec(configuration)?.[1]?.trim();
|
|
559
|
+
if (!value) throw new Error(`swift sdk ${sdk} reports no ${name}`);
|
|
560
|
+
return value;
|
|
561
|
+
};
|
|
562
|
+
const paths = {
|
|
563
|
+
sysroot: field("sdkRootPath"),
|
|
564
|
+
resources: field("swiftResourcesPath")
|
|
565
|
+
};
|
|
566
|
+
sdkPaths.set(key, paths);
|
|
567
|
+
return paths;
|
|
568
|
+
}
|
|
569
|
+
var availableModules = /* @__PURE__ */ new Map();
|
|
570
|
+
function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
571
|
+
const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
|
|
572
|
+
const key = `${moduleRoot}\0${sdk}`;
|
|
573
|
+
const cached = availableModules.get(key);
|
|
574
|
+
if (cached) return cached;
|
|
575
|
+
const modules = new Set(swiftPeachModules(moduleRoot));
|
|
576
|
+
const { resources } = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
549
577
|
for (const entry of (0, import_node_fs2.readdirSync)(import_node_path2.default.join(resources, "wasi"))) {
|
|
550
578
|
if (entry.endsWith(".swiftmodule"))
|
|
551
579
|
modules.add(entry.slice(0, -".swiftmodule".length));
|
|
@@ -1741,10 +1769,12 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
1741
1769
|
swiftDistributionAt,
|
|
1742
1770
|
swiftIcuAsset,
|
|
1743
1771
|
swiftImportNames,
|
|
1772
|
+
swiftMacroPlugins,
|
|
1744
1773
|
swiftModuleDigest,
|
|
1745
1774
|
swiftModuleInputFiles,
|
|
1746
1775
|
swiftModuleSdk,
|
|
1747
1776
|
swiftPeachModules,
|
|
1777
|
+
swiftSdkPaths,
|
|
1748
1778
|
swiftSourceAsIOS,
|
|
1749
1779
|
swiftTargetDependencies,
|
|
1750
1780
|
syncSwiftTree,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.775 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import { execFile as execFile2, execFileSync } from "node:child_process";
|
|
@@ -298,10 +298,13 @@ function swiftModuleInputFiles(root) {
|
|
|
298
298
|
walk("Sources");
|
|
299
299
|
return files.sort();
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
function swiftMacroPlugins(moduleRoot) {
|
|
302
302
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
303
303
|
if (distribution)
|
|
304
|
-
return
|
|
304
|
+
return {
|
|
305
|
+
libraries: distribution.plugins.map((plugin) => path2.join(moduleRoot, plugin)),
|
|
306
|
+
stale: false
|
|
307
|
+
};
|
|
305
308
|
const dir = path2.join(moduleRoot, ".build/host/RnxPreviewMacros");
|
|
306
309
|
const ext = process.platform === "darwin" ? "dylib" : "so";
|
|
307
310
|
const plugins = [
|
|
@@ -314,17 +317,23 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
|
|
|
314
317
|
source: path2.join(moduleRoot, "Sources/FoundationMacros/PredicateMacro.swift")
|
|
315
318
|
}
|
|
316
319
|
];
|
|
317
|
-
|
|
318
|
-
({ library
|
|
319
|
-
|
|
320
|
+
return {
|
|
321
|
+
libraries: plugins.map(({ library }) => library),
|
|
322
|
+
stale: plugins.some(
|
|
323
|
+
({ library, source }) => !existsSync(library) || statSync(source).mtimeMs > statSync(library).mtimeMs
|
|
324
|
+
)
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
async function ensureMacroPlugins(moduleRoot, toolchainBin) {
|
|
328
|
+
const { libraries, stale } = swiftMacroPlugins(moduleRoot);
|
|
320
329
|
if (stale) {
|
|
321
330
|
await run2("sh", [
|
|
322
331
|
path2.join(moduleRoot, "scripts/build-preview-plugin.sh"),
|
|
323
332
|
toolchainBin,
|
|
324
|
-
|
|
333
|
+
libraries[0]
|
|
325
334
|
]);
|
|
326
335
|
}
|
|
327
|
-
return
|
|
336
|
+
return libraries;
|
|
328
337
|
}
|
|
329
338
|
var linkedModuleDigests = /* @__PURE__ */ new Map();
|
|
330
339
|
function clearLinkedModuleDigests(root) {
|
|
@@ -483,20 +492,37 @@ function swiftPeachModules(moduleRoot) {
|
|
|
483
492
|
)
|
|
484
493
|
].map((match) => match[1]);
|
|
485
494
|
}
|
|
486
|
-
var
|
|
487
|
-
function
|
|
495
|
+
var sdkPaths = /* @__PURE__ */ new Map();
|
|
496
|
+
function swiftSdkPaths(moduleRoot, toolchainBin) {
|
|
488
497
|
const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
|
|
489
|
-
const key = `${
|
|
490
|
-
const cached =
|
|
498
|
+
const key = `${toolchainBin}\0${sdk}`;
|
|
499
|
+
const cached = sdkPaths.get(key);
|
|
491
500
|
if (cached) return cached;
|
|
492
|
-
const modules = new Set(swiftPeachModules(moduleRoot));
|
|
493
501
|
const configuration = execFileSync(
|
|
494
502
|
path2.join(toolchainBin, "swift"),
|
|
495
503
|
["sdk", "configure", "--show-configuration", sdk, "wasm32-unknown-wasip1"],
|
|
496
504
|
{ encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
|
|
497
505
|
);
|
|
498
|
-
const
|
|
499
|
-
|
|
506
|
+
const field = (name) => {
|
|
507
|
+
const value = new RegExp(`^${name}:\\s*(.+)$`, "m").exec(configuration)?.[1]?.trim();
|
|
508
|
+
if (!value) throw new Error(`swift sdk ${sdk} reports no ${name}`);
|
|
509
|
+
return value;
|
|
510
|
+
};
|
|
511
|
+
const paths = {
|
|
512
|
+
sysroot: field("sdkRootPath"),
|
|
513
|
+
resources: field("swiftResourcesPath")
|
|
514
|
+
};
|
|
515
|
+
sdkPaths.set(key, paths);
|
|
516
|
+
return paths;
|
|
517
|
+
}
|
|
518
|
+
var availableModules = /* @__PURE__ */ new Map();
|
|
519
|
+
function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
520
|
+
const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
|
|
521
|
+
const key = `${moduleRoot}\0${sdk}`;
|
|
522
|
+
const cached = availableModules.get(key);
|
|
523
|
+
if (cached) return cached;
|
|
524
|
+
const modules = new Set(swiftPeachModules(moduleRoot));
|
|
525
|
+
const { resources } = swiftSdkPaths(moduleRoot, toolchainBin);
|
|
500
526
|
for (const entry of readdirSync(path2.join(resources, "wasi"))) {
|
|
501
527
|
if (entry.endsWith(".swiftmodule"))
|
|
502
528
|
modules.add(entry.slice(0, -".swiftmodule".length));
|
|
@@ -1691,10 +1717,12 @@ export {
|
|
|
1691
1717
|
swiftDistributionAt,
|
|
1692
1718
|
swiftIcuAsset,
|
|
1693
1719
|
swiftImportNames,
|
|
1720
|
+
swiftMacroPlugins,
|
|
1694
1721
|
swiftModuleDigest,
|
|
1695
1722
|
swiftModuleInputFiles,
|
|
1696
1723
|
swiftModuleSdk,
|
|
1697
1724
|
swiftPeachModules,
|
|
1725
|
+
swiftSdkPaths,
|
|
1698
1726
|
swiftSourceAsIOS,
|
|
1699
1727
|
swiftTargetDependencies,
|
|
1700
1728
|
syncSwiftTree,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.775 | (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.
|
|
1
|
+
/*! rnx v0.1.775 | (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.
|
|
1
|
+
/*! rnx v0.1.775 | (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.775 | (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;
|