peachsim 0.1.760 → 0.1.761
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 +66 -8
- 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 +66 -8
- package/dist-lib/swift-compile.cjs +66 -8
- package/dist-lib/swift-compile.mjs +66 -8
- 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 +66 -8
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/swift-compile.ts +102 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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;
|
|
@@ -6768,14 +6768,72 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
|
6768
6768
|
};
|
|
6769
6769
|
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
6770
6770
|
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
6771
|
-
function
|
|
6771
|
+
function swiftCondition(text2, available) {
|
|
6772
|
+
const tokens = text2.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
6773
|
+
let index = 0;
|
|
6774
|
+
const atom = () => {
|
|
6775
|
+
const token = tokens[index++];
|
|
6776
|
+
if (token === "!") {
|
|
6777
|
+
const value = atom();
|
|
6778
|
+
return value === void 0 ? void 0 : !value;
|
|
6779
|
+
}
|
|
6780
|
+
if (token === "(") {
|
|
6781
|
+
const value = either();
|
|
6782
|
+
index++;
|
|
6783
|
+
return value;
|
|
6784
|
+
}
|
|
6785
|
+
if (token === "true") return true;
|
|
6786
|
+
if (token === "false") return false;
|
|
6787
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
6788
|
+
if (!call) return void 0;
|
|
6789
|
+
const [, name2, argument] = call;
|
|
6790
|
+
if (name2 === "os") return argument === "iOS" || argument === "WASI";
|
|
6791
|
+
if (name2 === "canImport") return available.has(argument);
|
|
6792
|
+
if (name2 === "targetEnvironment") return false;
|
|
6793
|
+
if (name2 === "arch") return argument === "wasm32";
|
|
6794
|
+
return void 0;
|
|
6795
|
+
};
|
|
6796
|
+
const both = () => {
|
|
6797
|
+
let value = atom();
|
|
6798
|
+
while (tokens[index] === "&&") {
|
|
6799
|
+
index++;
|
|
6800
|
+
const next = atom();
|
|
6801
|
+
value = value === false || next === false ? false : value && next ? true : void 0;
|
|
6802
|
+
}
|
|
6803
|
+
return value;
|
|
6804
|
+
};
|
|
6805
|
+
const either = () => {
|
|
6806
|
+
let value = both();
|
|
6807
|
+
while (tokens[index] === "||") {
|
|
6808
|
+
index++;
|
|
6809
|
+
const next = both();
|
|
6810
|
+
value = value === true || next === true ? true : value === false && next === false ? false : void 0;
|
|
6811
|
+
}
|
|
6812
|
+
return value;
|
|
6813
|
+
};
|
|
6814
|
+
return either();
|
|
6815
|
+
}
|
|
6816
|
+
function swiftImportNames(contents, available) {
|
|
6772
6817
|
const names = [];
|
|
6773
|
-
|
|
6818
|
+
const frames = [];
|
|
6774
6819
|
for (const line of contents.split("\n")) {
|
|
6775
|
-
const directive = /^\s*#(if|endif)\b
|
|
6776
|
-
if (directive
|
|
6777
|
-
|
|
6778
|
-
|
|
6820
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
6821
|
+
if (directive && available) {
|
|
6822
|
+
const [, kind, rest] = directive;
|
|
6823
|
+
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
6824
|
+
if (kind === "if") {
|
|
6825
|
+
const active = swiftCondition(condition, available);
|
|
6826
|
+
frames.push({ active, taken: active });
|
|
6827
|
+
} else if (kind === "endif") frames.pop();
|
|
6828
|
+
else if (frames.length > 0) {
|
|
6829
|
+
const frame = frames[frames.length - 1];
|
|
6830
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
6831
|
+
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
6832
|
+
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
6833
|
+
}
|
|
6834
|
+
continue;
|
|
6835
|
+
}
|
|
6836
|
+
if (available && frames.some((frame) => frame.active !== true)) continue;
|
|
6779
6837
|
const name2 = SWIFT_IMPORT.exec(line)?.[1];
|
|
6780
6838
|
if (name2) names.push(name2);
|
|
6781
6839
|
}
|
|
@@ -6820,7 +6878,7 @@ function missingSwiftModules(files, available) {
|
|
|
6820
6878
|
const missing = /* @__PURE__ */ new Map();
|
|
6821
6879
|
for (const [file, contents] of Object.entries(files)) {
|
|
6822
6880
|
if (!file.endsWith(".swift") || file === "Package.swift") continue;
|
|
6823
|
-
for (const name2 of new Set(swiftImportNames(contents,
|
|
6881
|
+
for (const name2 of new Set(swiftImportNames(contents, available))) {
|
|
6824
6882
|
if (available.has(name2)) continue;
|
|
6825
6883
|
missing.set(name2, [...missing.get(name2) ?? [], file]);
|
|
6826
6884
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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/plist.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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/plist.mjs
CHANGED
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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;
|
|
@@ -21883,14 +21883,72 @@ function withNativeSourceGlue(input, glue) {
|
|
|
21883
21883
|
oneModule: true
|
|
21884
21884
|
};
|
|
21885
21885
|
}
|
|
21886
|
-
function
|
|
21886
|
+
function swiftCondition(text2, available) {
|
|
21887
|
+
const tokens = text2.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
21888
|
+
let index = 0;
|
|
21889
|
+
const atom = () => {
|
|
21890
|
+
const token = tokens[index++];
|
|
21891
|
+
if (token === "!") {
|
|
21892
|
+
const value = atom();
|
|
21893
|
+
return value === void 0 ? void 0 : !value;
|
|
21894
|
+
}
|
|
21895
|
+
if (token === "(") {
|
|
21896
|
+
const value = either();
|
|
21897
|
+
index++;
|
|
21898
|
+
return value;
|
|
21899
|
+
}
|
|
21900
|
+
if (token === "true") return true;
|
|
21901
|
+
if (token === "false") return false;
|
|
21902
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
21903
|
+
if (!call) return void 0;
|
|
21904
|
+
const [, name2, argument] = call;
|
|
21905
|
+
if (name2 === "os") return argument === "iOS" || argument === "WASI";
|
|
21906
|
+
if (name2 === "canImport") return available.has(argument);
|
|
21907
|
+
if (name2 === "targetEnvironment") return false;
|
|
21908
|
+
if (name2 === "arch") return argument === "wasm32";
|
|
21909
|
+
return void 0;
|
|
21910
|
+
};
|
|
21911
|
+
const both = () => {
|
|
21912
|
+
let value = atom();
|
|
21913
|
+
while (tokens[index] === "&&") {
|
|
21914
|
+
index++;
|
|
21915
|
+
const next = atom();
|
|
21916
|
+
value = value === false || next === false ? false : value && next ? true : void 0;
|
|
21917
|
+
}
|
|
21918
|
+
return value;
|
|
21919
|
+
};
|
|
21920
|
+
const either = () => {
|
|
21921
|
+
let value = both();
|
|
21922
|
+
while (tokens[index] === "||") {
|
|
21923
|
+
index++;
|
|
21924
|
+
const next = both();
|
|
21925
|
+
value = value === true || next === true ? true : value === false && next === false ? false : void 0;
|
|
21926
|
+
}
|
|
21927
|
+
return value;
|
|
21928
|
+
};
|
|
21929
|
+
return either();
|
|
21930
|
+
}
|
|
21931
|
+
function swiftImportNames(contents, available) {
|
|
21887
21932
|
const names = [];
|
|
21888
|
-
|
|
21933
|
+
const frames = [];
|
|
21889
21934
|
for (const line of contents.split("\n")) {
|
|
21890
|
-
const directive = /^\s*#(if|endif)\b
|
|
21891
|
-
if (directive
|
|
21892
|
-
|
|
21893
|
-
|
|
21935
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
21936
|
+
if (directive && available) {
|
|
21937
|
+
const [, kind, rest] = directive;
|
|
21938
|
+
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
21939
|
+
if (kind === "if") {
|
|
21940
|
+
const active = swiftCondition(condition, available);
|
|
21941
|
+
frames.push({ active, taken: active });
|
|
21942
|
+
} else if (kind === "endif") frames.pop();
|
|
21943
|
+
else if (frames.length > 0) {
|
|
21944
|
+
const frame = frames[frames.length - 1];
|
|
21945
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
21946
|
+
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
21947
|
+
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
21948
|
+
}
|
|
21949
|
+
continue;
|
|
21950
|
+
}
|
|
21951
|
+
if (available && frames.some((frame) => frame.active !== true)) continue;
|
|
21894
21952
|
const name2 = SWIFT_IMPORT.exec(line)?.[1];
|
|
21895
21953
|
if (name2) names.push(name2);
|
|
21896
21954
|
}
|
|
@@ -21934,7 +21992,7 @@ function missingSwiftModules(files, available) {
|
|
|
21934
21992
|
const missing = /* @__PURE__ */ new Map();
|
|
21935
21993
|
for (const [file, contents] of Object.entries(files)) {
|
|
21936
21994
|
if (!file.endsWith(".swift") || file === "Package.swift") continue;
|
|
21937
|
-
for (const name2 of new Set(swiftImportNames(contents,
|
|
21995
|
+
for (const name2 of new Set(swiftImportNames(contents, available))) {
|
|
21938
21996
|
if (available.has(name2)) continue;
|
|
21939
21997
|
missing.set(name2, [...missing.get(name2) ?? [], file]);
|
|
21940
21998
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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;
|
|
@@ -447,14 +447,72 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
|
447
447
|
};
|
|
448
448
|
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
449
449
|
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
450
|
-
function
|
|
450
|
+
function swiftCondition(text, available) {
|
|
451
|
+
const tokens = text.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
452
|
+
let index = 0;
|
|
453
|
+
const atom = () => {
|
|
454
|
+
const token = tokens[index++];
|
|
455
|
+
if (token === "!") {
|
|
456
|
+
const value = atom();
|
|
457
|
+
return value === void 0 ? void 0 : !value;
|
|
458
|
+
}
|
|
459
|
+
if (token === "(") {
|
|
460
|
+
const value = either();
|
|
461
|
+
index++;
|
|
462
|
+
return value;
|
|
463
|
+
}
|
|
464
|
+
if (token === "true") return true;
|
|
465
|
+
if (token === "false") return false;
|
|
466
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
467
|
+
if (!call) return void 0;
|
|
468
|
+
const [, name, argument] = call;
|
|
469
|
+
if (name === "os") return argument === "iOS" || argument === "WASI";
|
|
470
|
+
if (name === "canImport") return available.has(argument);
|
|
471
|
+
if (name === "targetEnvironment") return false;
|
|
472
|
+
if (name === "arch") return argument === "wasm32";
|
|
473
|
+
return void 0;
|
|
474
|
+
};
|
|
475
|
+
const both = () => {
|
|
476
|
+
let value = atom();
|
|
477
|
+
while (tokens[index] === "&&") {
|
|
478
|
+
index++;
|
|
479
|
+
const next = atom();
|
|
480
|
+
value = value === false || next === false ? false : value && next ? true : void 0;
|
|
481
|
+
}
|
|
482
|
+
return value;
|
|
483
|
+
};
|
|
484
|
+
const either = () => {
|
|
485
|
+
let value = both();
|
|
486
|
+
while (tokens[index] === "||") {
|
|
487
|
+
index++;
|
|
488
|
+
const next = both();
|
|
489
|
+
value = value === true || next === true ? true : value === false && next === false ? false : void 0;
|
|
490
|
+
}
|
|
491
|
+
return value;
|
|
492
|
+
};
|
|
493
|
+
return either();
|
|
494
|
+
}
|
|
495
|
+
function swiftImportNames(contents, available) {
|
|
451
496
|
const names = [];
|
|
452
|
-
|
|
497
|
+
const frames = [];
|
|
453
498
|
for (const line of contents.split("\n")) {
|
|
454
|
-
const directive = /^\s*#(if|endif)\b
|
|
455
|
-
if (directive
|
|
456
|
-
|
|
457
|
-
|
|
499
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
500
|
+
if (directive && available) {
|
|
501
|
+
const [, kind, rest] = directive;
|
|
502
|
+
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
503
|
+
if (kind === "if") {
|
|
504
|
+
const active = swiftCondition(condition, available);
|
|
505
|
+
frames.push({ active, taken: active });
|
|
506
|
+
} else if (kind === "endif") frames.pop();
|
|
507
|
+
else if (frames.length > 0) {
|
|
508
|
+
const frame = frames[frames.length - 1];
|
|
509
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
510
|
+
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
511
|
+
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
512
|
+
}
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
if (available && frames.some((frame) => frame.active !== true)) continue;
|
|
458
516
|
const name = SWIFT_IMPORT.exec(line)?.[1];
|
|
459
517
|
if (name) names.push(name);
|
|
460
518
|
}
|
|
@@ -499,7 +557,7 @@ function missingSwiftModules(files, available) {
|
|
|
499
557
|
const missing = /* @__PURE__ */ new Map();
|
|
500
558
|
for (const [file, contents] of Object.entries(files)) {
|
|
501
559
|
if (!file.endsWith(".swift") || file === "Package.swift") continue;
|
|
502
|
-
for (const name of new Set(swiftImportNames(contents,
|
|
560
|
+
for (const name of new Set(swiftImportNames(contents, available))) {
|
|
503
561
|
if (available.has(name)) continue;
|
|
504
562
|
missing.set(name, [...missing.get(name) ?? [], file]);
|
|
505
563
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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";
|
|
@@ -399,14 +399,72 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
|
399
399
|
};
|
|
400
400
|
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
401
401
|
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
402
|
-
function
|
|
402
|
+
function swiftCondition(text, available) {
|
|
403
|
+
const tokens = text.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
404
|
+
let index = 0;
|
|
405
|
+
const atom = () => {
|
|
406
|
+
const token = tokens[index++];
|
|
407
|
+
if (token === "!") {
|
|
408
|
+
const value = atom();
|
|
409
|
+
return value === void 0 ? void 0 : !value;
|
|
410
|
+
}
|
|
411
|
+
if (token === "(") {
|
|
412
|
+
const value = either();
|
|
413
|
+
index++;
|
|
414
|
+
return value;
|
|
415
|
+
}
|
|
416
|
+
if (token === "true") return true;
|
|
417
|
+
if (token === "false") return false;
|
|
418
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
419
|
+
if (!call) return void 0;
|
|
420
|
+
const [, name, argument] = call;
|
|
421
|
+
if (name === "os") return argument === "iOS" || argument === "WASI";
|
|
422
|
+
if (name === "canImport") return available.has(argument);
|
|
423
|
+
if (name === "targetEnvironment") return false;
|
|
424
|
+
if (name === "arch") return argument === "wasm32";
|
|
425
|
+
return void 0;
|
|
426
|
+
};
|
|
427
|
+
const both = () => {
|
|
428
|
+
let value = atom();
|
|
429
|
+
while (tokens[index] === "&&") {
|
|
430
|
+
index++;
|
|
431
|
+
const next = atom();
|
|
432
|
+
value = value === false || next === false ? false : value && next ? true : void 0;
|
|
433
|
+
}
|
|
434
|
+
return value;
|
|
435
|
+
};
|
|
436
|
+
const either = () => {
|
|
437
|
+
let value = both();
|
|
438
|
+
while (tokens[index] === "||") {
|
|
439
|
+
index++;
|
|
440
|
+
const next = both();
|
|
441
|
+
value = value === true || next === true ? true : value === false && next === false ? false : void 0;
|
|
442
|
+
}
|
|
443
|
+
return value;
|
|
444
|
+
};
|
|
445
|
+
return either();
|
|
446
|
+
}
|
|
447
|
+
function swiftImportNames(contents, available) {
|
|
403
448
|
const names = [];
|
|
404
|
-
|
|
449
|
+
const frames = [];
|
|
405
450
|
for (const line of contents.split("\n")) {
|
|
406
|
-
const directive = /^\s*#(if|endif)\b
|
|
407
|
-
if (directive
|
|
408
|
-
|
|
409
|
-
|
|
451
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
452
|
+
if (directive && available) {
|
|
453
|
+
const [, kind, rest] = directive;
|
|
454
|
+
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
455
|
+
if (kind === "if") {
|
|
456
|
+
const active = swiftCondition(condition, available);
|
|
457
|
+
frames.push({ active, taken: active });
|
|
458
|
+
} else if (kind === "endif") frames.pop();
|
|
459
|
+
else if (frames.length > 0) {
|
|
460
|
+
const frame = frames[frames.length - 1];
|
|
461
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
462
|
+
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
463
|
+
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
464
|
+
}
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
if (available && frames.some((frame) => frame.active !== true)) continue;
|
|
410
468
|
const name = SWIFT_IMPORT.exec(line)?.[1];
|
|
411
469
|
if (name) names.push(name);
|
|
412
470
|
}
|
|
@@ -451,7 +509,7 @@ function missingSwiftModules(files, available) {
|
|
|
451
509
|
const missing = /* @__PURE__ */ new Map();
|
|
452
510
|
for (const [file, contents] of Object.entries(files)) {
|
|
453
511
|
if (!file.endsWith(".swift") || file === "Package.swift") continue;
|
|
454
|
-
for (const name of new Set(swiftImportNames(contents,
|
|
512
|
+
for (const name of new Set(swiftImportNames(contents, available))) {
|
|
455
513
|
if (available.has(name)) continue;
|
|
456
514
|
missing.set(name, [...missing.get(name) ?? [], file]);
|
|
457
515
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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.761 | (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.761 | (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.761 | (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.761 | (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;
|
|
@@ -732,14 +732,72 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
|
732
732
|
};
|
|
733
733
|
var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
|
|
734
734
|
var SWIFT_IMPORT = /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/;
|
|
735
|
-
function
|
|
735
|
+
function swiftCondition(text2, available) {
|
|
736
|
+
const tokens = text2.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? [];
|
|
737
|
+
let index = 0;
|
|
738
|
+
const atom = () => {
|
|
739
|
+
const token = tokens[index++];
|
|
740
|
+
if (token === "!") {
|
|
741
|
+
const value = atom();
|
|
742
|
+
return value === void 0 ? void 0 : !value;
|
|
743
|
+
}
|
|
744
|
+
if (token === "(") {
|
|
745
|
+
const value = either();
|
|
746
|
+
index++;
|
|
747
|
+
return value;
|
|
748
|
+
}
|
|
749
|
+
if (token === "true") return true;
|
|
750
|
+
if (token === "false") return false;
|
|
751
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? "");
|
|
752
|
+
if (!call) return void 0;
|
|
753
|
+
const [, name, argument] = call;
|
|
754
|
+
if (name === "os") return argument === "iOS" || argument === "WASI";
|
|
755
|
+
if (name === "canImport") return available.has(argument);
|
|
756
|
+
if (name === "targetEnvironment") return false;
|
|
757
|
+
if (name === "arch") return argument === "wasm32";
|
|
758
|
+
return void 0;
|
|
759
|
+
};
|
|
760
|
+
const both = () => {
|
|
761
|
+
let value = atom();
|
|
762
|
+
while (tokens[index] === "&&") {
|
|
763
|
+
index++;
|
|
764
|
+
const next = atom();
|
|
765
|
+
value = value === false || next === false ? false : value && next ? true : void 0;
|
|
766
|
+
}
|
|
767
|
+
return value;
|
|
768
|
+
};
|
|
769
|
+
const either = () => {
|
|
770
|
+
let value = both();
|
|
771
|
+
while (tokens[index] === "||") {
|
|
772
|
+
index++;
|
|
773
|
+
const next = both();
|
|
774
|
+
value = value === true || next === true ? true : value === false && next === false ? false : void 0;
|
|
775
|
+
}
|
|
776
|
+
return value;
|
|
777
|
+
};
|
|
778
|
+
return either();
|
|
779
|
+
}
|
|
780
|
+
function swiftImportNames(contents, available) {
|
|
736
781
|
const names = [];
|
|
737
|
-
|
|
782
|
+
const frames = [];
|
|
738
783
|
for (const line of contents.split("\n")) {
|
|
739
|
-
const directive = /^\s*#(if|endif)\b
|
|
740
|
-
if (directive
|
|
741
|
-
|
|
742
|
-
|
|
784
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line);
|
|
785
|
+
if (directive && available) {
|
|
786
|
+
const [, kind, rest] = directive;
|
|
787
|
+
const condition = (rest ?? "").replace(/\/\/.*$/, "").trim();
|
|
788
|
+
if (kind === "if") {
|
|
789
|
+
const active = swiftCondition(condition, available);
|
|
790
|
+
frames.push({ active, taken: active });
|
|
791
|
+
} else if (kind === "endif") frames.pop();
|
|
792
|
+
else if (frames.length > 0) {
|
|
793
|
+
const frame = frames[frames.length - 1];
|
|
794
|
+
const holds = kind === "else" ? true : swiftCondition(condition, available);
|
|
795
|
+
frame.active = frame.taken === true ? false : frame.taken === false ? holds : holds && void 0;
|
|
796
|
+
frame.taken = frame.taken === true || holds === true ? true : frame.taken === false ? holds : void 0;
|
|
797
|
+
}
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
if (available && frames.some((frame) => frame.active !== true)) continue;
|
|
743
801
|
const name = SWIFT_IMPORT.exec(line)?.[1];
|
|
744
802
|
if (name) names.push(name);
|
|
745
803
|
}
|
|
@@ -784,7 +842,7 @@ function missingSwiftModules(files, available) {
|
|
|
784
842
|
const missing = /* @__PURE__ */ new Map();
|
|
785
843
|
for (const [file, contents] of Object.entries(files)) {
|
|
786
844
|
if (!file.endsWith(".swift") || file === "Package.swift") continue;
|
|
787
|
-
for (const name of new Set(swiftImportNames(contents,
|
|
845
|
+
for (const name of new Set(swiftImportNames(contents, available))) {
|
|
788
846
|
if (available.has(name)) continue;
|
|
789
847
|
missing.set(name, [...missing.get(name) ?? [], file]);
|
|
790
848
|
}
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.761 | (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
|
@@ -275,19 +275,108 @@ const OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES)
|
|
|
275
275
|
const SWIFT_IMPORT =
|
|
276
276
|
/^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?([A-Za-z_][A-Za-z0-9_]*)/
|
|
277
277
|
|
|
278
|
+
// a compilation condition as the wasm compile sees it after the source
|
|
279
|
+
// rewrite below: `os(iOS)` and `os(WASI)` hold, other platforms do not,
|
|
280
|
+
// `canImport` holds for an available module. what the scan cannot know
|
|
281
|
+
// (custom flags, swift versions, features) is undefined, three-valued
|
|
282
|
+
// through `!`, `&&` and `||`.
|
|
283
|
+
function swiftCondition(
|
|
284
|
+
text: string,
|
|
285
|
+
available: ReadonlySet<string>,
|
|
286
|
+
): boolean | undefined {
|
|
287
|
+
const tokens = text.match(/\w+\s*\([^()]*\)|&&|\|\||!|\(|\)|\w+/g) ?? []
|
|
288
|
+
let index = 0
|
|
289
|
+
const atom = (): boolean | undefined => {
|
|
290
|
+
const token = tokens[index++]
|
|
291
|
+
if (token === '!') {
|
|
292
|
+
const value = atom()
|
|
293
|
+
return value === undefined ? undefined : !value
|
|
294
|
+
}
|
|
295
|
+
if (token === '(') {
|
|
296
|
+
const value = either()
|
|
297
|
+
index++
|
|
298
|
+
return value
|
|
299
|
+
}
|
|
300
|
+
if (token === 'true') return true
|
|
301
|
+
if (token === 'false') return false
|
|
302
|
+
const call = /^(\w+)\s*\(\s*([^,()]*?)\s*(?:,[^()]*)?\)$/.exec(token ?? '')
|
|
303
|
+
if (!call) return undefined
|
|
304
|
+
const [, name, argument] = call
|
|
305
|
+
if (name === 'os') return argument === 'iOS' || argument === 'WASI'
|
|
306
|
+
if (name === 'canImport') return available.has(argument!)
|
|
307
|
+
if (name === 'targetEnvironment') return false
|
|
308
|
+
if (name === 'arch') return argument === 'wasm32'
|
|
309
|
+
return undefined
|
|
310
|
+
}
|
|
311
|
+
const both = (): boolean | undefined => {
|
|
312
|
+
let value = atom()
|
|
313
|
+
while (tokens[index] === '&&') {
|
|
314
|
+
index++
|
|
315
|
+
const next = atom()
|
|
316
|
+
value = value === false || next === false ? false : value && next ? true : undefined
|
|
317
|
+
}
|
|
318
|
+
return value
|
|
319
|
+
}
|
|
320
|
+
const either = (): boolean | undefined => {
|
|
321
|
+
let value = both()
|
|
322
|
+
while (tokens[index] === '||') {
|
|
323
|
+
index++
|
|
324
|
+
const next = both()
|
|
325
|
+
value =
|
|
326
|
+
value === true || next === true
|
|
327
|
+
? true
|
|
328
|
+
: value === false && next === false
|
|
329
|
+
? false
|
|
330
|
+
: undefined
|
|
331
|
+
}
|
|
332
|
+
return value
|
|
333
|
+
}
|
|
334
|
+
return either()
|
|
335
|
+
}
|
|
336
|
+
|
|
278
337
|
/**
|
|
279
|
-
* the modules a source imports, in order. `
|
|
280
|
-
* outside every `#if
|
|
281
|
-
*
|
|
338
|
+
* the modules a source imports, in order. with `available`, only imports the
|
|
339
|
+
* wasm compile certainly reaches: those outside every `#if`, or in a branch
|
|
340
|
+
* whose condition holds there, `os(iOS)` included since the compile rewrites
|
|
341
|
+
* it to true. a branch the scan cannot decide may compile out, so its
|
|
342
|
+
* imports stay out of the list.
|
|
282
343
|
*/
|
|
283
|
-
export function swiftImportNames(
|
|
344
|
+
export function swiftImportNames(
|
|
345
|
+
contents: string,
|
|
346
|
+
available?: ReadonlySet<string>,
|
|
347
|
+
): string[] {
|
|
284
348
|
const names: string[] = []
|
|
285
|
-
|
|
349
|
+
// per open `#if`: whether its current branch is active, and whether an
|
|
350
|
+
// earlier branch was taken (or may have been)
|
|
351
|
+
const frames: { active: boolean | undefined; taken: boolean | undefined }[] = []
|
|
286
352
|
for (const line of contents.split('\n')) {
|
|
287
|
-
const directive = /^\s*#(if|endif)\b
|
|
288
|
-
if (directive
|
|
289
|
-
|
|
290
|
-
|
|
353
|
+
const directive = /^\s*#(if|elseif|else|endif)\b(.*)$/.exec(line)
|
|
354
|
+
if (directive && available) {
|
|
355
|
+
const [, kind, rest] = directive
|
|
356
|
+
const condition = (rest ?? '').replace(/\/\/.*$/, '').trim()
|
|
357
|
+
if (kind === 'if') {
|
|
358
|
+
const active = swiftCondition(condition, available)
|
|
359
|
+
frames.push({ active, taken: active })
|
|
360
|
+
} else if (kind === 'endif') frames.pop()
|
|
361
|
+
else if (frames.length > 0) {
|
|
362
|
+
const frame = frames[frames.length - 1]!
|
|
363
|
+
const holds = kind === 'else' ? true : swiftCondition(condition, available)
|
|
364
|
+
frame.active =
|
|
365
|
+
frame.taken === true
|
|
366
|
+
? false
|
|
367
|
+
: frame.taken === false
|
|
368
|
+
? holds
|
|
369
|
+
: holds && undefined
|
|
370
|
+
frame.taken =
|
|
371
|
+
frame.taken === true || holds === true
|
|
372
|
+
? true
|
|
373
|
+
: frame.taken === false
|
|
374
|
+
? holds
|
|
375
|
+
: undefined
|
|
376
|
+
}
|
|
377
|
+
continue
|
|
378
|
+
}
|
|
379
|
+
if (available && frames.some((frame) => frame.active !== true)) continue
|
|
291
380
|
const name = SWIFT_IMPORT.exec(line)?.[1]
|
|
292
381
|
if (name) names.push(name)
|
|
293
382
|
}
|
|
@@ -346,8 +435,9 @@ export function swiftAvailableModules(
|
|
|
346
435
|
}
|
|
347
436
|
|
|
348
437
|
/**
|
|
349
|
-
* the modules the sources import
|
|
350
|
-
* provides, each with the files
|
|
438
|
+
* the modules the sources certainly import (swiftImportNames with
|
|
439
|
+
* `available`) that nothing available provides, each with the files
|
|
440
|
+
* importing it. the compiler stops at the first
|
|
351
441
|
* missing module; this names all of them at once.
|
|
352
442
|
*/
|
|
353
443
|
export function missingSwiftModules(
|
|
@@ -357,7 +447,7 @@ export function missingSwiftModules(
|
|
|
357
447
|
const missing = new Map<string, string[]>()
|
|
358
448
|
for (const [file, contents] of Object.entries(files)) {
|
|
359
449
|
if (!file.endsWith('.swift') || file === 'Package.swift') continue
|
|
360
|
-
for (const name of new Set(swiftImportNames(contents,
|
|
450
|
+
for (const name of new Set(swiftImportNames(contents, available))) {
|
|
361
451
|
if (available.has(name)) continue
|
|
362
452
|
missing.set(name, [...(missing.get(name) ?? []), file])
|
|
363
453
|
}
|