peachsim 0.1.680 → 0.1.682
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 +24 -15
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -11
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -6
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -6
- 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 +26 -17
- package/dist-lib/swift-compile.cjs +21 -4
- package/dist-lib/swift-compile.mjs +21 -4
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +22 -5
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/host/fetch-proxy-handler.ts +1 -7
- package/src/host/fetch-proxy-overrides.ts +9 -10
- package/src/swift-compile.ts +24 -2
- package/src/swift-submit.ts +3 -1
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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;
|
|
@@ -21998,7 +21998,7 @@ ${release}
|
|
|
21998
21998
|
return hash.digest("hex");
|
|
21999
21999
|
}
|
|
22000
22000
|
function emitSwiftPackageManifest(args) {
|
|
22001
|
-
const { targets, siblings, moduleRoot, oneModule, distribution } = args;
|
|
22001
|
+
const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
|
|
22002
22002
|
const executable = targets.find((target) => target.executable);
|
|
22003
22003
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
22004
22004
|
const stanza = (target) => {
|
|
@@ -22008,7 +22008,8 @@ function emitSwiftPackageManifest(args) {
|
|
|
22008
22008
|
const deps = [
|
|
22009
22009
|
...distribution ? [] : [
|
|
22010
22010
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
22011
|
-
...oneModule ? [ONE_PRODUCT] : []
|
|
22011
|
+
...oneModule ? [ONE_PRODUCT] : [],
|
|
22012
|
+
...spriteKit ? [SPRITEKIT_PRODUCT] : []
|
|
22012
22013
|
],
|
|
22013
22014
|
...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`)
|
|
22014
22015
|
].join(", ");
|
|
@@ -22240,6 +22241,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
22240
22241
|
manifest = manifest.replace(product, `${product}
|
|
22241
22242
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
22242
22243
|
}
|
|
22244
|
+
if (importsSpriteKit(input.files)) {
|
|
22245
|
+
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
22246
|
+
if (!manifest.includes(anchor))
|
|
22247
|
+
throw new Error(
|
|
22248
|
+
"scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
|
|
22249
|
+
);
|
|
22250
|
+
manifest = manifest.replace(anchor, `${anchor}
|
|
22251
|
+
${SPRITEKIT_PRODUCT},`);
|
|
22252
|
+
}
|
|
22243
22253
|
files.set(import_node_path9.default.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
22244
22254
|
} else {
|
|
22245
22255
|
const base = layout.multi ? layout.root : layout.sources;
|
|
@@ -22268,6 +22278,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
22268
22278
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
22269
22279
|
moduleRoot,
|
|
22270
22280
|
oneModule: input.oneModule,
|
|
22281
|
+
spriteKit: importsSpriteKit(input.files),
|
|
22271
22282
|
distribution: distribution ?? void 0
|
|
22272
22283
|
}) + moduleFiles
|
|
22273
22284
|
);
|
|
@@ -22374,7 +22385,7 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
22374
22385
|
};
|
|
22375
22386
|
});
|
|
22376
22387
|
}
|
|
22377
|
-
var import_node_child_process5, import_node_crypto4, import_node_fs9, import_node_os3, import_node_path9, import_node_util2, run2, WASM_TRIPLE, cores, BUILD_ENV, BUILD_JOBS, linkedModuleDigests, ONE_PRODUCT, OBJC_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, MULTI_MANIFEST_VERSION, DIRECTIVE, OS_IOS, OBJC_ATTRIBUTE, SELECTOR, DELEGATE_CLASS, compiledSource, ROOT_LOCKS, host, rootLocks;
|
|
22388
|
+
var import_node_child_process5, import_node_crypto4, import_node_fs9, import_node_os3, import_node_path9, import_node_util2, run2, WASM_TRIPLE, cores, BUILD_ENV, BUILD_JOBS, linkedModuleDigests, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, OBJC_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, MULTI_MANIFEST_VERSION, DIRECTIVE, OS_IOS, OBJC_ATTRIBUTE, SELECTOR, DELEGATE_CLASS, compiledSource, ROOT_LOCKS, host, rootLocks;
|
|
22378
22389
|
var init_swift_compile = __esm({
|
|
22379
22390
|
"src/swift-compile.ts"() {
|
|
22380
22391
|
"use strict";
|
|
@@ -22394,9 +22405,15 @@ var init_swift_compile = __esm({
|
|
|
22394
22405
|
BUILD_JOBS = String(Math.max(1, Math.floor(cores / 2)));
|
|
22395
22406
|
linkedModuleDigests = /* @__PURE__ */ new Map();
|
|
22396
22407
|
ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
22408
|
+
SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
|
|
22409
|
+
importsSpriteKit = (files) => Object.entries(files).some(
|
|
22410
|
+
([file, contents]) => file.endsWith(".swift") && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?SpriteKit\b/m.test(
|
|
22411
|
+
contents
|
|
22412
|
+
)
|
|
22413
|
+
);
|
|
22397
22414
|
OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
22398
22415
|
ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
22399
|
-
MULTI_MANIFEST_VERSION =
|
|
22416
|
+
MULTI_MANIFEST_VERSION = 7;
|
|
22400
22417
|
DIRECTIVE = /^[ \t]*#(?:if|elseif)\b/;
|
|
22401
22418
|
OS_IOS = /\bos\(\s*iOS\s*\)/g;
|
|
22402
22419
|
OBJC_ATTRIBUTE = /^@(?:objcMembers\b|objc\b(?:(\s*)\(([^()]*)\))?|IBAction\b)/;
|
|
@@ -23237,7 +23254,7 @@ var init_swift_submit = __esm({
|
|
|
23237
23254
|
MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
23238
23255
|
MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
23239
23256
|
MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
23240
|
-
SWIFT_HOST_ABI =
|
|
23257
|
+
SWIFT_HOST_ABI = 5;
|
|
23241
23258
|
POLL_INTERVAL_MS = 1500;
|
|
23242
23259
|
}
|
|
23243
23260
|
});
|
|
@@ -25580,25 +25597,20 @@ function getFetchProxyTargetHeaders(targetUrl) {
|
|
|
25580
25597
|
const hostOverrides = headerOverridesFor(targetUrl.hostname);
|
|
25581
25598
|
return {
|
|
25582
25599
|
"accept-encoding": "identity",
|
|
25583
|
-
...hostOverrides?.suppressBrowserUserAgent ? {} : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT },
|
|
25584
25600
|
...hostOverrides?.headers
|
|
25585
25601
|
};
|
|
25586
25602
|
}
|
|
25587
|
-
var
|
|
25603
|
+
var HOST_HEADER_OVERRIDES, PUBLIC_RPC_TENANT, QUICKNODE_HOST_SUFFIX, PUBLIC_RPC_BY_QUICKNODE_CHAIN;
|
|
25588
25604
|
var init_fetch_proxy_overrides = __esm({
|
|
25589
25605
|
"src/host/fetch-proxy-overrides.ts"() {
|
|
25590
25606
|
"use strict";
|
|
25591
|
-
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";
|
|
25592
25607
|
HOST_HEADER_OVERRIDES = [
|
|
25593
25608
|
{
|
|
25594
25609
|
hostSuffix: "uniswap.org",
|
|
25595
25610
|
headers: {
|
|
25596
25611
|
origin: "https://app.uniswap.org",
|
|
25597
25612
|
referer: "https://app.uniswap.org/"
|
|
25598
|
-
}
|
|
25599
|
-
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
25600
|
-
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
25601
|
-
suppressBrowserUserAgent: true
|
|
25613
|
+
}
|
|
25602
25614
|
}
|
|
25603
25615
|
];
|
|
25604
25616
|
PUBLIC_RPC_TENANT = "rnx-public-rpc";
|
|
@@ -25639,10 +25651,7 @@ function buildFetchProxyHeaders(reqHeaders, targetUrl) {
|
|
|
25639
25651
|
if (STRIP_FETCH_PROXY_HEADERS.has(key.toLowerCase())) continue;
|
|
25640
25652
|
headers[key] = Array.isArray(value) ? value.join(", ") : value;
|
|
25641
25653
|
}
|
|
25642
|
-
Object.assign(
|
|
25643
|
-
headers,
|
|
25644
|
-
targetUrl ? getFetchProxyTargetHeaders(targetUrl) : { "user-agent": FETCH_PROXY_BROWSER_USER_AGENT }
|
|
25645
|
-
);
|
|
25654
|
+
Object.assign(headers, targetUrl ? getFetchProxyTargetHeaders(targetUrl) : {});
|
|
25646
25655
|
return headers;
|
|
25647
25656
|
}
|
|
25648
25657
|
function buildAppApiProxyHeaders(reqHeaders, targetUrl) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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;
|
|
@@ -370,9 +370,15 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
370
370
|
return siblings;
|
|
371
371
|
}
|
|
372
372
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
373
|
+
var SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
|
|
374
|
+
var importsSpriteKit = (files) => Object.entries(files).some(
|
|
375
|
+
([file, contents]) => file.endsWith(".swift") && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?SpriteKit\b/m.test(
|
|
376
|
+
contents
|
|
377
|
+
)
|
|
378
|
+
);
|
|
373
379
|
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
374
380
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
375
|
-
var MULTI_MANIFEST_VERSION =
|
|
381
|
+
var MULTI_MANIFEST_VERSION = 7;
|
|
376
382
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
377
383
|
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
378
384
|
hash.update(`swift-compile/v7
|
|
@@ -413,7 +419,7 @@ ${release}
|
|
|
413
419
|
return hash.digest("hex");
|
|
414
420
|
}
|
|
415
421
|
function emitSwiftPackageManifest(args) {
|
|
416
|
-
const { targets, siblings, moduleRoot, oneModule, distribution } = args;
|
|
422
|
+
const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
|
|
417
423
|
const executable = targets.find((target) => target.executable);
|
|
418
424
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
419
425
|
const stanza = (target) => {
|
|
@@ -423,7 +429,8 @@ function emitSwiftPackageManifest(args) {
|
|
|
423
429
|
const deps = [
|
|
424
430
|
...distribution ? [] : [
|
|
425
431
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
426
|
-
...oneModule ? [ONE_PRODUCT] : []
|
|
432
|
+
...oneModule ? [ONE_PRODUCT] : [],
|
|
433
|
+
...spriteKit ? [SPRITEKIT_PRODUCT] : []
|
|
427
434
|
],
|
|
428
435
|
...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`)
|
|
429
436
|
].join(", ");
|
|
@@ -661,6 +668,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
661
668
|
manifest = manifest.replace(product, `${product}
|
|
662
669
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
663
670
|
}
|
|
671
|
+
if (importsSpriteKit(input.files)) {
|
|
672
|
+
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
673
|
+
if (!manifest.includes(anchor))
|
|
674
|
+
throw new Error(
|
|
675
|
+
"scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
|
|
676
|
+
);
|
|
677
|
+
manifest = manifest.replace(anchor, `${anchor}
|
|
678
|
+
${SPRITEKIT_PRODUCT},`);
|
|
679
|
+
}
|
|
664
680
|
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
665
681
|
} else {
|
|
666
682
|
const base = layout.multi ? layout.root : layout.sources;
|
|
@@ -689,6 +705,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
689
705
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
690
706
|
moduleRoot,
|
|
691
707
|
oneModule: input.oneModule,
|
|
708
|
+
spriteKit: importsSpriteKit(input.files),
|
|
692
709
|
distribution: distribution ?? void 0
|
|
693
710
|
}) + moduleFiles
|
|
694
711
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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";
|
|
@@ -333,9 +333,15 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
333
333
|
return siblings;
|
|
334
334
|
}
|
|
335
335
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
336
|
+
var SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
|
|
337
|
+
var importsSpriteKit = (files) => Object.entries(files).some(
|
|
338
|
+
([file, contents]) => file.endsWith(".swift") && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?SpriteKit\b/m.test(
|
|
339
|
+
contents
|
|
340
|
+
)
|
|
341
|
+
);
|
|
336
342
|
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
337
343
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
338
|
-
var MULTI_MANIFEST_VERSION =
|
|
344
|
+
var MULTI_MANIFEST_VERSION = 7;
|
|
339
345
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
340
346
|
const hash = createHash2("sha256");
|
|
341
347
|
hash.update(`swift-compile/v7
|
|
@@ -376,7 +382,7 @@ ${release}
|
|
|
376
382
|
return hash.digest("hex");
|
|
377
383
|
}
|
|
378
384
|
function emitSwiftPackageManifest(args) {
|
|
379
|
-
const { targets, siblings, moduleRoot, oneModule, distribution } = args;
|
|
385
|
+
const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
|
|
380
386
|
const executable = targets.find((target) => target.executable);
|
|
381
387
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
382
388
|
const stanza = (target) => {
|
|
@@ -386,7 +392,8 @@ function emitSwiftPackageManifest(args) {
|
|
|
386
392
|
const deps = [
|
|
387
393
|
...distribution ? [] : [
|
|
388
394
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
389
|
-
...oneModule ? [ONE_PRODUCT] : []
|
|
395
|
+
...oneModule ? [ONE_PRODUCT] : [],
|
|
396
|
+
...spriteKit ? [SPRITEKIT_PRODUCT] : []
|
|
390
397
|
],
|
|
391
398
|
...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`)
|
|
392
399
|
].join(", ");
|
|
@@ -624,6 +631,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
624
631
|
manifest = manifest.replace(product, `${product}
|
|
625
632
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
626
633
|
}
|
|
634
|
+
if (importsSpriteKit(input.files)) {
|
|
635
|
+
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
636
|
+
if (!manifest.includes(anchor))
|
|
637
|
+
throw new Error(
|
|
638
|
+
"scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
|
|
639
|
+
);
|
|
640
|
+
manifest = manifest.replace(anchor, `${anchor}
|
|
641
|
+
${SPRITEKIT_PRODUCT},`);
|
|
642
|
+
}
|
|
627
643
|
files.set(path2.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
628
644
|
} else {
|
|
629
645
|
const base = layout.multi ? layout.root : layout.sources;
|
|
@@ -652,6 +668,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
652
668
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
653
669
|
moduleRoot,
|
|
654
670
|
oneModule: input.oneModule,
|
|
671
|
+
spriteKit: importsSpriteKit(input.files),
|
|
655
672
|
distribution: distribution ?? void 0
|
|
656
673
|
}) + moduleFiles
|
|
657
674
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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.682 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -51,7 +51,7 @@ var MAX_SWIFT_COMPILE_RESOURCE_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
51
51
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
52
52
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
53
53
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
54
|
-
var SWIFT_HOST_ABI =
|
|
54
|
+
var SWIFT_HOST_ABI = 5;
|
|
55
55
|
var POLL_INTERVAL_MS = 1500;
|
|
56
56
|
function swiftNativeEntry(native, file) {
|
|
57
57
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-submit.ts
|
|
4
4
|
var SWIFT_COMPILE_PATH = "/api/swift-compile";
|
|
@@ -12,7 +12,7 @@ var MAX_SWIFT_COMPILE_RESOURCE_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
12
12
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
13
13
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
14
14
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
15
|
-
var SWIFT_HOST_ABI =
|
|
15
|
+
var SWIFT_HOST_ABI = 5;
|
|
16
16
|
var POLL_INTERVAL_MS = 1500;
|
|
17
17
|
function swiftNativeEntry(native, file) {
|
|
18
18
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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.682 | (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.682 | (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;
|
|
@@ -420,9 +420,15 @@ function swiftSiblingDependencies(files, targets) {
|
|
|
420
420
|
return siblings;
|
|
421
421
|
}
|
|
422
422
|
var ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")';
|
|
423
|
+
var SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")';
|
|
424
|
+
var importsSpriteKit = (files) => Object.entries(files).some(
|
|
425
|
+
([file, contents]) => file.endsWith(".swift") && /^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?SpriteKit\b/m.test(
|
|
426
|
+
contents
|
|
427
|
+
)
|
|
428
|
+
);
|
|
423
429
|
var OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "PeachObjC"';
|
|
424
430
|
var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"';
|
|
425
|
-
var MULTI_MANIFEST_VERSION =
|
|
431
|
+
var MULTI_MANIFEST_VERSION = 7;
|
|
426
432
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
427
433
|
const hash = (0, import_node_crypto2.createHash)("sha256");
|
|
428
434
|
hash.update(`swift-compile/v7
|
|
@@ -463,7 +469,7 @@ ${release}
|
|
|
463
469
|
return hash.digest("hex");
|
|
464
470
|
}
|
|
465
471
|
function emitSwiftPackageManifest(args) {
|
|
466
|
-
const { targets, siblings, moduleRoot, oneModule, distribution } = args;
|
|
472
|
+
const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args;
|
|
467
473
|
const executable = targets.find((target) => target.executable);
|
|
468
474
|
if (!executable) throw new Error("swift-compile: no executable target to emit");
|
|
469
475
|
const stanza = (target) => {
|
|
@@ -473,7 +479,8 @@ function emitSwiftPackageManifest(args) {
|
|
|
473
479
|
const deps = [
|
|
474
480
|
...distribution ? [] : [
|
|
475
481
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
476
|
-
...oneModule ? [ONE_PRODUCT] : []
|
|
482
|
+
...oneModule ? [ONE_PRODUCT] : [],
|
|
483
|
+
...spriteKit ? [SPRITEKIT_PRODUCT] : []
|
|
477
484
|
],
|
|
478
485
|
...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`)
|
|
479
486
|
].join(", ");
|
|
@@ -711,6 +718,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
711
718
|
manifest = manifest.replace(product, `${product}
|
|
712
719
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
713
720
|
}
|
|
721
|
+
if (importsSpriteKit(input.files)) {
|
|
722
|
+
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),';
|
|
723
|
+
if (!manifest.includes(anchor))
|
|
724
|
+
throw new Error(
|
|
725
|
+
"scripts/contrast-app-Package.swift lost the line the SpriteKit product links at"
|
|
726
|
+
);
|
|
727
|
+
manifest = manifest.replace(anchor, `${anchor}
|
|
728
|
+
${SPRITEKIT_PRODUCT},`);
|
|
729
|
+
}
|
|
714
730
|
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
715
731
|
} else {
|
|
716
732
|
const base = layout.multi ? layout.root : layout.sources;
|
|
@@ -739,6 +755,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
739
755
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
740
756
|
moduleRoot,
|
|
741
757
|
oneModule: input.oneModule,
|
|
758
|
+
spriteKit: importsSpriteKit(input.files),
|
|
742
759
|
distribution: distribution ?? void 0
|
|
743
760
|
}) + moduleFiles
|
|
744
761
|
);
|
|
@@ -1591,7 +1608,7 @@ var MAX_SWIFT_COMPILE_RESOURCE_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
1591
1608
|
var MAX_SWIFT_COMPILE_IMAGES = 128;
|
|
1592
1609
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
1593
1610
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
1594
|
-
var SWIFT_HOST_ABI =
|
|
1611
|
+
var SWIFT_HOST_ABI = 5;
|
|
1595
1612
|
var POLL_INTERVAL_MS = 1500;
|
|
1596
1613
|
function swiftNativeEntry(native, file) {
|
|
1597
1614
|
return {
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.682 | (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
|
@@ -28,7 +28,6 @@ import https from 'https'
|
|
|
28
28
|
import { finished, pipeline } from 'stream/promises'
|
|
29
29
|
import { isLoopbackHost, normalizeHostname } from '../backend-origin.ts'
|
|
30
30
|
import {
|
|
31
|
-
FETCH_PROXY_BROWSER_USER_AGENT,
|
|
32
31
|
getFetchProxyTargetHeaders,
|
|
33
32
|
resolveFetchProxyTargetUrl,
|
|
34
33
|
} from './fetch-proxy-overrides.ts'
|
|
@@ -113,12 +112,7 @@ export function buildFetchProxyHeaders(
|
|
|
113
112
|
if (STRIP_FETCH_PROXY_HEADERS.has(key.toLowerCase())) continue
|
|
114
113
|
headers[key] = Array.isArray(value) ? value.join(', ') : value
|
|
115
114
|
}
|
|
116
|
-
Object.assign(
|
|
117
|
-
headers,
|
|
118
|
-
targetUrl
|
|
119
|
-
? getFetchProxyTargetHeaders(targetUrl)
|
|
120
|
-
: { 'user-agent': FETCH_PROXY_BROWSER_USER_AGENT },
|
|
121
|
-
)
|
|
115
|
+
Object.assign(headers, targetUrl ? getFetchProxyTargetHeaders(targetUrl) : {})
|
|
122
116
|
return headers
|
|
123
117
|
}
|
|
124
118
|
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
// shared upstream header policy for SootSim's CORS-bypassing fetch proxy.
|
|
2
2
|
// requests still forward tenant auth and app headers, but the proxy transport
|
|
3
|
-
// defaults to native-app semantics: no browser Origin
|
|
4
|
-
//
|
|
3
|
+
// defaults to native-app semantics: no browser Origin, Referer, Sec-Fetch-*,
|
|
4
|
+
// or User-Agent — an NSURLSession request on a real device sends none of
|
|
5
|
+
// those to a third-party host. web-backed mobile APIs that require a
|
|
6
|
+
// specific web origin or user-agent opt in below.
|
|
5
7
|
|
|
8
|
+
// only for a host override below that explicitly wants to look like a
|
|
9
|
+
// desktop browser (e.g. a web-backed API with no native-app allowance).
|
|
10
|
+
// never the proxy's default: a key-restricted upstream (address
|
|
11
|
+
// autocomplete, places lookups) sees this and a bare Origin/Referer the same
|
|
12
|
+
// way a real device's absent ones read — not a browser, not restricted.
|
|
6
13
|
export const FETCH_PROXY_BROWSER_USER_AGENT =
|
|
7
14
|
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 ' +
|
|
8
15
|
'(KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36'
|
|
@@ -10,7 +17,6 @@ export const FETCH_PROXY_BROWSER_USER_AGENT =
|
|
|
10
17
|
const HOST_HEADER_OVERRIDES: Array<{
|
|
11
18
|
hostSuffix: string
|
|
12
19
|
headers: Record<string, string>
|
|
13
|
-
suppressBrowserUserAgent?: boolean
|
|
14
20
|
}> = [
|
|
15
21
|
{
|
|
16
22
|
hostSuffix: 'uniswap.org',
|
|
@@ -18,16 +24,12 @@ const HOST_HEADER_OVERRIDES: Array<{
|
|
|
18
24
|
origin: 'https://app.uniswap.org',
|
|
19
25
|
referer: 'https://app.uniswap.org/',
|
|
20
26
|
},
|
|
21
|
-
// uniswap's native gateway accepts the app origin, but forcing a desktop
|
|
22
|
-
// browser ua on native api posts returns a bogus 414/tcp-stack response.
|
|
23
|
-
suppressBrowserUserAgent: true,
|
|
24
27
|
},
|
|
25
28
|
]
|
|
26
29
|
|
|
27
30
|
function headerOverridesFor(hostname: string):
|
|
28
31
|
| {
|
|
29
32
|
headers: Record<string, string>
|
|
30
|
-
suppressBrowserUserAgent?: boolean
|
|
31
33
|
}
|
|
32
34
|
| undefined {
|
|
33
35
|
const host = hostname.toLowerCase()
|
|
@@ -84,9 +86,6 @@ export function getFetchProxyTargetHeaders(targetUrl: URL): Record<string, strin
|
|
|
84
86
|
const hostOverrides = headerOverridesFor(targetUrl.hostname)
|
|
85
87
|
return {
|
|
86
88
|
'accept-encoding': 'identity',
|
|
87
|
-
...(hostOverrides?.suppressBrowserUserAgent
|
|
88
|
-
? {}
|
|
89
|
-
: { 'user-agent': FETCH_PROXY_BROWSER_USER_AGENT }),
|
|
90
89
|
...hostOverrides?.headers,
|
|
91
90
|
}
|
|
92
91
|
}
|
package/src/swift-compile.ts
CHANGED
|
@@ -237,6 +237,17 @@ function swiftSiblingDependencies(
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
const ONE_PRODUCT = '.product(name: "One", package: "sootsim-swift")'
|
|
240
|
+
const SPRITEKIT_PRODUCT = '.product(name: "SpriteKit", package: "sootsim-swift")'
|
|
241
|
+
// SpriteKit is an optional family (plans/peach/spritekit.md): it links only
|
|
242
|
+
// into an app whose sources import it, so no other artifact carries it.
|
|
243
|
+
const importsSpriteKit = (files: Record<string, string>): boolean =>
|
|
244
|
+
Object.entries(files).some(
|
|
245
|
+
([file, contents]) =>
|
|
246
|
+
file.endsWith('.swift') &&
|
|
247
|
+
/^\s*(?:@\w+(?:\([^)]*\))?\s+)*import\s+(?:(?:typealias|struct|class|enum|protocol|let|var|func)\s+)?SpriteKit\b/m.test(
|
|
248
|
+
contents,
|
|
249
|
+
),
|
|
250
|
+
)
|
|
240
251
|
// every iOS source sees the ObjectiveC module's selectors through Foundation;
|
|
241
252
|
// PeachObjC stands in for it, so a source that imports only Foundation still
|
|
242
253
|
// compiles `@objc` and `#selector`. scripts/contrast-app-Package.swift and
|
|
@@ -245,7 +256,7 @@ const OBJC_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "Pe
|
|
|
245
256
|
const ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"'
|
|
246
257
|
|
|
247
258
|
/** bump with any change to the emitted multi-target manifest text. */
|
|
248
|
-
export const MULTI_MANIFEST_VERSION =
|
|
259
|
+
export const MULTI_MANIFEST_VERSION = 7
|
|
249
260
|
|
|
250
261
|
export function swiftArtifactHash(
|
|
251
262
|
input: SwiftCompileInput,
|
|
@@ -299,10 +310,11 @@ export function emitSwiftPackageManifest(args: {
|
|
|
299
310
|
siblings: Map<string, string[]>
|
|
300
311
|
moduleRoot: string
|
|
301
312
|
oneModule?: boolean
|
|
313
|
+
spriteKit?: boolean
|
|
302
314
|
/** link the prebuilt distribution at moduleRoot instead of its sources. */
|
|
303
315
|
distribution?: SwiftDistributionManifest
|
|
304
316
|
}): string {
|
|
305
|
-
const { targets, siblings, moduleRoot, oneModule, distribution } = args
|
|
317
|
+
const { targets, siblings, moduleRoot, oneModule, spriteKit, distribution } = args
|
|
306
318
|
const executable = targets.find((target) => target.executable)
|
|
307
319
|
if (!executable) throw new Error('swift-compile: no executable target to emit')
|
|
308
320
|
// each target compiles in the language mode and default isolation its
|
|
@@ -329,6 +341,7 @@ export function emitSwiftPackageManifest(args: {
|
|
|
329
341
|
: [
|
|
330
342
|
'.product(name: "SwiftUI", package: "sootsim-swift")',
|
|
331
343
|
...(oneModule ? [ONE_PRODUCT] : []),
|
|
344
|
+
...(spriteKit ? [SPRITEKIT_PRODUCT] : []),
|
|
332
345
|
]),
|
|
333
346
|
...(siblings.get(target.name) ?? []).map((sibling) => `"${sibling}"`),
|
|
334
347
|
].join(', ')
|
|
@@ -642,6 +655,14 @@ export function writeSwiftProject(
|
|
|
642
655
|
.replace(product, `${product}\n ${ONE_PRODUCT},`)
|
|
643
656
|
.replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`)
|
|
644
657
|
}
|
|
658
|
+
if (importsSpriteKit(input.files)) {
|
|
659
|
+
const anchor = '.product(name: "CoreLocation", package: "sootsim-swift"),'
|
|
660
|
+
if (!manifest.includes(anchor))
|
|
661
|
+
throw new Error(
|
|
662
|
+
'scripts/contrast-app-Package.swift lost the line the SpriteKit product links at',
|
|
663
|
+
)
|
|
664
|
+
manifest = manifest.replace(anchor, `${anchor}\n ${SPRITEKIT_PRODUCT},`)
|
|
665
|
+
}
|
|
645
666
|
files.set(path.join(layout.root, 'Package.swift'), manifest + moduleFiles)
|
|
646
667
|
} else {
|
|
647
668
|
const base = layout.multi ? layout.root : layout.sources
|
|
@@ -673,6 +694,7 @@ export function writeSwiftProject(
|
|
|
673
694
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
674
695
|
moduleRoot,
|
|
675
696
|
oneModule: input.oneModule,
|
|
697
|
+
spriteKit: importsSpriteKit(input.files),
|
|
676
698
|
distribution: distribution ?? undefined,
|
|
677
699
|
}) + moduleFiles,
|
|
678
700
|
)
|
package/src/swift-submit.ts
CHANGED
|
@@ -47,8 +47,10 @@ export const MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024
|
|
|
47
47
|
* 3: the host provides `rnx.measure_text`, UIKitCore's synchronous text
|
|
48
48
|
* measure (`packages/sootsim-swift/src/mount.tsx`).
|
|
49
49
|
* 4: the host handles Network path observations and cancellation.
|
|
50
|
+
* 5: the mount lowers SpriteKit's `SpriteKitView` draw list and sends it raw
|
|
51
|
+
* touches (`packages/sootsim-swift/src/spritekit.tsx`).
|
|
50
52
|
*/
|
|
51
|
-
export const SWIFT_HOST_ABI =
|
|
53
|
+
export const SWIFT_HOST_ABI = 5
|
|
52
54
|
|
|
53
55
|
export interface SwiftImageUpload {
|
|
54
56
|
/** the raster file picked for the asset (has the extension). */
|