peachsim 0.1.641 → 0.1.643
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 +1 -1
- 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/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 +1 -1
- package/dist-lib/swift-compile.cjs +62 -13
- package/dist-lib/swift-compile.mjs +62 -13
- package/dist-lib/swift-package.cjs +10 -2
- package/dist-lib/swift-package.mjs +10 -2
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +63 -14
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/swift-compile.ts +72 -14
- package/src/swift-package.ts +11 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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.643 | (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.643 | (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.643 | (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.643 | (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.643 | (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;
|
package/dist-lib/cloud.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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/kotlin-host.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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.643 | (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/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -193,7 +193,15 @@ function swiftManifestTargets(manifest) {
|
|
|
193
193
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
194
194
|
);
|
|
195
195
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
196
|
-
|
|
196
|
+
const resources = /\bresources\s*:/.test(flat);
|
|
197
|
+
targets.push({
|
|
198
|
+
name,
|
|
199
|
+
path: targetPath,
|
|
200
|
+
executable,
|
|
201
|
+
languageMode,
|
|
202
|
+
mainActorIsolation,
|
|
203
|
+
resources
|
|
204
|
+
});
|
|
197
205
|
}
|
|
198
206
|
return targets;
|
|
199
207
|
}
|
|
@@ -317,11 +325,12 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
317
325
|
return siblings;
|
|
318
326
|
}
|
|
319
327
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
328
|
+
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
320
329
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
321
|
-
var MULTI_MANIFEST_VERSION =
|
|
330
|
+
var MULTI_MANIFEST_VERSION = 6;
|
|
322
331
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
323
332
|
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
324
|
-
hash.update(`swift-compile/
|
|
333
|
+
hash.update(`swift-compile/v5
|
|
325
334
|
${release}
|
|
326
335
|
`);
|
|
327
336
|
if (input.oneModule) hash.update("one-module\n");
|
|
@@ -364,7 +373,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
364
373
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
365
374
|
const stanza = (target) => {
|
|
366
375
|
const isolation = target.mainActorIsolation ? " .defaultIsolation(MainActor.self)," : "";
|
|
367
|
-
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
376
|
+
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${OBJC_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
368
377
|
const deps = [
|
|
369
378
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
370
379
|
...oneModule ? [ONE_PRODUCT] : [],
|
|
@@ -423,18 +432,38 @@ function syncSwiftTree(base, files) {
|
|
|
423
432
|
}
|
|
424
433
|
var DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
|
|
425
434
|
var OS_IOS = /\bos\(\s*iOS\s*\)/g;
|
|
435
|
+
var OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/;
|
|
436
|
+
var SELECTOR = /^#selector\b/;
|
|
426
437
|
function swiftSourceAsIOS(source) {
|
|
427
|
-
const
|
|
438
|
+
const { lineStarts, tokens } = swiftCodeScan(source);
|
|
428
439
|
let offset = 0;
|
|
429
|
-
|
|
440
|
+
const conditioned = source.split("\n").map((line) => {
|
|
430
441
|
const start = offset;
|
|
431
442
|
offset += line.length + 1;
|
|
432
|
-
if (!
|
|
443
|
+
if (!lineStarts.has(start) || !DIRECTIVE.test(line)) return line;
|
|
433
444
|
return line.replace(OS_IOS, (match) => "true".padEnd(match.length));
|
|
434
445
|
}).join("\n");
|
|
446
|
+
let out = "";
|
|
447
|
+
let copied = 0;
|
|
448
|
+
for (const at of tokens) {
|
|
449
|
+
const rest = conditioned.slice(at, at + 200);
|
|
450
|
+
const selector = SELECTOR.exec(rest);
|
|
451
|
+
const match = selector ?? OBJC_ATTRIBUTE.exec(rest);
|
|
452
|
+
if (!match) continue;
|
|
453
|
+
let replacement = "@ObjC";
|
|
454
|
+
if (selector) replacement = "#Selector";
|
|
455
|
+
else if (match[0] === "@objcMembers") replacement = "@ObjCMembers";
|
|
456
|
+
else if (match[0] === "@IBAction") replacement = "@ObjC".padEnd(match[0].length);
|
|
457
|
+
else if (match[2] !== void 0)
|
|
458
|
+
replacement = `@ObjC${match[1]}("${match[2].trim()}")`;
|
|
459
|
+
out += conditioned.slice(copied, at) + replacement;
|
|
460
|
+
copied = at + match[0].length;
|
|
461
|
+
}
|
|
462
|
+
return out + conditioned.slice(copied);
|
|
435
463
|
}
|
|
436
|
-
function
|
|
464
|
+
function swiftCodeScan(source) {
|
|
437
465
|
const starts = /* @__PURE__ */ new Set();
|
|
466
|
+
const tokens = [];
|
|
438
467
|
const stack = [{ kind: "code", parens: 0 }];
|
|
439
468
|
const hashesAt = (at) => {
|
|
440
469
|
let end = at;
|
|
@@ -499,7 +528,10 @@ function swiftCodeLineStarts(source) {
|
|
|
499
528
|
} else if (hashes > 0 && source[at] === "/") {
|
|
500
529
|
stack.push({ kind: "regex", hashes });
|
|
501
530
|
i = at + 1;
|
|
502
|
-
} else
|
|
531
|
+
} else {
|
|
532
|
+
if (hashes > 0) tokens.push(at - 1);
|
|
533
|
+
i = Math.max(at, i + 1);
|
|
534
|
+
}
|
|
503
535
|
} else if (char === "(") {
|
|
504
536
|
top.parens++;
|
|
505
537
|
i++;
|
|
@@ -507,9 +539,12 @@ function swiftCodeLineStarts(source) {
|
|
|
507
539
|
if (top.parens === 0 && stack.length > 1) stack.pop();
|
|
508
540
|
else top.parens--;
|
|
509
541
|
i++;
|
|
510
|
-
} else
|
|
542
|
+
} else {
|
|
543
|
+
if (char === "@") tokens.push(i);
|
|
544
|
+
i++;
|
|
545
|
+
}
|
|
511
546
|
}
|
|
512
|
-
return starts;
|
|
547
|
+
return { lineStarts: starts, tokens };
|
|
513
548
|
}
|
|
514
549
|
var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAsIOS(contents) : contents;
|
|
515
550
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
@@ -526,7 +561,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
526
561
|
).replaceAll("__SOOTSIM_SWIFT_PACKAGE__", moduleRoot);
|
|
527
562
|
if (input.oneModule) {
|
|
528
563
|
const product = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
529
|
-
const flags =
|
|
564
|
+
const flags = `"-Osize"${OBJC_IMPLICIT_FLAGS}`;
|
|
530
565
|
if (!manifest.includes(product) || !manifest.includes(flags)) {
|
|
531
566
|
throw new Error(
|
|
532
567
|
"scripts/contrast-app-Package.swift lost the lines the One module links at"
|
|
@@ -541,6 +576,20 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
541
576
|
if (file === "Package.swift") continue;
|
|
542
577
|
files.set(import_node_path2.default.join(layout.root, file), compiledSource(file, contents));
|
|
543
578
|
}
|
|
579
|
+
for (const target of targets) {
|
|
580
|
+
if (!target.resources) continue;
|
|
581
|
+
files.set(
|
|
582
|
+
import_node_path2.default.join(layout.root, target.path, "ResourceBundleAccessor.generated.swift"),
|
|
583
|
+
[
|
|
584
|
+
"import Foundation",
|
|
585
|
+
"",
|
|
586
|
+
"extension Foundation.Bundle {",
|
|
587
|
+
" static let module: Bundle = Bundle.main",
|
|
588
|
+
"}",
|
|
589
|
+
""
|
|
590
|
+
].join("\n")
|
|
591
|
+
);
|
|
592
|
+
}
|
|
544
593
|
files.set(
|
|
545
594
|
import_node_path2.default.join(layout.root, "Package.swift"),
|
|
546
595
|
emitSwiftPackageManifest({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import { execFile as execFile2 } from "node:child_process";
|
|
@@ -158,7 +158,15 @@ function swiftManifestTargets(manifest) {
|
|
|
158
158
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
159
159
|
);
|
|
160
160
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
161
|
-
|
|
161
|
+
const resources = /\bresources\s*:/.test(flat);
|
|
162
|
+
targets.push({
|
|
163
|
+
name,
|
|
164
|
+
path: targetPath,
|
|
165
|
+
executable,
|
|
166
|
+
languageMode,
|
|
167
|
+
mainActorIsolation,
|
|
168
|
+
resources
|
|
169
|
+
});
|
|
162
170
|
}
|
|
163
171
|
return targets;
|
|
164
172
|
}
|
|
@@ -282,11 +290,12 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
282
290
|
return siblings;
|
|
283
291
|
}
|
|
284
292
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
293
|
+
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
285
294
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
286
|
-
var MULTI_MANIFEST_VERSION =
|
|
295
|
+
var MULTI_MANIFEST_VERSION = 6;
|
|
287
296
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
288
297
|
const hash = createHash2("sha256");
|
|
289
|
-
hash.update(`swift-compile/
|
|
298
|
+
hash.update(`swift-compile/v5
|
|
290
299
|
${release}
|
|
291
300
|
`);
|
|
292
301
|
if (input.oneModule) hash.update("one-module\n");
|
|
@@ -329,7 +338,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
329
338
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
330
339
|
const stanza = (target) => {
|
|
331
340
|
const isolation = target.mainActorIsolation ? " .defaultIsolation(MainActor.self)," : "";
|
|
332
|
-
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
341
|
+
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${OBJC_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
333
342
|
const deps = [
|
|
334
343
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
335
344
|
...oneModule ? [ONE_PRODUCT] : [],
|
|
@@ -388,18 +397,38 @@ function syncSwiftTree(base, files) {
|
|
|
388
397
|
}
|
|
389
398
|
var DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
|
|
390
399
|
var OS_IOS = /\bos\(\s*iOS\s*\)/g;
|
|
400
|
+
var OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/;
|
|
401
|
+
var SELECTOR = /^#selector\b/;
|
|
391
402
|
function swiftSourceAsIOS(source) {
|
|
392
|
-
const
|
|
403
|
+
const { lineStarts, tokens } = swiftCodeScan(source);
|
|
393
404
|
let offset = 0;
|
|
394
|
-
|
|
405
|
+
const conditioned = source.split("\n").map((line) => {
|
|
395
406
|
const start = offset;
|
|
396
407
|
offset += line.length + 1;
|
|
397
|
-
if (!
|
|
408
|
+
if (!lineStarts.has(start) || !DIRECTIVE.test(line)) return line;
|
|
398
409
|
return line.replace(OS_IOS, (match) => "true".padEnd(match.length));
|
|
399
410
|
}).join("\n");
|
|
411
|
+
let out = "";
|
|
412
|
+
let copied = 0;
|
|
413
|
+
for (const at of tokens) {
|
|
414
|
+
const rest = conditioned.slice(at, at + 200);
|
|
415
|
+
const selector = SELECTOR.exec(rest);
|
|
416
|
+
const match = selector ?? OBJC_ATTRIBUTE.exec(rest);
|
|
417
|
+
if (!match) continue;
|
|
418
|
+
let replacement = "@ObjC";
|
|
419
|
+
if (selector) replacement = "#Selector";
|
|
420
|
+
else if (match[0] === "@objcMembers") replacement = "@ObjCMembers";
|
|
421
|
+
else if (match[0] === "@IBAction") replacement = "@ObjC".padEnd(match[0].length);
|
|
422
|
+
else if (match[2] !== void 0)
|
|
423
|
+
replacement = `@ObjC${match[1]}("${match[2].trim()}")`;
|
|
424
|
+
out += conditioned.slice(copied, at) + replacement;
|
|
425
|
+
copied = at + match[0].length;
|
|
426
|
+
}
|
|
427
|
+
return out + conditioned.slice(copied);
|
|
400
428
|
}
|
|
401
|
-
function
|
|
429
|
+
function swiftCodeScan(source) {
|
|
402
430
|
const starts = /* @__PURE__ */ new Set();
|
|
431
|
+
const tokens = [];
|
|
403
432
|
const stack = [{ kind: "code", parens: 0 }];
|
|
404
433
|
const hashesAt = (at) => {
|
|
405
434
|
let end = at;
|
|
@@ -464,7 +493,10 @@ function swiftCodeLineStarts(source) {
|
|
|
464
493
|
} else if (hashes > 0 && source[at] === "/") {
|
|
465
494
|
stack.push({ kind: "regex", hashes });
|
|
466
495
|
i = at + 1;
|
|
467
|
-
} else
|
|
496
|
+
} else {
|
|
497
|
+
if (hashes > 0) tokens.push(at - 1);
|
|
498
|
+
i = Math.max(at, i + 1);
|
|
499
|
+
}
|
|
468
500
|
} else if (char === "(") {
|
|
469
501
|
top.parens++;
|
|
470
502
|
i++;
|
|
@@ -472,9 +504,12 @@ function swiftCodeLineStarts(source) {
|
|
|
472
504
|
if (top.parens === 0 && stack.length > 1) stack.pop();
|
|
473
505
|
else top.parens--;
|
|
474
506
|
i++;
|
|
475
|
-
} else
|
|
507
|
+
} else {
|
|
508
|
+
if (char === "@") tokens.push(i);
|
|
509
|
+
i++;
|
|
510
|
+
}
|
|
476
511
|
}
|
|
477
|
-
return starts;
|
|
512
|
+
return { lineStarts: starts, tokens };
|
|
478
513
|
}
|
|
479
514
|
var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAsIOS(contents) : contents;
|
|
480
515
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
@@ -491,7 +526,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
491
526
|
).replaceAll("__SOOTSIM_SWIFT_PACKAGE__", moduleRoot);
|
|
492
527
|
if (input.oneModule) {
|
|
493
528
|
const product = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
494
|
-
const flags =
|
|
529
|
+
const flags = `"-Osize"${OBJC_IMPLICIT_FLAGS}`;
|
|
495
530
|
if (!manifest.includes(product) || !manifest.includes(flags)) {
|
|
496
531
|
throw new Error(
|
|
497
532
|
"scripts/contrast-app-Package.swift lost the lines the One module links at"
|
|
@@ -506,6 +541,20 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
506
541
|
if (file === "Package.swift") continue;
|
|
507
542
|
files.set(path2.join(layout.root, file), compiledSource(file, contents));
|
|
508
543
|
}
|
|
544
|
+
for (const target of targets) {
|
|
545
|
+
if (!target.resources) continue;
|
|
546
|
+
files.set(
|
|
547
|
+
path2.join(layout.root, target.path, "ResourceBundleAccessor.generated.swift"),
|
|
548
|
+
[
|
|
549
|
+
"import Foundation",
|
|
550
|
+
"",
|
|
551
|
+
"extension Foundation.Bundle {",
|
|
552
|
+
" static let module: Bundle = Bundle.main",
|
|
553
|
+
"}",
|
|
554
|
+
""
|
|
555
|
+
].join("\n")
|
|
556
|
+
);
|
|
557
|
+
}
|
|
509
558
|
files.set(
|
|
510
559
|
path2.join(layout.root, "Package.swift"),
|
|
511
560
|
emitSwiftPackageManifest({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -74,7 +74,15 @@ function swiftManifestTargets(manifest) {
|
|
|
74
74
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
75
75
|
);
|
|
76
76
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
77
|
-
|
|
77
|
+
const resources = /\bresources\s*:/.test(flat);
|
|
78
|
+
targets.push({
|
|
79
|
+
name,
|
|
80
|
+
path: targetPath,
|
|
81
|
+
executable,
|
|
82
|
+
languageMode,
|
|
83
|
+
mainActorIsolation,
|
|
84
|
+
resources
|
|
85
|
+
});
|
|
78
86
|
}
|
|
79
87
|
return targets;
|
|
80
88
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-package.ts
|
|
4
4
|
function isSwiftManifestFile(file) {
|
|
@@ -48,7 +48,15 @@ function swiftManifestTargets(manifest) {
|
|
|
48
48
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
49
49
|
);
|
|
50
50
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
51
|
-
|
|
51
|
+
const resources = /\bresources\s*:/.test(flat);
|
|
52
|
+
targets.push({
|
|
53
|
+
name,
|
|
54
|
+
path: targetPath,
|
|
55
|
+
executable,
|
|
56
|
+
languageMode,
|
|
57
|
+
mainActorIsolation,
|
|
58
|
+
resources
|
|
59
|
+
});
|
|
52
60
|
}
|
|
53
61
|
return targets;
|
|
54
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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;
|
|
@@ -697,7 +697,15 @@ function swiftManifestTargets(manifest) {
|
|
|
697
697
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
|
|
698
698
|
);
|
|
699
699
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
|
|
700
|
-
|
|
700
|
+
const resources = /\bresources\s*:/.test(flat);
|
|
701
|
+
targets.push({
|
|
702
|
+
name,
|
|
703
|
+
path: targetPath,
|
|
704
|
+
executable,
|
|
705
|
+
languageMode,
|
|
706
|
+
mainActorIsolation,
|
|
707
|
+
resources
|
|
708
|
+
});
|
|
701
709
|
}
|
|
702
710
|
return targets;
|
|
703
711
|
}
|
|
@@ -817,11 +825,12 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
817
825
|
return siblings;
|
|
818
826
|
}
|
|
819
827
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
828
|
+
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
820
829
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
821
|
-
var MULTI_MANIFEST_VERSION =
|
|
830
|
+
var MULTI_MANIFEST_VERSION = 6;
|
|
822
831
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
823
832
|
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
824
|
-
hash.update(`swift-compile/
|
|
833
|
+
hash.update(`swift-compile/v5
|
|
825
834
|
${release}
|
|
826
835
|
`);
|
|
827
836
|
if (input.oneModule) hash.update("one-module\n");
|
|
@@ -864,7 +873,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
864
873
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
865
874
|
const stanza = (target) => {
|
|
866
875
|
const isolation = target.mainActorIsolation ? " .defaultIsolation(MainActor.self)," : "";
|
|
867
|
-
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
876
|
+
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${OBJC_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}])]`;
|
|
868
877
|
const deps = [
|
|
869
878
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
870
879
|
...oneModule ? [ONE_PRODUCT] : [],
|
|
@@ -923,18 +932,38 @@ function syncSwiftTree(base, files) {
|
|
|
923
932
|
}
|
|
924
933
|
var DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
|
|
925
934
|
var OS_IOS = /\bos\(\s*iOS\s*\)/g;
|
|
935
|
+
var OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/;
|
|
936
|
+
var SELECTOR = /^#selector\b/;
|
|
926
937
|
function swiftSourceAsIOS(source) {
|
|
927
|
-
const
|
|
938
|
+
const { lineStarts, tokens } = swiftCodeScan(source);
|
|
928
939
|
let offset = 0;
|
|
929
|
-
|
|
940
|
+
const conditioned = source.split("\n").map((line) => {
|
|
930
941
|
const start = offset;
|
|
931
942
|
offset += line.length + 1;
|
|
932
|
-
if (!
|
|
943
|
+
if (!lineStarts.has(start) || !DIRECTIVE.test(line)) return line;
|
|
933
944
|
return line.replace(OS_IOS, (match) => "true".padEnd(match.length));
|
|
934
945
|
}).join("\n");
|
|
935
|
-
|
|
936
|
-
|
|
946
|
+
let out = "";
|
|
947
|
+
let copied = 0;
|
|
948
|
+
for (const at of tokens) {
|
|
949
|
+
const rest = conditioned.slice(at, at + 200);
|
|
950
|
+
const selector = SELECTOR.exec(rest);
|
|
951
|
+
const match = selector ?? OBJC_ATTRIBUTE.exec(rest);
|
|
952
|
+
if (!match) continue;
|
|
953
|
+
let replacement = "@ObjC";
|
|
954
|
+
if (selector) replacement = "#Selector";
|
|
955
|
+
else if (match[0] === "@objcMembers") replacement = "@ObjCMembers";
|
|
956
|
+
else if (match[0] === "@IBAction") replacement = "@ObjC".padEnd(match[0].length);
|
|
957
|
+
else if (match[2] !== void 0)
|
|
958
|
+
replacement = `@ObjC${match[1]}("${match[2].trim()}")`;
|
|
959
|
+
out += conditioned.slice(copied, at) + replacement;
|
|
960
|
+
copied = at + match[0].length;
|
|
961
|
+
}
|
|
962
|
+
return out + conditioned.slice(copied);
|
|
963
|
+
}
|
|
964
|
+
function swiftCodeScan(source) {
|
|
937
965
|
const starts = /* @__PURE__ */ new Set();
|
|
966
|
+
const tokens = [];
|
|
938
967
|
const stack = [{ kind: "code", parens: 0 }];
|
|
939
968
|
const hashesAt = (at) => {
|
|
940
969
|
let end = at;
|
|
@@ -999,7 +1028,10 @@ function swiftCodeLineStarts(source) {
|
|
|
999
1028
|
} else if (hashes > 0 && source[at] === "/") {
|
|
1000
1029
|
stack.push({ kind: "regex", hashes });
|
|
1001
1030
|
i = at + 1;
|
|
1002
|
-
} else
|
|
1031
|
+
} else {
|
|
1032
|
+
if (hashes > 0) tokens.push(at - 1);
|
|
1033
|
+
i = Math.max(at, i + 1);
|
|
1034
|
+
}
|
|
1003
1035
|
} else if (char === "(") {
|
|
1004
1036
|
top.parens++;
|
|
1005
1037
|
i++;
|
|
@@ -1007,9 +1039,12 @@ function swiftCodeLineStarts(source) {
|
|
|
1007
1039
|
if (top.parens === 0 && stack.length > 1) stack.pop();
|
|
1008
1040
|
else top.parens--;
|
|
1009
1041
|
i++;
|
|
1010
|
-
} else
|
|
1042
|
+
} else {
|
|
1043
|
+
if (char === "@") tokens.push(i);
|
|
1044
|
+
i++;
|
|
1045
|
+
}
|
|
1011
1046
|
}
|
|
1012
|
-
return starts;
|
|
1047
|
+
return { lineStarts: starts, tokens };
|
|
1013
1048
|
}
|
|
1014
1049
|
var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAsIOS(contents) : contents;
|
|
1015
1050
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
@@ -1026,7 +1061,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
1026
1061
|
).replaceAll("__SOOTSIM_SWIFT_PACKAGE__", moduleRoot);
|
|
1027
1062
|
if (input.oneModule) {
|
|
1028
1063
|
const product = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
1029
|
-
const flags =
|
|
1064
|
+
const flags = `"-Osize"${OBJC_IMPLICIT_FLAGS}`;
|
|
1030
1065
|
if (!manifest.includes(product) || !manifest.includes(flags)) {
|
|
1031
1066
|
throw new Error(
|
|
1032
1067
|
"scripts/contrast-app-Package.swift lost the lines the One module links at"
|
|
@@ -1041,6 +1076,20 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
1041
1076
|
if (file === "Package.swift") continue;
|
|
1042
1077
|
files.set(import_node_path4.default.join(layout.root, file), compiledSource(file, contents));
|
|
1043
1078
|
}
|
|
1079
|
+
for (const target of targets) {
|
|
1080
|
+
if (!target.resources) continue;
|
|
1081
|
+
files.set(
|
|
1082
|
+
import_node_path4.default.join(layout.root, target.path, "ResourceBundleAccessor.generated.swift"),
|
|
1083
|
+
[
|
|
1084
|
+
"import Foundation",
|
|
1085
|
+
"",
|
|
1086
|
+
"extension Foundation.Bundle {",
|
|
1087
|
+
" static let module: Bundle = Bundle.main",
|
|
1088
|
+
"}",
|
|
1089
|
+
""
|
|
1090
|
+
].join("\n")
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1044
1093
|
files.set(
|
|
1045
1094
|
import_node_path4.default.join(layout.root, "Package.swift"),
|
|
1046
1095
|
emitSwiftPackageManifest({
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.643 | (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/package.json
CHANGED
package/src/swift-compile.ts
CHANGED
|
@@ -213,10 +213,15 @@ function swiftSiblingDependencies(
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
const ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")'
|
|
216
|
+
// every iOS source sees the ObjectiveC module's selectors through Foundation;
|
|
217
|
+
// PeachObjC stands in for it, so a source that imports only Foundation still
|
|
218
|
+
// compiles `@objc` and `#selector`. scripts/contrast-app-Package.swift and
|
|
219
|
+
// example/Package.swift carry the same flags.
|
|
220
|
+
const OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"'
|
|
216
221
|
const ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"'
|
|
217
222
|
|
|
218
223
|
/** bump with any change to the emitted multi-target manifest text. */
|
|
219
|
-
export const MULTI_MANIFEST_VERSION =
|
|
224
|
+
export const MULTI_MANIFEST_VERSION = 6
|
|
220
225
|
|
|
221
226
|
export function swiftArtifactHash(
|
|
222
227
|
input: SwiftCompileInput,
|
|
@@ -224,8 +229,9 @@ export function swiftArtifactHash(
|
|
|
224
229
|
moduleRoot: string,
|
|
225
230
|
): string {
|
|
226
231
|
const hash = createHash('sha256')
|
|
227
|
-
//
|
|
228
|
-
|
|
232
|
+
// v5: a target declaring resources gets SwiftPM's Bundle.module accessor
|
|
233
|
+
// (v4: sources compile through swiftSourceAsIOS)
|
|
234
|
+
hash.update(`swift-compile/v5\n${release}\n`)
|
|
229
235
|
if (input.oneModule) hash.update('one-module\n')
|
|
230
236
|
hash.update(linkedModuleDigest(moduleRoot))
|
|
231
237
|
for (const file of Object.keys(input.files).sort()) {
|
|
@@ -277,7 +283,7 @@ export function emitSwiftPackageManifest(args: {
|
|
|
277
283
|
const isolation = target.mainActorIsolation
|
|
278
284
|
? ' .defaultIsolation(MainActor.self),'
|
|
279
285
|
: ''
|
|
280
|
-
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${oneModule ? ONE_IMPLICIT_FLAGS : ''}])]`
|
|
286
|
+
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation} .unsafeFlags(["-Osize"${OBJC_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ''}])]`
|
|
281
287
|
const deps = [
|
|
282
288
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
283
289
|
...(oneModule ? [ONE_PRODUCT] : []),
|
|
@@ -349,24 +355,52 @@ function syncSwiftTree(base: string, files: Map<string, string>): void {
|
|
|
349
355
|
// os(WASI) still holds for code written for wasm. only `#if` and `#elseif`
|
|
350
356
|
// lines that begin in code change: a line inside a string literal or a block
|
|
351
357
|
// comment is content. the artifact hash stays over the original text.
|
|
358
|
+
//
|
|
359
|
+
// wasm Swift has no ObjC runtime, so `@objc` and `#selector` do not compile.
|
|
360
|
+
// in code (never in a string, comment or regex) `@objc` becomes `@ObjC`,
|
|
361
|
+
// `@objcMembers` `@ObjCMembers`, `@IBAction` `@ObjC` padded, and `#selector(`
|
|
362
|
+
// `#Selector(`: the module's macros that expose a method to selector dispatch
|
|
363
|
+
// (plans/peach/uikit-shell.md, gate B). all keep their width except an
|
|
364
|
+
// explicit `@objc(name:)`, whose name becomes a string argument.
|
|
352
365
|
const DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/
|
|
353
366
|
const OS_IOS = /\bos\(\s*iOS\s*\)/g
|
|
367
|
+
const OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/
|
|
368
|
+
const SELECTOR = /^#selector\b/
|
|
354
369
|
export function swiftSourceAsIOS(source: string): string {
|
|
355
|
-
const
|
|
370
|
+
const { lineStarts, tokens } = swiftCodeScan(source)
|
|
356
371
|
let offset = 0
|
|
357
|
-
|
|
372
|
+
// equal width, so every token offset still holds
|
|
373
|
+
const conditioned = source
|
|
358
374
|
.split('\n')
|
|
359
375
|
.map((line) => {
|
|
360
376
|
const start = offset
|
|
361
377
|
offset += line.length + 1
|
|
362
|
-
if (!
|
|
378
|
+
if (!lineStarts.has(start) || !DIRECTIVE.test(line)) return line
|
|
363
379
|
return line.replace(OS_IOS, (match) => 'true'.padEnd(match.length))
|
|
364
380
|
})
|
|
365
381
|
.join('\n')
|
|
382
|
+
let out = ''
|
|
383
|
+
let copied = 0
|
|
384
|
+
for (const at of tokens) {
|
|
385
|
+
const rest = conditioned.slice(at, at + 200)
|
|
386
|
+
const selector = SELECTOR.exec(rest)
|
|
387
|
+
const match = selector ?? OBJC_ATTRIBUTE.exec(rest)
|
|
388
|
+
if (!match) continue
|
|
389
|
+
let replacement = '@ObjC'
|
|
390
|
+
if (selector) replacement = '#Selector'
|
|
391
|
+
else if (match[0] === '@objcMembers') replacement = '@ObjCMembers'
|
|
392
|
+
else if (match[0] === '@IBAction') replacement = '@ObjC'.padEnd(match[0].length)
|
|
393
|
+
else if (match[2] !== undefined)
|
|
394
|
+
replacement = `@ObjC${match[1]}("${match[2].trim()}")`
|
|
395
|
+
out += conditioned.slice(copied, at) + replacement
|
|
396
|
+
copied = at + match[0].length
|
|
397
|
+
}
|
|
398
|
+
return out + conditioned.slice(copied)
|
|
366
399
|
}
|
|
367
400
|
|
|
368
|
-
// the offsets of the lines that begin in code,
|
|
369
|
-
//
|
|
401
|
+
// the offsets of the lines that begin in code, and of every `@` and `#` that
|
|
402
|
+
// stands in code (an interpolation's code included), from a scan of Swift's
|
|
403
|
+
// lexical contexts: nested block comments, line comments, string literals (single and
|
|
370
404
|
// multiline, raw with any number of #, interpolations holding code and
|
|
371
405
|
// strings of their own) and #/ /# regex literals. a bare /regex/ literal
|
|
372
406
|
// reads as code.
|
|
@@ -375,8 +409,9 @@ type Lexical =
|
|
|
375
409
|
| { kind: 'block'; depth: number }
|
|
376
410
|
| { kind: 'string'; hashes: number; multiline: boolean }
|
|
377
411
|
| { kind: 'regex'; hashes: number }
|
|
378
|
-
function
|
|
412
|
+
function swiftCodeScan(source: string): { lineStarts: Set<number>; tokens: number[] } {
|
|
379
413
|
const starts = new Set<number>()
|
|
414
|
+
const tokens: number[] = []
|
|
380
415
|
const stack: Lexical[] = [{ kind: 'code', parens: 0 }]
|
|
381
416
|
const hashesAt = (at: number) => {
|
|
382
417
|
let end = at
|
|
@@ -441,7 +476,10 @@ function swiftCodeLineStarts(source: string): Set<number> {
|
|
|
441
476
|
} else if (hashes > 0 && source[at] === '/') {
|
|
442
477
|
stack.push({ kind: 'regex', hashes })
|
|
443
478
|
i = at + 1
|
|
444
|
-
} else
|
|
479
|
+
} else {
|
|
480
|
+
if (hashes > 0) tokens.push(at - 1)
|
|
481
|
+
i = Math.max(at, i + 1)
|
|
482
|
+
}
|
|
445
483
|
} else if (char === '(') {
|
|
446
484
|
top.parens++
|
|
447
485
|
i++
|
|
@@ -449,9 +487,12 @@ function swiftCodeLineStarts(source: string): Set<number> {
|
|
|
449
487
|
if (top.parens === 0 && stack.length > 1) stack.pop()
|
|
450
488
|
else top.parens--
|
|
451
489
|
i++
|
|
452
|
-
} else
|
|
490
|
+
} else {
|
|
491
|
+
if (char === '@') tokens.push(i)
|
|
492
|
+
i++
|
|
493
|
+
}
|
|
453
494
|
}
|
|
454
|
-
return starts
|
|
495
|
+
return { lineStarts: starts, tokens }
|
|
455
496
|
}
|
|
456
497
|
|
|
457
498
|
const compiledSource = (file: string, contents: string) =>
|
|
@@ -477,7 +518,7 @@ export function writeSwiftProject(
|
|
|
477
518
|
// anchored on lines the template already has, so the template stays a
|
|
478
519
|
// valid manifest for a compiler build that predates the One module
|
|
479
520
|
const product = '.product(name: "CoreLocation", package: "sootsim-swift"),'
|
|
480
|
-
const flags =
|
|
521
|
+
const flags = `"-Osize"${OBJC_IMPLICIT_FLAGS}`
|
|
481
522
|
if (!manifest.includes(product) || !manifest.includes(flags)) {
|
|
482
523
|
throw new Error(
|
|
483
524
|
'scripts/contrast-app-Package.swift lost the lines the One module links at',
|
|
@@ -493,6 +534,23 @@ export function writeSwiftProject(
|
|
|
493
534
|
if (file === 'Package.swift') continue
|
|
494
535
|
files.set(path.join(layout.root, file), compiledSource(file, contents))
|
|
495
536
|
}
|
|
537
|
+
// SwiftPM writes this accessor into a target that declares resources. the
|
|
538
|
+
// emitted manifest declares none, since Peach serves every target's
|
|
539
|
+
// resources from the app's one flat bundle, so the accessor names it.
|
|
540
|
+
for (const target of targets) {
|
|
541
|
+
if (!target.resources) continue
|
|
542
|
+
files.set(
|
|
543
|
+
path.join(layout.root, target.path, 'ResourceBundleAccessor.generated.swift'),
|
|
544
|
+
[
|
|
545
|
+
'import Foundation',
|
|
546
|
+
'',
|
|
547
|
+
'extension Foundation.Bundle {',
|
|
548
|
+
' static let module: Bundle = Bundle.main',
|
|
549
|
+
'}',
|
|
550
|
+
'',
|
|
551
|
+
].join('\n'),
|
|
552
|
+
)
|
|
553
|
+
}
|
|
496
554
|
files.set(
|
|
497
555
|
path.join(layout.root, 'Package.swift'),
|
|
498
556
|
emitSwiftPackageManifest({
|
package/src/swift-package.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface SwiftPackageTarget {
|
|
|
10
10
|
languageMode: number
|
|
11
11
|
/** true when the target declares `.defaultIsolation(MainActor.self)`. */
|
|
12
12
|
mainActorIsolation: boolean
|
|
13
|
+
/** true when the target declares `resources:`, so SwiftPM gives it `Bundle.module`. */
|
|
14
|
+
resources: boolean
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
/** whether a project-relative key is a SwiftPM manifest, not a source. */
|
|
@@ -75,7 +77,15 @@ export function swiftManifestTargets(manifest: string): SwiftPackageTarget[] {
|
|
|
75
77
|
/\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? '5',
|
|
76
78
|
)
|
|
77
79
|
const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call)
|
|
78
|
-
|
|
80
|
+
const resources = /\bresources\s*:/.test(flat)
|
|
81
|
+
targets.push({
|
|
82
|
+
name,
|
|
83
|
+
path: targetPath,
|
|
84
|
+
executable,
|
|
85
|
+
languageMode,
|
|
86
|
+
mainActorIsolation,
|
|
87
|
+
resources,
|
|
88
|
+
})
|
|
79
89
|
}
|
|
80
90
|
return targets
|
|
81
91
|
}
|