peachsim 0.1.2110 → 0.1.2112
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/cli/commands/inspect.ts +8 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.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/bundle-channel.cjs +17 -10
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +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/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +300 -292
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +16 -9
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- 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/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.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 +17 -10
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- 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 +5 -3
- package/dist-lib/vite.cjs +3 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +2 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarButtonItemAppearance.h +1 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBlurEffect.h +2 -44
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImage.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +4 -3
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffect.h +2 -1
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +67 -0
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Modules/module.modulemap +2 -0
- package/src/swift-objc-compile.ts +3 -0
- package/src/turbo-compile.ts +14 -1
- package/src/turbo-source.ts +6 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2112 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1176,7 +1176,7 @@ var import_node_crypto42 = require("node:crypto");
|
|
|
1176
1176
|
var import_node_fs82 = __toESM(require("node:fs"), 1);
|
|
1177
1177
|
var import_node_module8 = require("node:module");
|
|
1178
1178
|
var import_node_os17 = __toESM(require("node:os"), 1);
|
|
1179
|
-
var
|
|
1179
|
+
var import_node_path80 = __toESM(require("node:path"), 1);
|
|
1180
1180
|
var import_node_url6 = require("node:url");
|
|
1181
1181
|
var import_node_util15 = require("node:util");
|
|
1182
1182
|
|
|
@@ -2980,17 +2980,17 @@ function visit(node, visitor) {
|
|
|
2980
2980
|
visit.BREAK = BREAK;
|
|
2981
2981
|
visit.SKIP = SKIP;
|
|
2982
2982
|
visit.REMOVE = REMOVE;
|
|
2983
|
-
function visit_(key2, node, visitor,
|
|
2984
|
-
const ctrl = callVisitor(key2, node, visitor,
|
|
2983
|
+
function visit_(key2, node, visitor, path70) {
|
|
2984
|
+
const ctrl = callVisitor(key2, node, visitor, path70);
|
|
2985
2985
|
if (isNode(ctrl) || isPair(ctrl)) {
|
|
2986
|
-
replaceNode(key2,
|
|
2987
|
-
return visit_(key2, ctrl, visitor,
|
|
2986
|
+
replaceNode(key2, path70, ctrl);
|
|
2987
|
+
return visit_(key2, ctrl, visitor, path70);
|
|
2988
2988
|
}
|
|
2989
2989
|
if (typeof ctrl !== "symbol") {
|
|
2990
2990
|
if (isCollection(node)) {
|
|
2991
|
-
|
|
2991
|
+
path70 = Object.freeze(path70.concat(node));
|
|
2992
2992
|
for (let i = 0; i < node.items.length; ++i) {
|
|
2993
|
-
const ci = visit_(i, node.items[i], visitor,
|
|
2993
|
+
const ci = visit_(i, node.items[i], visitor, path70);
|
|
2994
2994
|
if (typeof ci === "number")
|
|
2995
2995
|
i = ci - 1;
|
|
2996
2996
|
else if (ci === BREAK)
|
|
@@ -3001,13 +3001,13 @@ function visit_(key2, node, visitor, path69) {
|
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
3003
|
} else if (isPair(node)) {
|
|
3004
|
-
|
|
3005
|
-
const ck = visit_("key", node.key, visitor,
|
|
3004
|
+
path70 = Object.freeze(path70.concat(node));
|
|
3005
|
+
const ck = visit_("key", node.key, visitor, path70);
|
|
3006
3006
|
if (ck === BREAK)
|
|
3007
3007
|
return BREAK;
|
|
3008
3008
|
else if (ck === REMOVE)
|
|
3009
3009
|
node.key = null;
|
|
3010
|
-
const cv = visit_("value", node.value, visitor,
|
|
3010
|
+
const cv = visit_("value", node.value, visitor, path70);
|
|
3011
3011
|
if (cv === BREAK)
|
|
3012
3012
|
return BREAK;
|
|
3013
3013
|
else if (cv === REMOVE)
|
|
@@ -3028,17 +3028,17 @@ async function visitAsync(node, visitor) {
|
|
|
3028
3028
|
visitAsync.BREAK = BREAK;
|
|
3029
3029
|
visitAsync.SKIP = SKIP;
|
|
3030
3030
|
visitAsync.REMOVE = REMOVE;
|
|
3031
|
-
async function visitAsync_(key2, node, visitor,
|
|
3032
|
-
const ctrl = await callVisitor(key2, node, visitor,
|
|
3031
|
+
async function visitAsync_(key2, node, visitor, path70) {
|
|
3032
|
+
const ctrl = await callVisitor(key2, node, visitor, path70);
|
|
3033
3033
|
if (isNode(ctrl) || isPair(ctrl)) {
|
|
3034
|
-
replaceNode(key2,
|
|
3035
|
-
return visitAsync_(key2, ctrl, visitor,
|
|
3034
|
+
replaceNode(key2, path70, ctrl);
|
|
3035
|
+
return visitAsync_(key2, ctrl, visitor, path70);
|
|
3036
3036
|
}
|
|
3037
3037
|
if (typeof ctrl !== "symbol") {
|
|
3038
3038
|
if (isCollection(node)) {
|
|
3039
|
-
|
|
3039
|
+
path70 = Object.freeze(path70.concat(node));
|
|
3040
3040
|
for (let i = 0; i < node.items.length; ++i) {
|
|
3041
|
-
const ci = await visitAsync_(i, node.items[i], visitor,
|
|
3041
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path70);
|
|
3042
3042
|
if (typeof ci === "number")
|
|
3043
3043
|
i = ci - 1;
|
|
3044
3044
|
else if (ci === BREAK)
|
|
@@ -3049,13 +3049,13 @@ async function visitAsync_(key2, node, visitor, path69) {
|
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
3051
|
} else if (isPair(node)) {
|
|
3052
|
-
|
|
3053
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
3052
|
+
path70 = Object.freeze(path70.concat(node));
|
|
3053
|
+
const ck = await visitAsync_("key", node.key, visitor, path70);
|
|
3054
3054
|
if (ck === BREAK)
|
|
3055
3055
|
return BREAK;
|
|
3056
3056
|
else if (ck === REMOVE)
|
|
3057
3057
|
node.key = null;
|
|
3058
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
3058
|
+
const cv = await visitAsync_("value", node.value, visitor, path70);
|
|
3059
3059
|
if (cv === BREAK)
|
|
3060
3060
|
return BREAK;
|
|
3061
3061
|
else if (cv === REMOVE)
|
|
@@ -3082,23 +3082,23 @@ function initVisitor(visitor) {
|
|
|
3082
3082
|
}
|
|
3083
3083
|
return visitor;
|
|
3084
3084
|
}
|
|
3085
|
-
function callVisitor(key2, node, visitor,
|
|
3085
|
+
function callVisitor(key2, node, visitor, path70) {
|
|
3086
3086
|
if (typeof visitor === "function")
|
|
3087
|
-
return visitor(key2, node,
|
|
3087
|
+
return visitor(key2, node, path70);
|
|
3088
3088
|
if (isMap(node))
|
|
3089
|
-
return visitor.Map?.(key2, node,
|
|
3089
|
+
return visitor.Map?.(key2, node, path70);
|
|
3090
3090
|
if (isSeq(node))
|
|
3091
|
-
return visitor.Seq?.(key2, node,
|
|
3091
|
+
return visitor.Seq?.(key2, node, path70);
|
|
3092
3092
|
if (isPair(node))
|
|
3093
|
-
return visitor.Pair?.(key2, node,
|
|
3093
|
+
return visitor.Pair?.(key2, node, path70);
|
|
3094
3094
|
if (isScalar(node))
|
|
3095
|
-
return visitor.Scalar?.(key2, node,
|
|
3095
|
+
return visitor.Scalar?.(key2, node, path70);
|
|
3096
3096
|
if (isAlias(node))
|
|
3097
|
-
return visitor.Alias?.(key2, node,
|
|
3097
|
+
return visitor.Alias?.(key2, node, path70);
|
|
3098
3098
|
return void 0;
|
|
3099
3099
|
}
|
|
3100
|
-
function replaceNode(key2,
|
|
3101
|
-
const parent =
|
|
3100
|
+
function replaceNode(key2, path70, node) {
|
|
3101
|
+
const parent = path70[path70.length - 1];
|
|
3102
3102
|
if (isCollection(parent)) {
|
|
3103
3103
|
parent.items[key2] = node;
|
|
3104
3104
|
} else if (isPair(parent)) {
|
|
@@ -3597,10 +3597,10 @@ function createNode(value, tagName, ctx) {
|
|
|
3597
3597
|
}
|
|
3598
3598
|
|
|
3599
3599
|
// ../../node_modules/yaml/browser/dist/nodes/Collection.js
|
|
3600
|
-
function collectionFromPath(schema4,
|
|
3600
|
+
function collectionFromPath(schema4, path70, value) {
|
|
3601
3601
|
let v6 = value;
|
|
3602
|
-
for (let i =
|
|
3603
|
-
const k =
|
|
3602
|
+
for (let i = path70.length - 1; i >= 0; --i) {
|
|
3603
|
+
const k = path70[i];
|
|
3604
3604
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
3605
3605
|
const a = [];
|
|
3606
3606
|
a[k] = v6;
|
|
@@ -3619,7 +3619,7 @@ function collectionFromPath(schema4, path69, value) {
|
|
|
3619
3619
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
3620
3620
|
});
|
|
3621
3621
|
}
|
|
3622
|
-
var isEmptyPath = (
|
|
3622
|
+
var isEmptyPath = (path70) => path70 == null || typeof path70 === "object" && !!path70[Symbol.iterator]().next().done;
|
|
3623
3623
|
var Collection = class extends NodeBase {
|
|
3624
3624
|
constructor(type, schema4) {
|
|
3625
3625
|
super(type);
|
|
@@ -3649,11 +3649,11 @@ var Collection = class extends NodeBase {
|
|
|
3649
3649
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
3650
3650
|
* that already exists in the map.
|
|
3651
3651
|
*/
|
|
3652
|
-
addIn(
|
|
3653
|
-
if (isEmptyPath(
|
|
3652
|
+
addIn(path70, value) {
|
|
3653
|
+
if (isEmptyPath(path70))
|
|
3654
3654
|
this.add(value);
|
|
3655
3655
|
else {
|
|
3656
|
-
const [key2, ...rest] =
|
|
3656
|
+
const [key2, ...rest] = path70;
|
|
3657
3657
|
const node = this.get(key2, true);
|
|
3658
3658
|
if (isCollection(node))
|
|
3659
3659
|
node.addIn(rest, value);
|
|
@@ -3667,8 +3667,8 @@ var Collection = class extends NodeBase {
|
|
|
3667
3667
|
* Removes a value from the collection.
|
|
3668
3668
|
* @returns `true` if the item was found and removed.
|
|
3669
3669
|
*/
|
|
3670
|
-
deleteIn(
|
|
3671
|
-
const [key2, ...rest] =
|
|
3670
|
+
deleteIn(path70) {
|
|
3671
|
+
const [key2, ...rest] = path70;
|
|
3672
3672
|
if (rest.length === 0)
|
|
3673
3673
|
return this.delete(key2);
|
|
3674
3674
|
const node = this.get(key2, true);
|
|
@@ -3682,8 +3682,8 @@ var Collection = class extends NodeBase {
|
|
|
3682
3682
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
3683
3683
|
* `true` (collections are always returned intact).
|
|
3684
3684
|
*/
|
|
3685
|
-
getIn(
|
|
3686
|
-
const [key2, ...rest] =
|
|
3685
|
+
getIn(path70, keepScalar) {
|
|
3686
|
+
const [key2, ...rest] = path70;
|
|
3687
3687
|
const node = this.get(key2, true);
|
|
3688
3688
|
if (rest.length === 0)
|
|
3689
3689
|
return !keepScalar && isScalar(node) ? node.value : node;
|
|
@@ -3701,8 +3701,8 @@ var Collection = class extends NodeBase {
|
|
|
3701
3701
|
/**
|
|
3702
3702
|
* Checks if the collection includes a value with the key `key`.
|
|
3703
3703
|
*/
|
|
3704
|
-
hasIn(
|
|
3705
|
-
const [key2, ...rest] =
|
|
3704
|
+
hasIn(path70) {
|
|
3705
|
+
const [key2, ...rest] = path70;
|
|
3706
3706
|
if (rest.length === 0)
|
|
3707
3707
|
return this.has(key2);
|
|
3708
3708
|
const node = this.get(key2, true);
|
|
@@ -3712,8 +3712,8 @@ var Collection = class extends NodeBase {
|
|
|
3712
3712
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
3713
3713
|
* boolean to add/remove the item from the set.
|
|
3714
3714
|
*/
|
|
3715
|
-
setIn(
|
|
3716
|
-
const [key2, ...rest] =
|
|
3715
|
+
setIn(path70, value) {
|
|
3716
|
+
const [key2, ...rest] = path70;
|
|
3717
3717
|
if (rest.length === 0) {
|
|
3718
3718
|
this.set(key2, value);
|
|
3719
3719
|
} else {
|
|
@@ -5302,9 +5302,9 @@ function visit2(cst, visitor) {
|
|
|
5302
5302
|
visit2.BREAK = BREAK2;
|
|
5303
5303
|
visit2.SKIP = SKIP2;
|
|
5304
5304
|
visit2.REMOVE = REMOVE2;
|
|
5305
|
-
visit2.itemAtPath = (cst,
|
|
5305
|
+
visit2.itemAtPath = (cst, path70) => {
|
|
5306
5306
|
let item = cst;
|
|
5307
|
-
for (const [field, index] of
|
|
5307
|
+
for (const [field, index] of path70) {
|
|
5308
5308
|
const tok = item?.[field];
|
|
5309
5309
|
if (tok && "items" in tok) {
|
|
5310
5310
|
item = tok.items[index];
|
|
@@ -5313,23 +5313,23 @@ visit2.itemAtPath = (cst, path69) => {
|
|
|
5313
5313
|
}
|
|
5314
5314
|
return item;
|
|
5315
5315
|
};
|
|
5316
|
-
visit2.parentCollection = (cst,
|
|
5317
|
-
const parent = visit2.itemAtPath(cst,
|
|
5318
|
-
const field =
|
|
5316
|
+
visit2.parentCollection = (cst, path70) => {
|
|
5317
|
+
const parent = visit2.itemAtPath(cst, path70.slice(0, -1));
|
|
5318
|
+
const field = path70[path70.length - 1][0];
|
|
5319
5319
|
const coll = parent?.[field];
|
|
5320
5320
|
if (coll && "items" in coll)
|
|
5321
5321
|
return coll;
|
|
5322
5322
|
throw new Error("Parent collection not found");
|
|
5323
5323
|
};
|
|
5324
|
-
function _visit(
|
|
5325
|
-
let ctrl = visitor(item,
|
|
5324
|
+
function _visit(path70, item, visitor) {
|
|
5325
|
+
let ctrl = visitor(item, path70);
|
|
5326
5326
|
if (typeof ctrl === "symbol")
|
|
5327
5327
|
return ctrl;
|
|
5328
5328
|
for (const field of ["key", "value"]) {
|
|
5329
5329
|
const token = item[field];
|
|
5330
5330
|
if (token && "items" in token) {
|
|
5331
5331
|
for (let i = 0; i < token.items.length; ++i) {
|
|
5332
|
-
const ci = _visit(Object.freeze(
|
|
5332
|
+
const ci = _visit(Object.freeze(path70.concat([[field, i]])), token.items[i], visitor);
|
|
5333
5333
|
if (typeof ci === "number")
|
|
5334
5334
|
i = ci - 1;
|
|
5335
5335
|
else if (ci === BREAK2)
|
|
@@ -5340,10 +5340,10 @@ function _visit(path69, item, visitor) {
|
|
|
5340
5340
|
}
|
|
5341
5341
|
}
|
|
5342
5342
|
if (typeof ctrl === "function" && field === "key")
|
|
5343
|
-
ctrl = ctrl(item,
|
|
5343
|
+
ctrl = ctrl(item, path70);
|
|
5344
5344
|
}
|
|
5345
5345
|
}
|
|
5346
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
5346
|
+
return typeof ctrl === "function" ? ctrl(item, path70) : ctrl;
|
|
5347
5347
|
}
|
|
5348
5348
|
|
|
5349
5349
|
// ../../node_modules/yaml/browser/dist/parse/lexer.js
|
|
@@ -5466,8 +5466,8 @@ function metadataValue(value, key2) {
|
|
|
5466
5466
|
if (!value || typeof value !== "object") return void 0;
|
|
5467
5467
|
return Object.getOwnPropertyDescriptor(value, key2)?.value;
|
|
5468
5468
|
}
|
|
5469
|
-
function readProjectJson(
|
|
5470
|
-
const text6 = readProjectMetadata(
|
|
5469
|
+
function readProjectJson(path70, files2 = nodeRepoFileReader) {
|
|
5470
|
+
const text6 = readProjectMetadata(path70, files2);
|
|
5471
5471
|
if (text6 === null) return null;
|
|
5472
5472
|
try {
|
|
5473
5473
|
const value = JSON.parse(text6);
|
|
@@ -6022,7 +6022,7 @@ function scanLocalNative(appDir, pkg, answered2, platform, knownPackages = /* @_
|
|
|
6022
6022
|
expoModule: moduleDir ? (0, import_node_path8.relative)(appDir, moduleDir) || "." : null,
|
|
6023
6023
|
optional: optional3,
|
|
6024
6024
|
swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
|
|
6025
|
-
(
|
|
6025
|
+
(path70) => path70.endsWith(".swift") && [...(readSmallFile(path70) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
|
|
6026
6026
|
(match) => match[1] === name3
|
|
6027
6027
|
)
|
|
6028
6028
|
) : false,
|
|
@@ -7873,8 +7873,8 @@ export *
|
|
|
7873
7873
|
}`;
|
|
7874
7874
|
}
|
|
7875
7875
|
function swiftPackageIdentity(url) {
|
|
7876
|
-
const
|
|
7877
|
-
return (
|
|
7876
|
+
const path70 = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
7877
|
+
return (path70.split("/").pop() ?? path70).replace(/\.git$/, "").toLowerCase();
|
|
7878
7878
|
}
|
|
7879
7879
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
7880
7880
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
@@ -8421,8 +8421,8 @@ var import_node_fs23 = require("node:fs");
|
|
|
8421
8421
|
var import_node_path19 = require("node:path");
|
|
8422
8422
|
var Refusal = class extends Error {
|
|
8423
8423
|
};
|
|
8424
|
-
var refuse = (
|
|
8425
|
-
throw new Refusal(`Generated asset symbols are unproven for ${
|
|
8424
|
+
var refuse = (path70, reason) => {
|
|
8425
|
+
throw new Refusal(`Generated asset symbols are unproven for ${path70}: ${reason}`);
|
|
8426
8426
|
};
|
|
8427
8427
|
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8428
8428
|
var scope = (source) => ({
|
|
@@ -8710,14 +8710,14 @@ function addAsset(into, asset) {
|
|
|
8710
8710
|
function checkStack(dir, type, devices) {
|
|
8711
8711
|
const sets = (parent, allowed) => (0, import_node_fs23.readdirSync)(parent, { withFileTypes: true }).flatMap((entry) => {
|
|
8712
8712
|
if (entry.name.startsWith(".") || entry.isFile()) return [];
|
|
8713
|
-
const
|
|
8713
|
+
const path70 = (0, import_node_path19.join)(parent, entry.name);
|
|
8714
8714
|
const extension = (0, import_node_path19.extname)(entry.name);
|
|
8715
8715
|
if (!entry.isDirectory() || !allowed.includes(extension))
|
|
8716
8716
|
return refuse(
|
|
8717
|
-
|
|
8717
|
+
path70,
|
|
8718
8718
|
`image stack content other than ${allowed.join(", ")} is unproven`
|
|
8719
8719
|
);
|
|
8720
|
-
return [{ path:
|
|
8720
|
+
return [{ path: path70, extension }];
|
|
8721
8721
|
});
|
|
8722
8722
|
for (const layer of sets(dir, [`.${type}layer`, ".imageset", ".colorset"])) {
|
|
8723
8723
|
if (layer.extension !== `.${type}layer`) continue;
|
|
@@ -8729,37 +8729,37 @@ function checkStack(dir, type, devices) {
|
|
|
8729
8729
|
function walk(dir, into, devices, extensions) {
|
|
8730
8730
|
for (const entry of (0, import_node_fs23.readdirSync)(dir, { withFileTypes: true })) {
|
|
8731
8731
|
if (entry.name.startsWith(".") || entry.isFile()) continue;
|
|
8732
|
-
const
|
|
8733
|
-
if (!entry.isDirectory()) return refuse(
|
|
8732
|
+
const path70 = (0, import_node_path19.join)(dir, entry.name);
|
|
8733
|
+
if (!entry.isDirectory()) return refuse(path70, "it is neither a file nor a directory");
|
|
8734
8734
|
const extension = (0, import_node_path19.extname)(entry.name).slice(1);
|
|
8735
8735
|
const type = extension.toLowerCase();
|
|
8736
8736
|
const base = entry.name.slice(0, entry.name.length - extension.length - 1);
|
|
8737
8737
|
if (type !== extension && knownTypes.has(type))
|
|
8738
|
-
return refuse(
|
|
8738
|
+
return refuse(path70, "its type extension is not lowercase");
|
|
8739
8739
|
if (type === "colorset" || type === "imageset" || type === "symbolset") {
|
|
8740
8740
|
addAsset(into, {
|
|
8741
8741
|
kind: type === "colorset" ? "color" : "image",
|
|
8742
8742
|
name: base,
|
|
8743
|
-
...assetState(
|
|
8743
|
+
...assetState(path70, type, devices),
|
|
8744
8744
|
extensions,
|
|
8745
|
-
source:
|
|
8745
|
+
source: path70
|
|
8746
8746
|
});
|
|
8747
8747
|
continue;
|
|
8748
8748
|
}
|
|
8749
8749
|
if (silentTypes.has(type)) continue;
|
|
8750
8750
|
if (stackTypes.has(type)) {
|
|
8751
|
-
checkStack(
|
|
8751
|
+
checkStack(path70, type, devices);
|
|
8752
8752
|
continue;
|
|
8753
8753
|
}
|
|
8754
|
-
if (unprovenTypes.has(type)) return refuse(
|
|
8754
|
+
if (unprovenTypes.has(type)) return refuse(path70, `${type} assets are unproven`);
|
|
8755
8755
|
const name3 = type === "spriteatlas" ? base : entry.name;
|
|
8756
|
-
if (!folderProperties((0, import_node_path19.join)(
|
|
8757
|
-
walk(
|
|
8756
|
+
if (!folderProperties((0, import_node_path19.join)(path70, "Contents.json")).namespace) {
|
|
8757
|
+
walk(path70, into, devices, extensions);
|
|
8758
8758
|
continue;
|
|
8759
8759
|
}
|
|
8760
|
-
const child = into.namespaces.get(name3) ?? scope(
|
|
8760
|
+
const child = into.namespaces.get(name3) ?? scope(path70);
|
|
8761
8761
|
into.namespaces.set(name3, child);
|
|
8762
|
-
walk(
|
|
8762
|
+
walk(path70, child, devices, extensions);
|
|
8763
8763
|
}
|
|
8764
8764
|
}
|
|
8765
8765
|
var hasKind = (into, kind) => [...into.assets.values()].some((asset) => asset.kind === kind && asset.included) || [...into.namespaces.values()].some((child) => hasKind(child, kind));
|
|
@@ -8828,11 +8828,11 @@ function members(into, kind, prefix, extensions) {
|
|
|
8828
8828
|
const assets2 = /* @__PURE__ */ new Set();
|
|
8829
8829
|
const out = [];
|
|
8830
8830
|
for (const entry of entries) {
|
|
8831
|
-
const
|
|
8831
|
+
const path70 = `${prefix}${entry.name}`;
|
|
8832
8832
|
const source = entry.child ? entry.child.source : entry.asset.source;
|
|
8833
8833
|
if (Array.from(entry.name).some((char) => char.charCodeAt(0) > 127))
|
|
8834
8834
|
refuse(source, "its name is not ASCII");
|
|
8835
|
-
const named = (text7) => `The \\"${escape(
|
|
8835
|
+
const named = (text7) => `The \\"${escape(path70)}\\" ${text7}`;
|
|
8836
8836
|
if (entry.child) {
|
|
8837
8837
|
const text7 = symbol(entry.name, true);
|
|
8838
8838
|
if (!text7)
|
|
@@ -8855,9 +8855,9 @@ function members(into, kind, prefix, extensions) {
|
|
|
8855
8855
|
namespaces.add(text7);
|
|
8856
8856
|
out.push({
|
|
8857
8857
|
type: "namespace",
|
|
8858
|
-
path:
|
|
8858
|
+
path: path70,
|
|
8859
8859
|
symbol: spelled(text7),
|
|
8860
|
-
members: members(entry.child, kind, `${
|
|
8860
|
+
members: members(entry.child, kind, `${path70}/`, extensions)
|
|
8861
8861
|
});
|
|
8862
8862
|
}
|
|
8863
8863
|
continue;
|
|
@@ -8884,7 +8884,7 @@ function members(into, kind, prefix, extensions) {
|
|
|
8884
8884
|
else if (!omitted)
|
|
8885
8885
|
out.push({
|
|
8886
8886
|
type: "asset",
|
|
8887
|
-
path:
|
|
8887
|
+
path: path70,
|
|
8888
8888
|
name: entry.name,
|
|
8889
8889
|
symbol: spelled(text6),
|
|
8890
8890
|
thinnable: asset.thinnable,
|
|
@@ -9418,11 +9418,11 @@ function catalogDigest(directory2) {
|
|
|
9418
9418
|
for (const entry of (0, import_node_fs24.readdirSync)(dir, { withFileTypes: true }).sort(
|
|
9419
9419
|
(a, b) => a.name.localeCompare(b.name)
|
|
9420
9420
|
)) {
|
|
9421
|
-
const
|
|
9422
|
-
if (entry.isDirectory()) walk3(
|
|
9423
|
-
else if (entry.isFile() && (0, import_node_fs24.statSync)(
|
|
9424
|
-
hashes.push([(0, import_node_path20.relative)(directory2,
|
|
9425
|
-
else throw new Error(`Unsupported asset catalog entry: ${
|
|
9421
|
+
const path70 = (0, import_node_path20.join)(dir, entry.name);
|
|
9422
|
+
if (entry.isDirectory()) walk3(path70);
|
|
9423
|
+
else if (entry.isFile() && (0, import_node_fs24.statSync)(path70).size <= 64 * 1024 * 1024)
|
|
9424
|
+
hashes.push([(0, import_node_path20.relative)(directory2, path70), sha256((0, import_node_fs24.readFileSync)(path70))]);
|
|
9425
|
+
else throw new Error(`Unsupported asset catalog entry: ${path70}`);
|
|
9426
9426
|
}
|
|
9427
9427
|
};
|
|
9428
9428
|
walk3(directory2);
|
|
@@ -9434,7 +9434,7 @@ function symbolSource(plan, root) {
|
|
|
9434
9434
|
const known = symbolTexts.get(key2);
|
|
9435
9435
|
if (known !== void 0) return { status: "source", text: known };
|
|
9436
9436
|
const source = assetSymbolSource(
|
|
9437
|
-
plan.catalogs.map(({ path:
|
|
9437
|
+
plan.catalogs.map(({ path: path70 }) => (0, import_node_path20.join)(root, path70)),
|
|
9438
9438
|
plan.settings
|
|
9439
9439
|
);
|
|
9440
9440
|
if (source.status === "source") symbolTexts.set(key2, source.text);
|
|
@@ -9492,9 +9492,9 @@ function planAssetSymbols(resources, root, settings) {
|
|
|
9492
9492
|
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
|
|
9493
9493
|
);
|
|
9494
9494
|
const plan = {
|
|
9495
|
-
catalogs: catalogs.map((
|
|
9496
|
-
path:
|
|
9497
|
-
sha256: catalogDigest((0, import_node_path20.join)(root,
|
|
9495
|
+
catalogs: catalogs.map((path70) => ({
|
|
9496
|
+
path: path70,
|
|
9497
|
+
sha256: catalogDigest((0, import_node_path20.join)(root, path70))
|
|
9498
9498
|
})),
|
|
9499
9499
|
settings: { deployment: target, devices, extensions: extensions === "YES" }
|
|
9500
9500
|
};
|
|
@@ -12380,10 +12380,10 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
12380
12380
|
const enclosing = scopes.length > 0 ? scopes[scopes.length - 1].prefix : [];
|
|
12381
12381
|
if (scope2?.[3] === "enum" && opens > 0 && /(^|\s)(public|open)\s/.test(scope2[2] ?? "") && !/\bwhere\b/.test(first.masked) && first.masked[scope2.index + scope2[0].length] !== "<") {
|
|
12382
12382
|
const name3 = scope2[4];
|
|
12383
|
-
const
|
|
12384
|
-
if (!byPath.has(
|
|
12383
|
+
const path70 = scopeOf(name3, enclosing, false);
|
|
12384
|
+
if (!byPath.has(path70.join(".")) && (path70.length === 1 || byPath.has(path70.slice(0, -1).join(".")))) {
|
|
12385
12385
|
const keptAttrs = [...(scope2[1] ?? "").matchAll(/@\w+(?:\([^)]*\))?/g)].map((attr) => attr[0]).filter((attr) => !attr.startsWith("@objc"));
|
|
12386
|
-
const id = `s:peach-synthesized-${module2}-${
|
|
12386
|
+
const id = `s:peach-synthesized-${module2}-${path70.join(".")}`;
|
|
12387
12387
|
const body = [];
|
|
12388
12388
|
let inner = 1;
|
|
12389
12389
|
let closed = false;
|
|
@@ -12438,15 +12438,15 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
12438
12438
|
symbols.push({
|
|
12439
12439
|
kind: { identifier: "swift.enum" },
|
|
12440
12440
|
identifier: { precise: id },
|
|
12441
|
-
pathComponents:
|
|
12441
|
+
pathComponents: path70,
|
|
12442
12442
|
declarationFragments: fragments,
|
|
12443
12443
|
accessLevel: "public"
|
|
12444
12444
|
});
|
|
12445
|
-
if (
|
|
12445
|
+
if (path70.length > 1)
|
|
12446
12446
|
relationships.push({
|
|
12447
12447
|
kind: "memberOf",
|
|
12448
12448
|
source: id,
|
|
12449
|
-
target: byPath.get(
|
|
12449
|
+
target: byPath.get(path70.slice(0, -1).join("."))
|
|
12450
12450
|
});
|
|
12451
12451
|
for (const kase of cases) {
|
|
12452
12452
|
const memberId = `${id}-${kase.leaf}`;
|
|
@@ -12455,7 +12455,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
12455
12455
|
symbols.push({
|
|
12456
12456
|
kind: { identifier: "swift.enum.case" },
|
|
12457
12457
|
identifier: { precise: memberId },
|
|
12458
|
-
pathComponents: [...
|
|
12458
|
+
pathComponents: [...path70, kase.leaf],
|
|
12459
12459
|
declarationFragments: [
|
|
12460
12460
|
{ kind: "keyword", spelling: "case" },
|
|
12461
12461
|
{ kind: "text", spelling: " " },
|
|
@@ -12471,7 +12471,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
12471
12471
|
symbols.push({
|
|
12472
12472
|
kind: { identifier: "swift.init" },
|
|
12473
12473
|
identifier: { precise: initId },
|
|
12474
|
-
pathComponents: [...
|
|
12474
|
+
pathComponents: [...path70, "init(rawValue:)"],
|
|
12475
12475
|
declarationFragments: [
|
|
12476
12476
|
{ kind: "keyword", spelling: "init" },
|
|
12477
12477
|
{ kind: "text", spelling: "?(" },
|
|
@@ -12540,7 +12540,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
12540
12540
|
})
|
|
12541
12541
|
)
|
|
12542
12542
|
);
|
|
12543
|
-
const trap = (
|
|
12543
|
+
const trap = (path70) => `fatalError("${path70} is ${options.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
|
|
12544
12544
|
const skipped = [];
|
|
12545
12545
|
const behavior = options.behavior ?? /* @__PURE__ */ new Map();
|
|
12546
12546
|
const used = /* @__PURE__ */ new Set();
|
|
@@ -12890,34 +12890,34 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
12890
12890
|
lines.push(...physical);
|
|
12891
12891
|
owners.push(...physical.map(() => current2));
|
|
12892
12892
|
};
|
|
12893
|
-
const emitAt = (
|
|
12894
|
-
if (omit.has(
|
|
12893
|
+
const emitAt = (path70, line) => {
|
|
12894
|
+
if (omit.has(path70)) return;
|
|
12895
12895
|
const previous = current2;
|
|
12896
|
-
current2 =
|
|
12896
|
+
current2 = path70;
|
|
12897
12897
|
emit(line);
|
|
12898
12898
|
current2 = previous;
|
|
12899
12899
|
};
|
|
12900
12900
|
const emitInertState = (id, indent2, build) => {
|
|
12901
|
-
const
|
|
12901
|
+
const path70 = pathOf(byId.get(id));
|
|
12902
12902
|
emitAt(hiddenInit(id), `${indent2}init(_peachInert: Void) { ${build} }`);
|
|
12903
12903
|
const list2 = conforms.get(id) ?? [];
|
|
12904
12904
|
const has = (name3) => (children.get(id) ?? []).some((member) => leaf(member) === name3);
|
|
12905
12905
|
if (list2.includes("Encodable") && !has("encode(to:)"))
|
|
12906
12906
|
emitAt(
|
|
12907
|
-
`${
|
|
12907
|
+
`${path70}.encode(to:)`,
|
|
12908
12908
|
`${indent2}public func encode(to encoder: Encoder) throws {}`
|
|
12909
12909
|
);
|
|
12910
12910
|
if (list2.includes("Decodable") && !has("init(from:)"))
|
|
12911
12911
|
emitAt(
|
|
12912
|
-
`${
|
|
12912
|
+
`${path70}.init(from:)`,
|
|
12913
12913
|
`${indent2}public init(from decoder: Decoder) throws { self.init(_peachInert: ()) }`
|
|
12914
12914
|
);
|
|
12915
12915
|
};
|
|
12916
12916
|
const scoped = (body) => (symbol2, ...rest) => {
|
|
12917
|
-
const
|
|
12918
|
-
if (omit.has(
|
|
12917
|
+
const path70 = pathOf(symbol2);
|
|
12918
|
+
if (omit.has(path70)) return void skipped.push({ path: path70, reason: omit.get(path70) });
|
|
12919
12919
|
const previous = current2;
|
|
12920
|
-
current2 =
|
|
12920
|
+
current2 = path70;
|
|
12921
12921
|
try {
|
|
12922
12922
|
body(symbol2, ...rest);
|
|
12923
12923
|
} finally {
|
|
@@ -12949,7 +12949,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
12949
12949
|
};
|
|
12950
12950
|
const emitMember = scoped(
|
|
12951
12951
|
(member, indent2, context) => {
|
|
12952
|
-
const
|
|
12952
|
+
const path70 = pathOf(member);
|
|
12953
12953
|
if (TYPE_KINDS.has(member.kind.identifier)) {
|
|
12954
12954
|
const origin = origins.get(member.identifier.precise)?.split(".")[0];
|
|
12955
12955
|
const parent = owner.get(member.identifier.precise);
|
|
@@ -12966,7 +12966,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
12966
12966
|
))
|
|
12967
12967
|
return;
|
|
12968
12968
|
if (!MEMBER_KINDS.has(member.kind.identifier)) {
|
|
12969
|
-
skipped.push({ path:
|
|
12969
|
+
skipped.push({ path: path70, reason: `unhandled ${member.kind.identifier}` });
|
|
12970
12970
|
return;
|
|
12971
12971
|
}
|
|
12972
12972
|
const { 1: spelledAttrs, 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
@@ -12974,27 +12974,27 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
12974
12974
|
/@(\w+)(?:\([^)]*\))?\s*/g,
|
|
12975
12975
|
(attr, name3) => typeByPath.has(name3) ? "" : attr
|
|
12976
12976
|
) : spelledAttrs;
|
|
12977
|
-
const attrs = options.unobjc?.has(
|
|
12977
|
+
const attrs = options.unobjc?.has(path70) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
|
|
12978
12978
|
const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
|
|
12979
12979
|
rest
|
|
12980
12980
|
);
|
|
12981
12981
|
const flags = new Set(
|
|
12982
12982
|
modifiers[1].trim().split(/\s+/).filter(Boolean).map((flag) => flag.replace(/\(.*/, ""))
|
|
12983
12983
|
);
|
|
12984
|
-
const requiredInit = context.inClass && !!options.requiredInits?.has(
|
|
12985
|
-
const restatesRequired = context.inClass &&
|
|
12984
|
+
const requiredInit = context.inClass && !!options.requiredInits?.has(path70);
|
|
12985
|
+
const restatesRequired = context.inClass && path70.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
|
|
12986
12986
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
12987
12987
|
);
|
|
12988
12988
|
const required = context.inClass && (flags.has("required") || requiredInit || restatesRequired);
|
|
12989
12989
|
const final = context.inClass && flags.has("final") ? "final " : "";
|
|
12990
12990
|
const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
|
|
12991
12991
|
let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
|
|
12992
|
-
const override = context.inClass && !options.plain?.has(
|
|
12992
|
+
const override = context.inClass && !options.plain?.has(path70) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path70) || isObjC(member) && path70.endsWith(".init()")) ? "override " : "";
|
|
12993
12993
|
const head = `${indent2}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
|
|
12994
|
-
const measured = behavior.get(
|
|
12995
|
-
if (measured) used.add(
|
|
12994
|
+
const measured = behavior.get(path70);
|
|
12995
|
+
if (measured) used.add(path70);
|
|
12996
12996
|
const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
|
|
12997
|
-
const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(
|
|
12997
|
+
const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(path70));
|
|
12998
12998
|
switch (member.kind.identifier) {
|
|
12999
12999
|
case "swift.property":
|
|
13000
13000
|
case "swift.type.property":
|
|
@@ -13007,13 +13007,13 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13007
13007
|
const parameter = !measured && !options.inert && !settable && /:\s*some\s/.test(decl) ? opaqueParameter(member) : void 0;
|
|
13008
13008
|
const getter = parameter ? `return ({ () -> ${parameter} in ${body} })()` : body;
|
|
13009
13009
|
const computed = decl.replace(/^((?:static |class )*)let /, "$1var ");
|
|
13010
|
-
const wrapper = options.projections?.get(
|
|
13010
|
+
const wrapper = options.projections?.get(path70);
|
|
13011
13011
|
if (wrapper) {
|
|
13012
13012
|
const type = /^var\s+`?\w+`?\s*:\s*(.+)$/s.exec(computed)?.[1];
|
|
13013
|
-
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [
|
|
13013
|
+
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path70]);
|
|
13014
13014
|
if (!initial)
|
|
13015
13015
|
return void skipped.push({
|
|
13016
|
-
path:
|
|
13016
|
+
path: path70,
|
|
13017
13017
|
reason: `wrapped by ${wrapper} with no inert initial value`
|
|
13018
13018
|
});
|
|
13019
13019
|
const own = new RegExp(
|
|
@@ -13034,7 +13034,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13034
13034
|
return;
|
|
13035
13035
|
}
|
|
13036
13036
|
emit(
|
|
13037
|
-
`${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(
|
|
13037
|
+
`${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(path70))} }` : ""} }`
|
|
13038
13038
|
);
|
|
13039
13039
|
return;
|
|
13040
13040
|
}
|
|
@@ -13093,7 +13093,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13093
13093
|
};
|
|
13094
13094
|
const emitType = scoped(
|
|
13095
13095
|
(symbol2, indent2) => {
|
|
13096
|
-
const
|
|
13096
|
+
const path70 = pathOf(symbol2);
|
|
13097
13097
|
const id = symbol2.identifier.precise;
|
|
13098
13098
|
const inner = `${indent2} `;
|
|
13099
13099
|
switch (symbol2.kind.identifier) {
|
|
@@ -13110,10 +13110,10 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13110
13110
|
case "swift.class": {
|
|
13111
13111
|
const shape = header(symbol2, "class", indent2);
|
|
13112
13112
|
if (!shape)
|
|
13113
|
-
return void skipped.push({ path:
|
|
13114
|
-
const parent = options.superclasses?.get(
|
|
13113
|
+
return void skipped.push({ path: path70, reason: `unparsed class ${text(symbol2)}` });
|
|
13114
|
+
const parent = options.superclasses?.get(path70) ?? superclass.get(id);
|
|
13115
13115
|
const blocked = classBlocked(id);
|
|
13116
|
-
if (blocked) return void skipped.push({ path:
|
|
13116
|
+
if (blocked) return void skipped.push({ path: path70, reason: blocked });
|
|
13117
13117
|
const ancestors = /* @__PURE__ */ new Set();
|
|
13118
13118
|
const inherited = /* @__PURE__ */ new Set();
|
|
13119
13119
|
for (let at = superId.get(id); at; at = superId.get(at)) {
|
|
@@ -13136,9 +13136,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13136
13136
|
`${indent2}${shape.attrs}${objcName ? `@objc(${objcName}) ` : ""}${shape.final}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
|
|
13137
13137
|
);
|
|
13138
13138
|
const members2 = membersOf(id);
|
|
13139
|
-
const extra = options.behavior?.get(
|
|
13139
|
+
const extra = options.behavior?.get(path70)?.members;
|
|
13140
13140
|
if (extra) {
|
|
13141
|
-
used.add(
|
|
13141
|
+
used.add(path70);
|
|
13142
13142
|
emit(`${inner}${extra}`);
|
|
13143
13143
|
}
|
|
13144
13144
|
for (const member of members2)
|
|
@@ -13194,11 +13194,11 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13194
13194
|
if (protocol && member.kind.identifier === "swift.method" && leaf(member).endsWith("()") && have.has(`instance|leaf|${leaf(member).slice(0, -2)}`))
|
|
13195
13195
|
propertyWitnesses.push({
|
|
13196
13196
|
owner: current2,
|
|
13197
|
-
head: `extension ${pathOf(protocol)} where Self: ${
|
|
13197
|
+
head: `extension ${pathOf(protocol)} where Self: ${path70} {`,
|
|
13198
13198
|
member,
|
|
13199
|
-
path:
|
|
13199
|
+
path: path70
|
|
13200
13200
|
});
|
|
13201
|
-
else emitWitness(member, inner,
|
|
13201
|
+
else emitWitness(member, inner, path70, open && isObjC(member));
|
|
13202
13202
|
}
|
|
13203
13203
|
}
|
|
13204
13204
|
if (options.inert && designated2 && classBuild(id) === "hidden")
|
|
@@ -13206,13 +13206,13 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13206
13206
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
13207
13207
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
13208
13208
|
emit(
|
|
13209
|
-
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${
|
|
13209
|
+
`${inner}public required init?(coder: NSCoder) { ${options.inert ? "return nil" : trap(`${path70}.init(coder:)`)} }`
|
|
13210
13210
|
);
|
|
13211
13211
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
13212
13212
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
13213
13213
|
))
|
|
13214
13214
|
emit(
|
|
13215
|
-
`${inner}public required init() { ${options.inert ? superInit(id) : trap(`${
|
|
13215
|
+
`${inner}public required init() { ${options.inert ? superInit(id) : trap(`${path70}.init()`)} }`
|
|
13216
13216
|
);
|
|
13217
13217
|
emit(`${indent2}}`);
|
|
13218
13218
|
return;
|
|
@@ -13220,7 +13220,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13220
13220
|
case "swift.struct": {
|
|
13221
13221
|
const shape = header(symbol2, "struct", indent2);
|
|
13222
13222
|
if (!shape)
|
|
13223
|
-
return void skipped.push({ path:
|
|
13223
|
+
return void skipped.push({ path: path70, reason: `unparsed struct ${text(symbol2)}` });
|
|
13224
13224
|
const members2 = membersOf(id);
|
|
13225
13225
|
const raw2 = rawType(members2);
|
|
13226
13226
|
const list2 = inheritance(id);
|
|
@@ -13261,7 +13261,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13261
13261
|
emitInertState(
|
|
13262
13262
|
id,
|
|
13263
13263
|
inner,
|
|
13264
|
-
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [
|
|
13264
|
+
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path70]) ?? "0"}` : ""
|
|
13265
13265
|
);
|
|
13266
13266
|
emit(`${indent2}}`);
|
|
13267
13267
|
return;
|
|
@@ -13269,7 +13269,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13269
13269
|
case "swift.enum": {
|
|
13270
13270
|
const shape = header(symbol2, "enum", indent2);
|
|
13271
13271
|
if (!shape)
|
|
13272
|
-
return void skipped.push({ path:
|
|
13272
|
+
return void skipped.push({ path: path70, reason: `unparsed enum ${text(symbol2)}` });
|
|
13273
13273
|
const members2 = membersOf(id);
|
|
13274
13274
|
const cases = members2.filter(
|
|
13275
13275
|
(member) => member.kind.identifier === "swift.enum.case"
|
|
@@ -13279,7 +13279,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13279
13279
|
const missing = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
|
|
13280
13280
|
if (raw2 && (isObjC(symbol2) || /^c:@C?M@[^@]+@E@/.test(id)) && missing.length > 0)
|
|
13281
13281
|
return void skipped.push({
|
|
13282
|
-
path:
|
|
13282
|
+
path: path70,
|
|
13283
13283
|
reason: `no header value for ${missing.map(leaf).join(", ")}`
|
|
13284
13284
|
});
|
|
13285
13285
|
const list2 = inheritance(id, raw2 ?? void 0).filter(
|
|
@@ -13319,8 +13319,8 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13319
13319
|
});
|
|
13320
13320
|
}
|
|
13321
13321
|
if (options.inert) {
|
|
13322
|
-
const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(
|
|
13323
|
-
emitInertState(id, inner, value === null ? trap(
|
|
13322
|
+
const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(path70, /* @__PURE__ */ new Set(), []);
|
|
13323
|
+
emitInertState(id, inner, value === null ? trap(path70) : `self = ${value}`);
|
|
13324
13324
|
}
|
|
13325
13325
|
emit(`${indent2}}`);
|
|
13326
13326
|
return;
|
|
@@ -13329,14 +13329,14 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13329
13329
|
const shape = header(symbol2, "protocol", indent2);
|
|
13330
13330
|
if (!shape)
|
|
13331
13331
|
return void skipped.push({
|
|
13332
|
-
path:
|
|
13332
|
+
path: path70,
|
|
13333
13333
|
reason: `unparsed protocol ${text(symbol2)}`
|
|
13334
13334
|
});
|
|
13335
13335
|
const native = nativeObjcProtocols.has(id);
|
|
13336
13336
|
const objcName = native ? /^c:objc\(pl\)(\w+)$/.exec(id)?.[1] : void 0;
|
|
13337
13337
|
if (native && !objcName)
|
|
13338
13338
|
return void skipped.push({
|
|
13339
|
-
path:
|
|
13339
|
+
path: path70,
|
|
13340
13340
|
reason: `unknown Objective-C protocol identity ${id}`
|
|
13341
13341
|
});
|
|
13342
13342
|
const list2 = [
|
|
@@ -13364,7 +13364,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13364
13364
|
}
|
|
13365
13365
|
emit(`${indent2}}`);
|
|
13366
13366
|
if (defaults.length > 0) {
|
|
13367
|
-
emit(`${indent2}extension ${
|
|
13367
|
+
emit(`${indent2}extension ${path70} {`);
|
|
13368
13368
|
for (const member of defaults) {
|
|
13369
13369
|
const decl = text(member);
|
|
13370
13370
|
if (optional3.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
|
|
@@ -13456,7 +13456,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13456
13456
|
};
|
|
13457
13457
|
const atWidth = (value, raw2) => (raw2 === "UInt" || raw2 === "Swift.UInt") && value === "18446744073709551615" ? "4294967295" : (raw2 === "Int" || raw2 === "Swift.Int") && value === "9223372036854775807" ? "2147483647" : (raw2 === "Int" || raw2 === "Swift.Int") && value === "-9223372036854775808" ? "-2147483648" : value;
|
|
13458
13458
|
const emitGlobal = scoped((symbol2) => {
|
|
13459
|
-
const
|
|
13459
|
+
const path70 = pathOf(symbol2);
|
|
13460
13460
|
const kind = symbol2.kind.identifier;
|
|
13461
13461
|
if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
|
|
13462
13462
|
const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol2));
|
|
@@ -13465,20 +13465,20 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13465
13465
|
if (leaf(symbol2).endsWith("(_:)") && !/^(?:prefix|infix|postfix)\b/.test(spelled2))
|
|
13466
13466
|
spelled2 = `prefix ${spelled2}`;
|
|
13467
13467
|
}
|
|
13468
|
-
const measured = behavior.get(
|
|
13469
|
-
if (measured) used.add(
|
|
13468
|
+
const measured = behavior.get(path70);
|
|
13469
|
+
if (measured) used.add(path70);
|
|
13470
13470
|
const overloadBody = /\basync\b/.test(spelled2) ? measured?.asyncBody : /\bResult</.test(spelled2) ? measured?.resultBody : void 0;
|
|
13471
13471
|
emit(
|
|
13472
|
-
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(
|
|
13472
|
+
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path70))} }`
|
|
13473
13473
|
);
|
|
13474
13474
|
} else if (kind === "swift.var") {
|
|
13475
13475
|
const parsed = splitAccessors(text(symbol2).replace(/^let /, "var "));
|
|
13476
|
-
const measured = behavior.get(
|
|
13477
|
-
if (measured) used.add(
|
|
13476
|
+
const measured = behavior.get(path70);
|
|
13477
|
+
if (measured) used.add(path70);
|
|
13478
13478
|
emit(
|
|
13479
|
-
`public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(
|
|
13479
|
+
`public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path70))} }`
|
|
13480
13480
|
);
|
|
13481
|
-
} else skipped.push({ path:
|
|
13481
|
+
} else skipped.push({ path: path70, reason: `unhandled top-level ${kind}` });
|
|
13482
13482
|
});
|
|
13483
13483
|
const cExports = new Set(
|
|
13484
13484
|
[...byId.values()].flatMap((symbol2) => {
|
|
@@ -13495,7 +13495,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13495
13495
|
return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
|
|
13496
13496
|
}).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
|
|
13497
13497
|
for (const symbol2 of roots) {
|
|
13498
|
-
const
|
|
13498
|
+
const path70 = pathOf(symbol2);
|
|
13499
13499
|
if (TYPE_KINDS.has(symbol2.kind.identifier)) emitType(symbol2, "");
|
|
13500
13500
|
else emitGlobal(symbol2);
|
|
13501
13501
|
}
|
|
@@ -13556,9 +13556,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
13556
13556
|
"#endif",
|
|
13557
13557
|
""
|
|
13558
13558
|
];
|
|
13559
|
-
for (const
|
|
13560
|
-
if (!used.has(
|
|
13561
|
-
skipped.push({ path:
|
|
13559
|
+
for (const path70 of behavior.keys())
|
|
13560
|
+
if (!used.has(path70))
|
|
13561
|
+
skipped.push({ path: path70, reason: "behavior names no emitted declaration" });
|
|
13562
13562
|
return {
|
|
13563
13563
|
source: `${[...banner, ...lines].join("\n")}
|
|
13564
13564
|
`,
|
|
@@ -15586,9 +15586,9 @@ var EXCERPT = /^(\s*)(\d+)( \| )(.*)$/;
|
|
|
15586
15586
|
var MARKER = /^(\s*)( \| )(.*)$/;
|
|
15587
15587
|
function designTimeDiagnostic(output2, files2) {
|
|
15588
15588
|
const rewritten = /* @__PURE__ */ new Map();
|
|
15589
|
-
const linesOf = (
|
|
15589
|
+
const linesOf = (path70) => {
|
|
15590
15590
|
const file = Object.keys(files2).find(
|
|
15591
|
-
(name3) => name3.endsWith(".swift") && (
|
|
15591
|
+
(name3) => name3.endsWith(".swift") && (path70 === name3 || path70.endsWith(`/${name3}`))
|
|
15592
15592
|
);
|
|
15593
15593
|
if (file === void 0) return null;
|
|
15594
15594
|
let lines = rewritten.get(file);
|
|
@@ -22997,7 +22997,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
22997
22997
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
22998
22998
|
var MULTI_MANIFEST_VERSION = 68;
|
|
22999
22999
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
23000
|
-
var compilerSourceDigest = true ? "
|
|
23000
|
+
var compilerSourceDigest = true ? "ea71d48e0e763d5d66f6bcf76f1c0d531770cb823f7918bdbc8a380ff04b0105" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
23001
23001
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
23002
23002
|
const hash = (0, import_node_crypto19.createHash)("sha256");
|
|
23003
23003
|
hash.update(`swift-compile
|
|
@@ -32138,7 +32138,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
32138
32138
|
return hash.digest("hex");
|
|
32139
32139
|
}
|
|
32140
32140
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
32141
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
32141
|
+
var STANDIN_SOURCE_DIGEST = true ? "82e3932e2c4e87bde14bcd3d82add51775bd40f413885cc9fb385026d10aeca5" : standinSourceDigest();
|
|
32142
32142
|
|
|
32143
32143
|
// src/expoSwiftContract.ts
|
|
32144
32144
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -32451,9 +32451,9 @@ async function packageTreeDigest(root) {
|
|
|
32451
32451
|
(a, b) => a.name.localeCompare(b.name)
|
|
32452
32452
|
)) {
|
|
32453
32453
|
if (entry.name === "node_modules") continue;
|
|
32454
|
-
const
|
|
32455
|
-
if (entry.isDirectory()) walk3((0, import_node_path60.join)(directory2, entry.name), `${
|
|
32456
|
-
else if (entry.isFile()) files2.push(
|
|
32454
|
+
const path70 = `${relative3}${entry.name}`;
|
|
32455
|
+
if (entry.isDirectory()) walk3((0, import_node_path60.join)(directory2, entry.name), `${path70}/`);
|
|
32456
|
+
else if (entry.isFile()) files2.push(path70);
|
|
32457
32457
|
}
|
|
32458
32458
|
};
|
|
32459
32459
|
walk3(root, "");
|
|
@@ -32469,7 +32469,7 @@ async function packageTreeDigest(root) {
|
|
|
32469
32469
|
// src/expo-native-prebuilt.ts
|
|
32470
32470
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
32471
32471
|
function expoNativeCompilerDigestValue() {
|
|
32472
|
-
return true ? "
|
|
32472
|
+
return true ? "b2b988d96f675274b5000b8cdf6e9f3d8f9329b3fab3587223744ec4caf04923" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
32473
32473
|
}
|
|
32474
32474
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
32475
32475
|
function readSources(value) {
|
|
@@ -33637,7 +33637,7 @@ function resolveSwiftPackages(options) {
|
|
|
33637
33637
|
headers.set(name3, import_node_path65.default.relative(binary2.dir, dir));
|
|
33638
33638
|
};
|
|
33639
33639
|
visit3(pkg, binary2.target);
|
|
33640
|
-
binary2.headerDependencies = [...headers].map(([module2,
|
|
33640
|
+
binary2.headerDependencies = [...headers].map(([module2, path70]) => ({ module: module2, path: path70 }));
|
|
33641
33641
|
}
|
|
33642
33642
|
for (const owner of options.owners ?? []) {
|
|
33643
33643
|
const found = productClosure(owner.products);
|
|
@@ -36657,6 +36657,8 @@ function compiledFrameworkImports(app, products) {
|
|
|
36657
36657
|
if (next) visit3(next);
|
|
36658
36658
|
}
|
|
36659
36659
|
};
|
|
36660
|
+
if (target.allSources.some((file) => file.endsWith(".swift")))
|
|
36661
|
+
for (const header of target.objc.headers) visit3(header);
|
|
36660
36662
|
for (const file of target.allSources.filter(isSwiftNativeTranslationUnit)) visit3(file);
|
|
36661
36663
|
}
|
|
36662
36664
|
return imports2;
|
|
@@ -38444,8 +38446,8 @@ function imagesetFiles(images) {
|
|
|
38444
38446
|
];
|
|
38445
38447
|
}).sort((a, b) => a.scale - b.scale);
|
|
38446
38448
|
}
|
|
38447
|
-
function flatScale(
|
|
38448
|
-
const match = /@([23])x\.[^./]+$/.exec(
|
|
38449
|
+
function flatScale(path70) {
|
|
38450
|
+
const match = /@([23])x\.[^./]+$/.exec(path70);
|
|
38449
38451
|
return match ? Number(match[1]) : 1;
|
|
38450
38452
|
}
|
|
38451
38453
|
function providesNamespace(text6) {
|
|
@@ -38472,8 +38474,8 @@ function catalogEntryName(contentsPath, kind, readText) {
|
|
|
38472
38474
|
}
|
|
38473
38475
|
return segments.join("/");
|
|
38474
38476
|
}
|
|
38475
|
-
function isFlatResourceImage(
|
|
38476
|
-
return
|
|
38477
|
+
function isFlatResourceImage(path70) {
|
|
38478
|
+
return path70.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path70));
|
|
38477
38479
|
}
|
|
38478
38480
|
function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
38479
38481
|
const table = [];
|
|
@@ -38486,7 +38488,7 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
|
38486
38488
|
seen.set(bundlePath, names);
|
|
38487
38489
|
return { bundlePath, names };
|
|
38488
38490
|
};
|
|
38489
|
-
const catalogs = paths.filter((
|
|
38491
|
+
const catalogs = paths.filter((path70) => baseOf(path70) === "Contents.json");
|
|
38490
38492
|
for (const contentsPath of catalogs) {
|
|
38491
38493
|
const name3 = catalogEntryName(contentsPath, ".imageset", readText);
|
|
38492
38494
|
if (name3 === null) continue;
|
|
@@ -38518,13 +38520,13 @@ function enumerateBundleImages(paths, readText, bundleForFile = () => ".") {
|
|
|
38518
38520
|
...intent === "template" || intent === "original" ? { renderingMode: intent } : {}
|
|
38519
38521
|
});
|
|
38520
38522
|
}
|
|
38521
|
-
for (const
|
|
38522
|
-
if (!isFlatResourceImage(
|
|
38523
|
-
const name3 = baseOf(
|
|
38524
|
-
const { bundlePath, names } = namesFor(
|
|
38523
|
+
for (const path70 of paths) {
|
|
38524
|
+
if (!isFlatResourceImage(path70)) continue;
|
|
38525
|
+
const name3 = baseOf(path70).slice(0, -extOf(path70).length);
|
|
38526
|
+
const { bundlePath, names } = namesFor(path70);
|
|
38525
38527
|
if (name3 === "" || names.has(name3)) continue;
|
|
38526
38528
|
names.add(name3);
|
|
38527
|
-
table.push({ name: name3, file:
|
|
38529
|
+
table.push({ name: name3, file: path70, scale: flatScale(path70), bundlePath });
|
|
38528
38530
|
}
|
|
38529
38531
|
return table;
|
|
38530
38532
|
}
|
|
@@ -38559,7 +38561,7 @@ function colorsetValue(color) {
|
|
|
38559
38561
|
}
|
|
38560
38562
|
function enumerateBundleColors(paths, readText) {
|
|
38561
38563
|
const table = {};
|
|
38562
|
-
for (const contentsPath of paths.filter((
|
|
38564
|
+
for (const contentsPath of paths.filter((path70) => baseOf(path70) === "Contents.json")) {
|
|
38563
38565
|
const name3 = catalogEntryName(contentsPath, ".colorset", readText);
|
|
38564
38566
|
if (name3 === null || name3 in table) continue;
|
|
38565
38567
|
let colors;
|
|
@@ -38640,8 +38642,8 @@ function axisExtremes(points) {
|
|
|
38640
38642
|
function pathBounds(d) {
|
|
38641
38643
|
const xs = [];
|
|
38642
38644
|
const ys = [];
|
|
38643
|
-
for (const
|
|
38644
|
-
(0, import_svgpath.default)(
|
|
38645
|
+
for (const path70 of d)
|
|
38646
|
+
(0, import_svgpath.default)(path70).abs().unshort().unarc().iterate((segment, _index, x, y) => {
|
|
38645
38647
|
const [command, ...args] = segment;
|
|
38646
38648
|
if (command === "M" || command === "L") {
|
|
38647
38649
|
xs.push(Number(args[0]));
|
|
@@ -38668,7 +38670,7 @@ function guide(svg, id, axis) {
|
|
|
38668
38670
|
}
|
|
38669
38671
|
function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
38670
38672
|
const table = {};
|
|
38671
|
-
for (const contentsPath of paths.filter((
|
|
38673
|
+
for (const contentsPath of paths.filter((path70) => baseOf(path70) === "Contents.json")) {
|
|
38672
38674
|
const name3 = catalogEntryName(contentsPath, ".symbolset", readText);
|
|
38673
38675
|
if (name3 === null) continue;
|
|
38674
38676
|
const bundle = bundleForFile(contentsPath);
|
|
@@ -38727,8 +38729,8 @@ function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
|
38727
38729
|
advance,
|
|
38728
38730
|
box: [12 - wide / 2, 12 - tall / 2, wide, tall],
|
|
38729
38731
|
...customLayout ? { customLayout } : {},
|
|
38730
|
-
layers: d.map((
|
|
38731
|
-
d: (0, import_svgpath.default)(
|
|
38732
|
+
layers: d.map((path70) => ({
|
|
38733
|
+
d: (0, import_svgpath.default)(path70).abs().scale(em).translate(translateX, translateY).round(3).toString()
|
|
38732
38734
|
}))
|
|
38733
38735
|
};
|
|
38734
38736
|
table[vectorKey] = vector;
|
|
@@ -38740,18 +38742,18 @@ function enumerateBundleSymbols(paths, readText, bundleForFile) {
|
|
|
38740
38742
|
return table;
|
|
38741
38743
|
}
|
|
38742
38744
|
var COMPILED_EXTENSIONS = /* @__PURE__ */ new Set([".swift", ".metal", ".storyboard", ".xib"]);
|
|
38743
|
-
function isCopiedResource(
|
|
38744
|
-
if (copiedBundle ||
|
|
38745
|
+
function isCopiedResource(path70, copiedBundle) {
|
|
38746
|
+
if (copiedBundle || path70.split("/").some((segment) => /\.(atlasc|bundle|storyboardc|nib)$/.test(segment)))
|
|
38745
38747
|
return true;
|
|
38746
|
-
const ext = extOf(
|
|
38748
|
+
const ext = extOf(path70);
|
|
38747
38749
|
if (ext === ".json" || ext === ".xcstrings") return true;
|
|
38748
|
-
return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !
|
|
38750
|
+
return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !path70.split("/").some((segment) => segment.endsWith(".xcassets"));
|
|
38749
38751
|
}
|
|
38750
38752
|
function enumerateBundleResources(paths, copiedBundle = false) {
|
|
38751
38753
|
const found = [];
|
|
38752
38754
|
const seen = /* @__PURE__ */ new Set();
|
|
38753
38755
|
const ordered = [...paths].filter(
|
|
38754
|
-
(
|
|
38756
|
+
(path70) => path70.split("/").includes("Resources") && path70.split("/").every((segment) => segment !== "" && segment !== "..") && isCopiedResource(path70, copiedBundle)
|
|
38755
38757
|
).sort((a, b) => {
|
|
38756
38758
|
const aDepth = a.split("/").length;
|
|
38757
38759
|
const bDepth = b.split("/").length;
|
|
@@ -38862,31 +38864,31 @@ function tokens(text6) {
|
|
|
38862
38864
|
}
|
|
38863
38865
|
return result;
|
|
38864
38866
|
}
|
|
38865
|
-
function qualified(language, key2,
|
|
38866
|
-
return `(${language}: ${key2}${
|
|
38867
|
+
function qualified(language, key2, path70) {
|
|
38868
|
+
return `(${language}: ${key2}${path70 === "" ? "" : "|==|" + path70})`;
|
|
38867
38869
|
}
|
|
38868
|
-
function requiresNumber(language, key2,
|
|
38870
|
+
function requiresNumber(language, key2, path70) {
|
|
38869
38871
|
return Error(
|
|
38870
|
-
"Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2,
|
|
38872
|
+
"Plural variation requires referencing the number in the string. To maintain grammatical correctness for strings that do not reference the number of items, use separate top-level strings for one and greater than one. " + qualified(language, key2, path70)
|
|
38871
38873
|
);
|
|
38872
38874
|
}
|
|
38873
|
-
function moreThanOne(language, key2,
|
|
38875
|
+
function moreThanOne(language, key2, path70) {
|
|
38874
38876
|
return Error(
|
|
38875
|
-
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2,
|
|
38877
|
+
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path70)
|
|
38876
38878
|
);
|
|
38877
38879
|
}
|
|
38878
38880
|
function schemaPath(segments) {
|
|
38879
38881
|
return segments.map((segment) => `'${segment}'`).join(" -> ");
|
|
38880
38882
|
}
|
|
38881
|
-
function checkUnitShape(node,
|
|
38883
|
+
function checkUnitShape(node, path70) {
|
|
38882
38884
|
const raw2 = node.stringUnit;
|
|
38883
38885
|
if (raw2 === void 0)
|
|
38884
|
-
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(
|
|
38886
|
+
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path70)}`);
|
|
38885
38887
|
if (raw2 === null)
|
|
38886
|
-
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(
|
|
38888
|
+
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path70)}`);
|
|
38887
38889
|
if (!isRecord3(raw2))
|
|
38888
|
-
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(
|
|
38889
|
-
const unitPath = [...
|
|
38890
|
+
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path70)}`);
|
|
38891
|
+
const unitPath = [...path70, "stringUnit"];
|
|
38890
38892
|
if (!Object.hasOwn(raw2, "state"))
|
|
38891
38893
|
throw Error(`Missing required key 'state' inside ${schemaPath(unitPath)}`);
|
|
38892
38894
|
const state = raw2.state;
|
|
@@ -38903,38 +38905,38 @@ function checkUnitShape(node, path69) {
|
|
|
38903
38905
|
throw Error(`Expected string for key 'value' inside ${schemaPath(unitPath)}`);
|
|
38904
38906
|
return value;
|
|
38905
38907
|
}
|
|
38906
|
-
function checkPluralShape(node,
|
|
38908
|
+
function checkPluralShape(node, path70) {
|
|
38907
38909
|
for (const [category, raw2] of Object.entries(node)) {
|
|
38908
|
-
const categoryPath = [...
|
|
38910
|
+
const categoryPath = [...path70, category];
|
|
38909
38911
|
if (raw2 === null)
|
|
38910
38912
|
throw Error(
|
|
38911
|
-
`Missing required value for key '${category}' inside ${schemaPath(
|
|
38913
|
+
`Missing required value for key '${category}' inside ${schemaPath(path70)}`
|
|
38912
38914
|
);
|
|
38913
38915
|
if (!isRecord3(raw2))
|
|
38914
|
-
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(
|
|
38916
|
+
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path70)}`);
|
|
38915
38917
|
checkUnitShape(raw2, categoryPath);
|
|
38916
38918
|
}
|
|
38917
38919
|
}
|
|
38918
|
-
function checkLocalizationShape(node,
|
|
38920
|
+
function checkLocalizationShape(node, path70, deviceValue = false) {
|
|
38919
38921
|
if (node === null)
|
|
38920
38922
|
throw Error(
|
|
38921
|
-
`Missing required value for key '${
|
|
38923
|
+
`Missing required value for key '${path70[path70.length - 1]}' inside ${schemaPath(path70.slice(0, -1))}`
|
|
38922
38924
|
);
|
|
38923
38925
|
if (!isRecord3(node))
|
|
38924
38926
|
throw Error(
|
|
38925
|
-
`Expected dictionary for key '${
|
|
38927
|
+
`Expected dictionary for key '${path70[path70.length - 1]}' inside ${schemaPath(path70.slice(0, -1))}`
|
|
38926
38928
|
);
|
|
38927
|
-
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations,
|
|
38929
|
+
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path70);
|
|
38928
38930
|
if (!deviceValue && Object.hasOwn(node, "substitutions"))
|
|
38929
|
-
checkSubstitutionsShape(node.substitutions,
|
|
38930
|
-
if (!Object.hasOwn(node, "variations")) checkUnitShape(node,
|
|
38931
|
+
checkSubstitutionsShape(node.substitutions, path70);
|
|
38932
|
+
if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path70);
|
|
38931
38933
|
}
|
|
38932
|
-
function checkVariationsShape(variations,
|
|
38934
|
+
function checkVariationsShape(variations, path70) {
|
|
38933
38935
|
if (variations === null)
|
|
38934
|
-
throw Error(`Missing required value for key 'variations' inside ${schemaPath(
|
|
38936
|
+
throw Error(`Missing required value for key 'variations' inside ${schemaPath(path70)}`);
|
|
38935
38937
|
if (!isRecord3(variations))
|
|
38936
|
-
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(
|
|
38937
|
-
const variationsPath = [...
|
|
38938
|
+
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path70)}`);
|
|
38939
|
+
const variationsPath = [...path70, "variations"];
|
|
38938
38940
|
for (const [type, raw2] of Object.entries(variations)) {
|
|
38939
38941
|
if (raw2 === null)
|
|
38940
38942
|
throw Error(
|
|
@@ -38960,11 +38962,11 @@ function checkVariationsShape(variations, path69) {
|
|
|
38960
38962
|
}
|
|
38961
38963
|
}
|
|
38962
38964
|
}
|
|
38963
|
-
function checkSubstitutionsShape(substitutions,
|
|
38965
|
+
function checkSubstitutionsShape(substitutions, path70) {
|
|
38964
38966
|
if (substitutions === null) return;
|
|
38965
38967
|
if (!isRecord3(substitutions))
|
|
38966
|
-
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(
|
|
38967
|
-
const substitutionsPath = [...
|
|
38968
|
+
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path70)}`);
|
|
38969
|
+
const substitutionsPath = [...path70, "substitutions"];
|
|
38968
38970
|
for (const [name3, raw2] of Object.entries(substitutions)) {
|
|
38969
38971
|
const subPath = [...substitutionsPath, name3];
|
|
38970
38972
|
if (raw2 === null)
|
|
@@ -39006,10 +39008,10 @@ function scanSpecs(forms) {
|
|
|
39006
39008
|
}
|
|
39007
39009
|
return specs;
|
|
39008
39010
|
}
|
|
39009
|
-
function inferPlural(forms, language, key2,
|
|
39011
|
+
function inferPlural(forms, language, key2, path70) {
|
|
39010
39012
|
const specs = scanSpecs(forms);
|
|
39011
|
-
if (specs.size === 0) throw requiresNumber(language, key2,
|
|
39012
|
-
if (specs.size > 1) throw moreThanOne(language, key2,
|
|
39013
|
+
if (specs.size === 0) throw requiresNumber(language, key2, path70);
|
|
39014
|
+
if (specs.size > 1) throw moreThanOne(language, key2, path70);
|
|
39013
39015
|
return [...specs.values()][0] ?? { specifier: "", argument: 0 };
|
|
39014
39016
|
}
|
|
39015
39017
|
function unit(value) {
|
|
@@ -39841,8 +39843,8 @@ function plist4(value, depth) {
|
|
|
39841
39843
|
}
|
|
39842
39844
|
function compileStringCatalog(source, name3) {
|
|
39843
39845
|
return Object.fromEntries(
|
|
39844
|
-
Object.entries(compileCatalogTables(source, name3)).map(([
|
|
39845
|
-
|
|
39846
|
+
Object.entries(compileCatalogTables(source, name3)).map(([path70, table]) => [
|
|
39847
|
+
path70,
|
|
39846
39848
|
'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n' + plist4(table, 0) + "</plist>\n"
|
|
39847
39849
|
])
|
|
39848
39850
|
);
|
|
@@ -40414,8 +40416,8 @@ function sourceEntryPath() {
|
|
|
40414
40416
|
return null;
|
|
40415
40417
|
}
|
|
40416
40418
|
}
|
|
40417
|
-
function isCliEntry(
|
|
40418
|
-
const name3 = (0, import_node_path73.basename)(
|
|
40419
|
+
function isCliEntry(path70) {
|
|
40420
|
+
const name3 = (0, import_node_path73.basename)(path70);
|
|
40419
40421
|
return name3 === "bin.ts" || name3 === "bin.js";
|
|
40420
40422
|
}
|
|
40421
40423
|
function rnxSelfInvocation() {
|
|
@@ -42593,6 +42595,7 @@ function scopedArtifact(project, entry, moduleRoot, signal) {
|
|
|
42593
42595
|
|
|
42594
42596
|
// src/turbo-compile.ts
|
|
42595
42597
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
42598
|
+
var import_node_path79 = __toESM(require("node:path"), 1);
|
|
42596
42599
|
|
|
42597
42600
|
// src/nitro-adapter.ts
|
|
42598
42601
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -44414,6 +44417,7 @@ function codegenSpecRoot(codegen) {
|
|
|
44414
44417
|
var TURBO_CORE_TARGET = "TurboCore";
|
|
44415
44418
|
var TURBO_FMT_TARGET = "TurboFmt";
|
|
44416
44419
|
var TURBO_ENTRY_HEADER = "PeachTurboEntry.hpp";
|
|
44420
|
+
var TURBO_CORE_PUBLIC_HEADERS = "entry";
|
|
44417
44421
|
var REGISTRATION = "registerCxxModuleToGlobalModuleMap";
|
|
44418
44422
|
var CODEGEN_OBJC = /@generated by codegen project: GenerateModuleObjCpp\b/;
|
|
44419
44423
|
var UNIT = /\.(?:c|cc|cpp|cxx)$/;
|
|
@@ -44680,11 +44684,11 @@ function stringList(value) {
|
|
|
44680
44684
|
function externalSpecMembers(root, requested) {
|
|
44681
44685
|
const children = (spec) => Array.isArray(spec.subspecs) ? spec.subspecs.filter(object5) : [];
|
|
44682
44686
|
const chains = /* @__PURE__ */ new Map();
|
|
44683
|
-
const select = (
|
|
44684
|
-
const key2 =
|
|
44687
|
+
const select = (path70) => {
|
|
44688
|
+
const key2 = path70.join("/");
|
|
44685
44689
|
if (chains.has(key2)) return;
|
|
44686
44690
|
const chain = [root];
|
|
44687
|
-
for (const part of
|
|
44691
|
+
for (const part of path70) {
|
|
44688
44692
|
const child = children(chain.at(-1)).find((sub) => sub.name === part);
|
|
44689
44693
|
if (!child) throw new Error(`${String(root.name)} has no subspec ${key2}`);
|
|
44690
44694
|
chain.push(child);
|
|
@@ -44693,7 +44697,7 @@ function externalSpecMembers(root, requested) {
|
|
|
44693
44697
|
const spec = chain.at(-1);
|
|
44694
44698
|
const defaults = stringList(spec.default_subspecs ?? spec.default_subspec);
|
|
44695
44699
|
const activated = defaults[0] === "none" ? [] : defaults.length > 0 ? defaults : children(spec).map((sub) => String(sub.name));
|
|
44696
|
-
for (const name3 of activated) select([...
|
|
44700
|
+
for (const name3 of activated) select([...path70, ...name3.split("/")]);
|
|
44697
44701
|
for (const member of chain)
|
|
44698
44702
|
for (const dependencies of [member.dependencies, iosOf(member)?.dependencies])
|
|
44699
44703
|
for (const dependency of object5(dependencies) ? Object.keys(dependencies) : []) {
|
|
@@ -45841,11 +45845,11 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
45841
45845
|
const withRuntime = binding.includes("TurboModuleProviderFunctionTypeWithRuntime");
|
|
45842
45846
|
add(`${core}/include/PeachJsiRuntime.hpp`, TURBO_RUNTIME_HEADER);
|
|
45843
45847
|
add(
|
|
45844
|
-
`${core}
|
|
45848
|
+
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`,
|
|
45845
45849
|
'#pragma once\nextern "C" void peachTurboInitialize();\n'
|
|
45846
45850
|
);
|
|
45847
45851
|
add(
|
|
45848
|
-
`${core}/
|
|
45852
|
+
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/module.modulemap`,
|
|
45849
45853
|
`module ${TURBO_CORE_TARGET} { header "${TURBO_ENTRY_HEADER}" export * }
|
|
45850
45854
|
`
|
|
45851
45855
|
);
|
|
@@ -46667,6 +46671,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
46667
46671
|
`let package = Package(name: "PeachNativeModule", platforms: [.iOS(${JSON.stringify(iosDeploymentTarget)})], targets: [`,
|
|
46668
46672
|
...dependencyTargets,
|
|
46669
46673
|
...targets.map((target) => {
|
|
46674
|
+
const hasCore = targetNames.includes(TURBO_CORE_TARGET);
|
|
46670
46675
|
const hasObjcPrefix = Boolean(
|
|
46671
46676
|
files2[`Sources/${TURBO_CORE_TARGET}/include/PeachTurboPrefix.pch`]
|
|
46672
46677
|
);
|
|
@@ -46677,11 +46682,14 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
46677
46682
|
...target.name === TURBO_CORE_TARGET ? [] : ['.unsafeFlags(["-fmodules", "-Wno-error=int-conversion"])'],
|
|
46678
46683
|
...clangSettingEntries(target.clangSettings, "c")
|
|
46679
46684
|
];
|
|
46685
|
+
const coreHeaders = hasCore ? `.headerSearchPath(${JSON.stringify(import_node_path79.default.posix.relative(target.path, `Sources/${TURBO_CORE_TARGET}/include`))})` : null;
|
|
46686
|
+
if (coreHeaders) cEntries.push(coreHeaders);
|
|
46680
46687
|
const cSettings = cEntries.length ? `, cSettings: [${cEntries.join(", ")}]` : "";
|
|
46681
|
-
|
|
46688
|
+
const publicHeaders = hasCore && target.name === TURBO_CORE_TARGET ? `, publicHeadersPath: ${JSON.stringify(TURBO_CORE_PUBLIC_HEADERS)}` : "";
|
|
46689
|
+
return `.target(name: ${JSON.stringify(target.name)}, dependencies: ${JSON.stringify(target.dependencies?.map((dependency) => dependency.name) ?? [])}, path: ${JSON.stringify(target.path)}, exclude: ${JSON.stringify(target.exclude ?? [])}${publicHeaders}${cSettings}, cxxSettings: [${(target.cxxDefines ?? []).map((define) => {
|
|
46682
46690
|
const [name3, ...value] = define.split("=");
|
|
46683
46691
|
return value.length ? `.define(${JSON.stringify(name3)}, to: ${JSON.stringify(value.join("="))})` : `.define(${JSON.stringify(name3)})`;
|
|
46684
|
-
}).concat(clangSettingEntries(target.clangSettings, "cxx")).join(", ")}], ${swiftManifestSettings(target)}),`;
|
|
46692
|
+
}).concat(clangSettingEntries(target.clangSettings, "cxx")).concat(coreHeaders ? [coreHeaders] : []).join(", ")}], ${swiftManifestSettings(target)}),`;
|
|
46685
46693
|
}),
|
|
46686
46694
|
`.executableTarget(name: "PeachTurboApp", dependencies: ${JSON.stringify(targetNames)}, swiftSettings: [.interoperabilityMode(.Cxx)]),`,
|
|
46687
46695
|
"], cxxLanguageStandard: .cxx20)",
|
|
@@ -46741,17 +46749,17 @@ function mtimeNs(stat) {
|
|
|
46741
46749
|
}
|
|
46742
46750
|
function tracedPath(value) {
|
|
46743
46751
|
if (typeof value === "number" || value == null) return null;
|
|
46744
|
-
if (typeof value === "string") return value.length === 0 ? null :
|
|
46752
|
+
if (typeof value === "string") return value.length === 0 ? null : import_node_path80.default.resolve(value);
|
|
46745
46753
|
if (value instanceof URL)
|
|
46746
46754
|
return value.protocol === "file:" ? (0, import_node_url6.fileURLToPath)(value) : null;
|
|
46747
|
-
if (Buffer.isBuffer(value)) return
|
|
46755
|
+
if (Buffer.isBuffer(value)) return import_node_path80.default.resolve(value.toString());
|
|
46748
46756
|
return null;
|
|
46749
46757
|
}
|
|
46750
46758
|
function ignoredInput(file) {
|
|
46751
|
-
if (file.includes(`${
|
|
46759
|
+
if (file.includes(`${import_node_path80.default.sep}peach-expo-swift${import_node_path80.default.sep}`) || file.endsWith(`${import_node_path80.default.sep}peach-expo-swift`))
|
|
46752
46760
|
return true;
|
|
46753
46761
|
return ignoredRoots.some(
|
|
46754
|
-
(root) => file === root || file.startsWith(`${root}${
|
|
46762
|
+
(root) => file === root || file.startsWith(`${root}${import_node_path80.default.sep}`)
|
|
46755
46763
|
);
|
|
46756
46764
|
}
|
|
46757
46765
|
function noteMissing(file) {
|
|
@@ -46823,14 +46831,14 @@ function namesFromListing(dir, entries) {
|
|
|
46823
46831
|
const names = [];
|
|
46824
46832
|
for (const entry of entries) {
|
|
46825
46833
|
if (typeof entry === "string" || Buffer.isBuffer(entry)) {
|
|
46826
|
-
names.push(entry.toString().split(
|
|
46834
|
+
names.push(entry.toString().split(import_node_path80.default.sep).join("/"));
|
|
46827
46835
|
continue;
|
|
46828
46836
|
}
|
|
46829
46837
|
if (!entry || typeof entry !== "object" || !("name" in entry)) continue;
|
|
46830
46838
|
const name3 = String(Reflect.get(entry, "name"));
|
|
46831
46839
|
const parent = Reflect.get(entry, "parentPath");
|
|
46832
46840
|
const base = typeof parent === "string" && parent.length > 0 ? parent : dir;
|
|
46833
|
-
names.push(
|
|
46841
|
+
names.push(import_node_path80.default.relative(dir, import_node_path80.default.join(base, name3)).split(import_node_path80.default.sep).join("/"));
|
|
46834
46842
|
}
|
|
46835
46843
|
names.sort();
|
|
46836
46844
|
return names.join("\0");
|
|
@@ -46850,10 +46858,10 @@ function installSwiftInputTrace() {
|
|
|
46850
46858
|
};
|
|
46851
46859
|
savedFs = saved;
|
|
46852
46860
|
const prefixes = [
|
|
46853
|
-
|
|
46854
|
-
|
|
46861
|
+
import_node_path80.default.join(cacheDir(), "swift-builds"),
|
|
46862
|
+
import_node_path80.default.join(swiftCacheDir(), "swift-builds"),
|
|
46855
46863
|
swiftRootLocksDir(),
|
|
46856
|
-
|
|
46864
|
+
import_node_path80.default.join(cacheDir(), "swift-tmp")
|
|
46857
46865
|
].filter((prefix, index, all) => all.indexOf(prefix) === index);
|
|
46858
46866
|
ignoredRoots = prefixes.flatMap((root) => {
|
|
46859
46867
|
try {
|
|
@@ -46980,7 +46988,7 @@ function cloneNativeTarget(target) {
|
|
|
46980
46988
|
function podSupportsIOS(pod) {
|
|
46981
46989
|
if (!isRecord(pod) || typeof pod.podName !== "string" || typeof pod.podspecDir !== "string")
|
|
46982
46990
|
throw new Error("invalid Expo autolinking pod");
|
|
46983
|
-
const base =
|
|
46991
|
+
const base = import_node_path80.default.join(pod.podspecDir, pod.podName);
|
|
46984
46992
|
if (import_node_fs82.default.existsSync(`${base}.podspec.json`)) {
|
|
46985
46993
|
const platforms2 = JSON.parse(
|
|
46986
46994
|
import_node_fs82.default.readFileSync(`${base}.podspec.json`, "utf8")
|
|
@@ -47027,7 +47035,7 @@ function standinNativeTarget(standin, deploymentTarget) {
|
|
|
47027
47035
|
const modulemap = Object.keys(standin.files).find(
|
|
47028
47036
|
(file) => file === "module.modulemap" || file.endsWith("/module.modulemap")
|
|
47029
47037
|
);
|
|
47030
|
-
const headerDir = (modulemap ?
|
|
47038
|
+
const headerDir = (modulemap ? import_node_path80.default.posix.dirname(`${prefix}${modulemap}`) : null) ?? commonStandinHeaderDir(prefix, headers) ?? `${prefix}include`;
|
|
47031
47039
|
return {
|
|
47032
47040
|
...synthesizedNativeTarget(standin.module, deploymentTarget),
|
|
47033
47041
|
headers,
|
|
@@ -47037,11 +47045,11 @@ function standinNativeTarget(standin, deploymentTarget) {
|
|
|
47037
47045
|
}
|
|
47038
47046
|
function commonStandinHeaderDir(prefix, headers) {
|
|
47039
47047
|
if (headers.length === 0) return null;
|
|
47040
|
-
let common =
|
|
47048
|
+
let common = import_node_path80.default.posix.dirname(headers[0]);
|
|
47041
47049
|
for (const header of headers.slice(1)) {
|
|
47042
|
-
const dir =
|
|
47050
|
+
const dir = import_node_path80.default.posix.dirname(header);
|
|
47043
47051
|
while (dir !== common && !dir.startsWith(`${common}/`))
|
|
47044
|
-
common =
|
|
47052
|
+
common = import_node_path80.default.posix.dirname(common);
|
|
47045
47053
|
}
|
|
47046
47054
|
return common === prefix.slice(0, -1) || common.startsWith(prefix) ? common : null;
|
|
47047
47055
|
}
|
|
@@ -47152,12 +47160,12 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
|
|
|
47152
47160
|
);
|
|
47153
47161
|
const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
|
|
47154
47162
|
const reactNativeRoot = import_node_fs82.default.realpathSync(
|
|
47155
|
-
|
|
47156
|
-
(0, import_node_module8.createRequire)(
|
|
47163
|
+
import_node_path80.default.dirname(
|
|
47164
|
+
(0, import_node_module8.createRequire)(import_node_path80.default.join(appRoot, "package.json")).resolve(
|
|
47157
47165
|
"react-native/package.json"
|
|
47158
47166
|
)
|
|
47159
47167
|
)
|
|
47160
|
-
) +
|
|
47168
|
+
) + import_node_path80.default.sep;
|
|
47161
47169
|
const reactTargets = new Set(
|
|
47162
47170
|
(input.nativeTargets ?? []).flatMap((target) => {
|
|
47163
47171
|
const originals = Object.keys(target.sourceDirectories).flatMap(
|
|
@@ -47199,7 +47207,7 @@ function enrichInstalledUnits(units, installed, namespaceGroups, provided, modul
|
|
|
47199
47207
|
const bridge = bridgeNamespaces.has(unit2.namespace);
|
|
47200
47208
|
if (bridge)
|
|
47201
47209
|
for (const file of Object.keys(unit2.files)) {
|
|
47202
|
-
if (!
|
|
47210
|
+
if (!import_node_path80.default.posix.basename(file).startsWith(BRIDGE_MODULE_FILE_PREFIX))
|
|
47203
47211
|
delete unit2.files[file];
|
|
47204
47212
|
}
|
|
47205
47213
|
unit2.swiftLanguageMode = target.languageMode;
|
|
@@ -47333,13 +47341,13 @@ ${source}` : source;
|
|
|
47333
47341
|
for (const map3 of maps) {
|
|
47334
47342
|
if (!include.startsWith(`${map3.name}/`)) continue;
|
|
47335
47343
|
const header = include.slice(map3.name.length + 1);
|
|
47336
|
-
const candidate =
|
|
47344
|
+
const candidate = import_node_path80.default.posix.join(import_node_path80.default.posix.dirname(map3.file), include);
|
|
47337
47345
|
if (support[candidate] === void 0) continue;
|
|
47338
47346
|
map3.reached.add(header);
|
|
47339
47347
|
pending.push([candidate, support[candidate]]);
|
|
47340
47348
|
}
|
|
47341
|
-
const relative3 =
|
|
47342
|
-
|
|
47349
|
+
const relative3 = import_node_path80.default.posix.normalize(
|
|
47350
|
+
import_node_path80.default.posix.join(import_node_path80.default.posix.dirname(file), include)
|
|
47343
47351
|
);
|
|
47344
47352
|
if (support[relative3] !== void 0) pending.push([relative3, support[relative3]]);
|
|
47345
47353
|
}
|
|
@@ -47347,12 +47355,12 @@ ${source}` : source;
|
|
|
47347
47355
|
for (const map3 of maps) {
|
|
47348
47356
|
if (!map3.reached.size) continue;
|
|
47349
47357
|
const swift = swiftModuleInterface(moduleRoot, map3.name, interfaceRoot);
|
|
47350
|
-
const mapDirectory =
|
|
47358
|
+
const mapDirectory = import_node_path80.default.posix.dirname(map3.file);
|
|
47351
47359
|
if (swift) {
|
|
47352
47360
|
const header = `${map3.name}-Swift.h`;
|
|
47353
|
-
support[
|
|
47361
|
+
support[import_node_path80.default.posix.join(mapDirectory, map3.name, header)] = swift.header;
|
|
47354
47362
|
const queue = [...map3.reached].map(
|
|
47355
|
-
(file) =>
|
|
47363
|
+
(file) => import_node_path80.default.posix.join(mapDirectory, map3.name, file)
|
|
47356
47364
|
);
|
|
47357
47365
|
const seen = /* @__PURE__ */ new Set();
|
|
47358
47366
|
while (queue.length) {
|
|
@@ -47364,7 +47372,7 @@ ${source}` : source;
|
|
|
47364
47372
|
/#\s*(?:import|include)\s*[<"]([^>"]+)[>"]/g
|
|
47365
47373
|
)) {
|
|
47366
47374
|
const include = match[1];
|
|
47367
|
-
const next = include.startsWith(`${map3.name}/`) ?
|
|
47375
|
+
const next = include.startsWith(`${map3.name}/`) ? import_node_path80.default.posix.join(mapDirectory, include) : import_node_path80.default.posix.normalize(import_node_path80.default.posix.join(import_node_path80.default.posix.dirname(file), include));
|
|
47368
47376
|
if (support[next] !== void 0) queue.push(next);
|
|
47369
47377
|
}
|
|
47370
47378
|
const contents = withoutSwiftDeclarations(
|
|
@@ -47429,10 +47437,10 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47429
47437
|
signal?.throwIfAborted();
|
|
47430
47438
|
appRoot = import_node_fs82.default.realpathSync(appRoot);
|
|
47431
47439
|
const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
|
|
47432
|
-
const appRequire = (0, import_node_module8.createRequire)(
|
|
47440
|
+
const appRequire = (0, import_node_module8.createRequire)(import_node_path80.default.join(appRoot, "package.json"));
|
|
47433
47441
|
let expoRoot;
|
|
47434
47442
|
try {
|
|
47435
|
-
expoRoot =
|
|
47443
|
+
expoRoot = import_node_path80.default.dirname(appRequire.resolve("expo/package.json"));
|
|
47436
47444
|
} catch (error) {
|
|
47437
47445
|
if (!error || typeof error !== "object" || Reflect.get(error, "code") !== "MODULE_NOT_FOUND")
|
|
47438
47446
|
throw error;
|
|
@@ -47452,16 +47460,16 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47452
47460
|
).version;
|
|
47453
47461
|
if (typeof autolinkerVersion === "string" && Number.parseInt(autolinkerVersion, 10) < 1)
|
|
47454
47462
|
return null;
|
|
47455
|
-
const cli =
|
|
47463
|
+
const cli = import_node_path80.default.join(import_node_path80.default.dirname(autolinker), "bin/expo-modules-autolinking.js");
|
|
47456
47464
|
const flags = autolinkerAppleFlags(autolinker, appRoot);
|
|
47457
47465
|
const appManifest = JSON.parse(
|
|
47458
|
-
import_node_fs82.default.readFileSync(
|
|
47466
|
+
import_node_fs82.default.readFileSync(import_node_path80.default.join(appRoot, "package.json"), "utf8")
|
|
47459
47467
|
);
|
|
47460
47468
|
const expoConfig = appManifest && typeof appManifest === "object" ? Reflect.get(appManifest, "expo") : null;
|
|
47461
47469
|
const autolinking = expoConfig && typeof expoConfig === "object" ? Reflect.get(expoConfig, "autolinking") : null;
|
|
47462
47470
|
const modulesDir = autolinking && typeof autolinking === "object" ? Reflect.get(autolinking, "nativeModulesDir") : null;
|
|
47463
47471
|
import_node_fs82.default.existsSync(
|
|
47464
|
-
|
|
47472
|
+
import_node_path80.default.resolve(appRoot, typeof modulesDir === "string" ? modulesDir : "modules")
|
|
47465
47473
|
);
|
|
47466
47474
|
const childStart = performance.timeOrigin + performance.now();
|
|
47467
47475
|
const [searched, resolvedModules] = await Promise.allSettled(
|
|
@@ -47487,7 +47495,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47487
47495
|
const resolutions = resolved && typeof resolved === "object" ? Reflect.get(resolved, "modules") : null;
|
|
47488
47496
|
if (!Array.isArray(resolutions)) throw new Error("invalid Expo Apple resolution");
|
|
47489
47497
|
const scan2 = Reflect.get(
|
|
47490
|
-
appRequire(
|
|
47498
|
+
appRequire(import_node_path80.default.join(import_node_path80.default.dirname(autolinker), "build/platforms/apple")),
|
|
47491
47499
|
"scanNativeModulesAsync"
|
|
47492
47500
|
);
|
|
47493
47501
|
const scanned = typeof scan2 === "function" ? await scan2(search, "apple") : null;
|
|
@@ -47575,7 +47583,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47575
47583
|
if (typeof sourceRoot !== "string")
|
|
47576
47584
|
throw new Error("Expo autolinking entry has no path");
|
|
47577
47585
|
const canonical = import_node_fs82.default.realpathSync(sourceRoot);
|
|
47578
|
-
const answered2 = canonical.split(
|
|
47586
|
+
const answered2 = canonical.split(import_node_path80.default.sep).includes("node_modules") && peachAnsweredNativePackages().has(packageName);
|
|
47579
47587
|
if (answered2) {
|
|
47580
47588
|
answeredInstalled = true;
|
|
47581
47589
|
if (installed || prepareNative) {
|
|
@@ -47584,7 +47592,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47584
47592
|
}
|
|
47585
47593
|
}
|
|
47586
47594
|
for (const name3 of ["expo-module.config.json", "unimodule.json"]) {
|
|
47587
|
-
const descriptor =
|
|
47595
|
+
const descriptor = import_node_path80.default.join(canonical, name3);
|
|
47588
47596
|
if (import_node_fs82.default.existsSync(descriptor)) {
|
|
47589
47597
|
import_node_fs82.default.readFileSync(descriptor);
|
|
47590
47598
|
noteChangedSince(descriptor, childStart);
|
|
@@ -47698,10 +47706,10 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47698
47706
|
namespacesSeen.add(namespace);
|
|
47699
47707
|
const files2 = {};
|
|
47700
47708
|
const frameworks = /* @__PURE__ */ new Set();
|
|
47701
|
-
const ios =
|
|
47702
|
-
const appOwned = !canonical.split(
|
|
47703
|
-
const withinApp =
|
|
47704
|
-
const sourceBoundary = appOwned && withinApp !== ".." && !withinApp.startsWith(`..${
|
|
47709
|
+
const ios = import_node_path80.default.join(canonical, "ios");
|
|
47710
|
+
const appOwned = !canonical.split(import_node_path80.default.sep).includes("node_modules");
|
|
47711
|
+
const withinApp = import_node_path80.default.relative(appRoot, canonical);
|
|
47712
|
+
const sourceBoundary = appOwned && withinApp !== ".." && !withinApp.startsWith(`..${import_node_path80.default.sep}`) ? appRoot : canonical;
|
|
47705
47713
|
const boundaryName = sourceBoundary === appRoot ? "app root" : "module root";
|
|
47706
47714
|
const directories2 = /* @__PURE__ */ new Set();
|
|
47707
47715
|
const sources = /* @__PURE__ */ new Set();
|
|
@@ -47715,8 +47723,8 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47715
47723
|
cause
|
|
47716
47724
|
});
|
|
47717
47725
|
}
|
|
47718
|
-
const relative3 =
|
|
47719
|
-
if (relative3 === ".." || relative3.startsWith(`..${
|
|
47726
|
+
const relative3 = import_node_path80.default.relative(sourceBoundary, target);
|
|
47727
|
+
if (relative3 === ".." || relative3.startsWith(`..${import_node_path80.default.sep}`) || import_node_path80.default.isAbsolute(relative3))
|
|
47720
47728
|
throw new Error(
|
|
47721
47729
|
`Expo Swift source escapes ${boundaryName}: ${file} -> ${target}`
|
|
47722
47730
|
);
|
|
@@ -47728,7 +47736,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47728
47736
|
if (directories2.has(directory2)) return;
|
|
47729
47737
|
directories2.add(directory2);
|
|
47730
47738
|
for (const child of import_node_fs82.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
47731
|
-
const file =
|
|
47739
|
+
const file = import_node_path80.default.join(dir, child.name);
|
|
47732
47740
|
const linked = child.isSymbolicLink() ? resolveSource(file) : null;
|
|
47733
47741
|
const target = linked ? import_node_fs82.default.statSync(linked) : child;
|
|
47734
47742
|
if (target.isDirectory()) {
|
|
@@ -47743,7 +47751,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47743
47751
|
if (import_node_fs82.default.statSync(source2).size > 4096 || !/^(?:\s|\/\/[^\n]*|\/\*[\s\S]*?\*\/)*$/.test(
|
|
47744
47752
|
import_node_fs82.default.readFileSync(source2, "utf8")
|
|
47745
47753
|
))
|
|
47746
|
-
nativeSources.add(
|
|
47754
|
+
nativeSources.add(import_node_path80.default.relative(ios, file));
|
|
47747
47755
|
}
|
|
47748
47756
|
if (!target.isFile() || !child.name.endsWith(".swift")) continue;
|
|
47749
47757
|
const source = linked ?? resolveSource(file);
|
|
@@ -47753,7 +47761,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
|
|
|
47753
47761
|
fileCount++;
|
|
47754
47762
|
if (!installedWorkspace && (fileCount > MAX_SWIFT_COMPILE_FILES - 2 || bytes > MAX_SWIFT_COMPILE_SOURCE_BYTES))
|
|
47755
47763
|
throw new Error("Expo Swift sources exceed compile service caps");
|
|
47756
|
-
files2[`Sources/${namespace}/${
|
|
47764
|
+
files2[`Sources/${namespace}/${import_node_path80.default.relative(ios, file).split(import_node_path80.default.sep).join("/")}`] = // CocoaPods' iOS umbrella header imports UIKit into every Swift file
|
|
47757
47765
|
// through the underlying module; these source units have no clang pod.
|
|
47758
47766
|
`import UIKit
|
|
47759
47767
|
#sourceLocation(file: ${JSON.stringify(file)}, line: 1)
|
|
@@ -47768,7 +47776,7 @@ ${import_node_fs82.default.readFileSync(source, "utf8")}`;
|
|
|
47768
47776
|
for (const child of import_node_fs82.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
47769
47777
|
if (child.name.startsWith(".") || child.name === "build" || child.name === "node_modules" || child.name === "android" || child.name === "web" || child.name === "src")
|
|
47770
47778
|
continue;
|
|
47771
|
-
const file =
|
|
47779
|
+
const file = import_node_path80.default.join(dir, child.name);
|
|
47772
47780
|
const linked = child.isSymbolicLink() ? resolveSource(file) : null;
|
|
47773
47781
|
const target = linked ? import_node_fs82.default.statSync(linked) : child;
|
|
47774
47782
|
if (!target.isDirectory()) continue;
|
|
@@ -47801,25 +47809,25 @@ ${import_node_fs82.default.readFileSync(source, "utf8")}`;
|
|
|
47801
47809
|
const absentFrameworks = [];
|
|
47802
47810
|
if (podspec && !installed) {
|
|
47803
47811
|
const declared = [
|
|
47804
|
-
...import_node_fs82.default.readFileSync(
|
|
47812
|
+
...import_node_fs82.default.readFileSync(import_node_path80.default.join(ios, podspec), "utf8").matchAll(/\bvendored_frameworks\s*=\s*(\[[^\]]*\]|'[^'\n]*'|"[^"\n]*")/g)
|
|
47805
47813
|
].flatMap(
|
|
47806
47814
|
([, value]) => [...value.matchAll(/'([^'\n]*)'|"([^"\n#]*)"/g)].map(
|
|
47807
47815
|
(match) => match[1] ?? match[2]
|
|
47808
47816
|
)
|
|
47809
47817
|
);
|
|
47810
47818
|
for (const entry2 of declared) {
|
|
47811
|
-
const base =
|
|
47819
|
+
const base = import_node_path80.default.dirname(import_node_path80.default.resolve(ios, entry2));
|
|
47812
47820
|
const name3 = new RegExp(
|
|
47813
|
-
`^${
|
|
47821
|
+
`^${import_node_path80.default.basename(entry2).replace(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("*", "[^/]*")}$`
|
|
47814
47822
|
);
|
|
47815
47823
|
const found = import_node_fs82.default.existsSync(base) ? import_node_fs82.default.readdirSync(base).filter((child) => name3.test(child)) : [];
|
|
47816
47824
|
if (found.length === 0)
|
|
47817
|
-
absentFrameworks.push(
|
|
47818
|
-
for (const child of found) frameworks.add(resolveSource(
|
|
47825
|
+
absentFrameworks.push(import_node_path80.default.relative(appRoot, import_node_path80.default.resolve(ios, entry2)));
|
|
47826
|
+
for (const child of found) frameworks.add(resolveSource(import_node_path80.default.join(base, child)));
|
|
47819
47827
|
}
|
|
47820
47828
|
}
|
|
47821
47829
|
const podspecFloor = podspec ? /\.platforms\s*=\s*\{\s*:ios\s*=>\s*['"](\d+(?:\.\d+){0,2})['"]/.exec(
|
|
47822
|
-
import_node_fs82.default.readFileSync(
|
|
47830
|
+
import_node_fs82.default.readFileSync(import_node_path80.default.join(ios, podspec), "utf8")
|
|
47823
47831
|
)?.[1] : void 0;
|
|
47824
47832
|
if (dependencyOnly && Object.keys(files2).length > 0) {
|
|
47825
47833
|
dependencyUnits.push({
|
|
@@ -47931,7 +47939,7 @@ ${import_node_fs82.default.readFileSync(source, "utf8")}`;
|
|
|
47931
47939
|
if (directories !== void 0 && directories.length > 0) {
|
|
47932
47940
|
const scanInline = Reflect.get(
|
|
47933
47941
|
appRequire(
|
|
47934
|
-
|
|
47942
|
+
import_node_path80.default.join(import_node_path80.default.dirname(autolinker), "build/inlineModules/inlineModules.js")
|
|
47935
47943
|
),
|
|
47936
47944
|
"getMirrorStateObject"
|
|
47937
47945
|
);
|
|
@@ -47955,14 +47963,14 @@ ${import_node_fs82.default.readFileSync(source, "utf8")}`;
|
|
|
47955
47963
|
const file = entry && typeof entry === "object" ? Reflect.get(entry, "filePath") : null;
|
|
47956
47964
|
if (typeof file !== "string") throw new Error("invalid Expo inline source");
|
|
47957
47965
|
if (!file.endsWith(".swift")) continue;
|
|
47958
|
-
const relative3 =
|
|
47959
|
-
if (relative3 === ".." || relative3.startsWith(`..${
|
|
47966
|
+
const relative3 = import_node_path80.default.relative(appRoot, import_node_fs82.default.realpathSync(file));
|
|
47967
|
+
if (relative3 === ".." || relative3.startsWith(`..${import_node_path80.default.sep}`) || import_node_path80.default.isAbsolute(relative3))
|
|
47960
47968
|
throw new Error(`Expo inline source escapes app root: ${file}`);
|
|
47961
47969
|
bytes += import_node_fs82.default.statSync(file).size;
|
|
47962
47970
|
fileCount++;
|
|
47963
47971
|
if (fileCount > MAX_SWIFT_COMPILE_FILES - 2 || bytes > MAX_SWIFT_COMPILE_SOURCE_BYTES)
|
|
47964
47972
|
throw new Error("Expo Swift sources exceed compile service caps");
|
|
47965
|
-
appFiles[`Sources/PeachExpoApp/Inline/${relative3.split(
|
|
47973
|
+
appFiles[`Sources/PeachExpoApp/Inline/${relative3.split(import_node_path80.default.sep).join("/")}`] = `import UIKit
|
|
47966
47974
|
#sourceLocation(file: ${JSON.stringify(file)}, line: 1)
|
|
47967
47975
|
${import_node_fs82.default.readFileSync(file, "utf8")}`;
|
|
47968
47976
|
}
|
|
@@ -48201,13 +48209,13 @@ function expoUnitAppPaths(unit2) {
|
|
|
48201
48209
|
});
|
|
48202
48210
|
}
|
|
48203
48211
|
function expoSwiftPackage(appKey, name3) {
|
|
48204
|
-
return
|
|
48212
|
+
return import_node_path80.default.join(import_node_os17.default.tmpdir(), "peach-expo-swift", appKey, `p${process.pid}`, name3);
|
|
48205
48213
|
}
|
|
48206
48214
|
var ExpoSwiftLinkRefusal = class extends Error {
|
|
48207
48215
|
};
|
|
48208
48216
|
function failureRecordPath(packagePath) {
|
|
48209
|
-
const app =
|
|
48210
|
-
return
|
|
48217
|
+
const app = import_node_path80.default.dirname(import_node_path80.default.dirname(packagePath));
|
|
48218
|
+
return import_node_path80.default.join(app, `${import_node_path80.default.basename(packagePath)}.failed.json`);
|
|
48211
48219
|
}
|
|
48212
48220
|
function readFailedCompilation(packagePath) {
|
|
48213
48221
|
let record2;
|
|
@@ -48319,7 +48327,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
48319
48327
|
packagePath,
|
|
48320
48328
|
new Map(
|
|
48321
48329
|
Object.entries(files2).map(([name3, source]) => [
|
|
48322
|
-
|
|
48330
|
+
import_node_path80.default.join(packagePath, name3),
|
|
48323
48331
|
source
|
|
48324
48332
|
])
|
|
48325
48333
|
)
|
|
@@ -48394,16 +48402,16 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
48394
48402
|
options.iosTarget
|
|
48395
48403
|
);
|
|
48396
48404
|
signal.throwIfAborted();
|
|
48397
|
-
const ios =
|
|
48398
|
-
if ([ios,
|
|
48405
|
+
const ios = import_node_path80.default.join(root, "ios");
|
|
48406
|
+
if ([ios, import_node_path80.default.join(ios, "Pods")].some(
|
|
48399
48407
|
(dir) => import_node_fs82.default.existsSync(dir) && import_node_fs82.default.readdirSync(dir).some((entry) => {
|
|
48400
|
-
const project =
|
|
48408
|
+
const project = import_node_path80.default.join(dir, entry, "project.pbxproj");
|
|
48401
48409
|
return entry.endsWith(".xcodeproj") && import_node_fs82.default.existsSync(project) && import_node_fs82.default.readFileSync(project, "utf8").includes("XCRemoteSwiftPackageReference");
|
|
48402
48410
|
})
|
|
48403
48411
|
))
|
|
48404
48412
|
await ensureSwiftToolchain(signal);
|
|
48405
48413
|
let bridge = options.only ? null : collectBridgeModuleSources(import_node_fs82.default.realpathSync(root), signal);
|
|
48406
|
-
if (nativeWorkspaceAvailable() && import_node_fs82.default.existsSync(
|
|
48414
|
+
if (nativeWorkspaceAvailable() && import_node_fs82.default.existsSync(import_node_path80.default.join(root, "ios", "Podfile")) && bridge?.units.some(
|
|
48407
48415
|
(unit2) => unit2.nativeTargets?.some((target) => target.bridgingHeader)
|
|
48408
48416
|
)) {
|
|
48409
48417
|
const prepared = await prepareExpoNativeWorkspace(root, signal, options.iosTarget);
|
|
@@ -48481,16 +48489,16 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
48481
48489
|
const module2 = await resolveSwiftModule({ signal });
|
|
48482
48490
|
signal.throwIfAborted();
|
|
48483
48491
|
const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
|
|
48484
|
-
const projectRoot = options.installedWorkspace ?
|
|
48485
|
-
const reactNativeRoot =
|
|
48486
|
-
(0, import_node_module8.createRequire)(
|
|
48492
|
+
const projectRoot = options.installedWorkspace ? import_node_path80.default.dirname(import_node_path80.default.dirname(options.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options.iosTarget)).app;
|
|
48493
|
+
const reactNativeRoot = import_node_path80.default.dirname(
|
|
48494
|
+
(0, import_node_module8.createRequire)(import_node_path80.default.join(projectRoot, "package.json")).resolve(
|
|
48487
48495
|
"react-native/package.json"
|
|
48488
48496
|
)
|
|
48489
48497
|
);
|
|
48490
48498
|
await prepareTurboSourceDependencies(reactNativeRoot);
|
|
48491
48499
|
import_node_fs82.default.mkdirSync(swiftCacheDir(), { recursive: true });
|
|
48492
48500
|
const codegenDir = import_node_fs82.default.mkdtempSync(
|
|
48493
|
-
|
|
48501
|
+
import_node_path80.default.join(swiftCacheDir(), "expo-react-codegen-")
|
|
48494
48502
|
);
|
|
48495
48503
|
const collection = await collectTurboSources({
|
|
48496
48504
|
appRoot: projectRoot,
|
|
@@ -48501,7 +48509,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
48501
48509
|
reactNativeProvider: true
|
|
48502
48510
|
});
|
|
48503
48511
|
const headers = /* @__PURE__ */ new Map();
|
|
48504
|
-
const reactRoot = import_node_fs82.default.realpathSync(reactNativeRoot) +
|
|
48512
|
+
const reactRoot = import_node_fs82.default.realpathSync(reactNativeRoot) + import_node_path80.default.sep;
|
|
48505
48513
|
for (const { file, source } of collection.sources) {
|
|
48506
48514
|
if (!/\.(?:h|hh|hpp|hxx)$/.test(file) || !source.startsWith(reactRoot))
|
|
48507
48515
|
continue;
|
|
@@ -48561,7 +48569,7 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
48561
48569
|
const binaries = await Promise.all(
|
|
48562
48570
|
unit2.frameworks.map(async (dir) => {
|
|
48563
48571
|
const binary2 = {
|
|
48564
|
-
target:
|
|
48572
|
+
target: import_node_path80.default.basename(dir).replace(/\.(xcframework|framework)$/, ""),
|
|
48565
48573
|
source: dir,
|
|
48566
48574
|
url: null,
|
|
48567
48575
|
checksum: null,
|