peachsim 0.1.2260 → 0.1.2261
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/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 +328 -289
- 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 +1 -1
- 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 +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/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 +1 -1
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- 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 +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/bundle-channel.mjs +7 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2261 | (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;
|
|
@@ -3338,17 +3338,17 @@ function visit(node, visitor) {
|
|
|
3338
3338
|
} else
|
|
3339
3339
|
visit_(null, node, visitor_, Object.freeze([]));
|
|
3340
3340
|
}
|
|
3341
|
-
function visit_(key2, node, visitor,
|
|
3342
|
-
const ctrl = callVisitor(key2, node, visitor,
|
|
3341
|
+
function visit_(key2, node, visitor, path101) {
|
|
3342
|
+
const ctrl = callVisitor(key2, node, visitor, path101);
|
|
3343
3343
|
if (isNode(ctrl) || isPair(ctrl)) {
|
|
3344
|
-
replaceNode(key2,
|
|
3345
|
-
return visit_(key2, ctrl, visitor,
|
|
3344
|
+
replaceNode(key2, path101, ctrl);
|
|
3345
|
+
return visit_(key2, ctrl, visitor, path101);
|
|
3346
3346
|
}
|
|
3347
3347
|
if (typeof ctrl !== "symbol") {
|
|
3348
3348
|
if (isCollection(node)) {
|
|
3349
|
-
|
|
3349
|
+
path101 = Object.freeze(path101.concat(node));
|
|
3350
3350
|
for (let i = 0; i < node.items.length; ++i) {
|
|
3351
|
-
const ci = visit_(i, node.items[i], visitor,
|
|
3351
|
+
const ci = visit_(i, node.items[i], visitor, path101);
|
|
3352
3352
|
if (typeof ci === "number")
|
|
3353
3353
|
i = ci - 1;
|
|
3354
3354
|
else if (ci === BREAK)
|
|
@@ -3359,13 +3359,13 @@ function visit_(key2, node, visitor, path100) {
|
|
|
3359
3359
|
}
|
|
3360
3360
|
}
|
|
3361
3361
|
} else if (isPair(node)) {
|
|
3362
|
-
|
|
3363
|
-
const ck = visit_("key", node.key, visitor,
|
|
3362
|
+
path101 = Object.freeze(path101.concat(node));
|
|
3363
|
+
const ck = visit_("key", node.key, visitor, path101);
|
|
3364
3364
|
if (ck === BREAK)
|
|
3365
3365
|
return BREAK;
|
|
3366
3366
|
else if (ck === REMOVE)
|
|
3367
3367
|
node.key = null;
|
|
3368
|
-
const cv = visit_("value", node.value, visitor,
|
|
3368
|
+
const cv = visit_("value", node.value, visitor, path101);
|
|
3369
3369
|
if (cv === BREAK)
|
|
3370
3370
|
return BREAK;
|
|
3371
3371
|
else if (cv === REMOVE)
|
|
@@ -3383,17 +3383,17 @@ async function visitAsync(node, visitor) {
|
|
|
3383
3383
|
} else
|
|
3384
3384
|
await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
3385
3385
|
}
|
|
3386
|
-
async function visitAsync_(key2, node, visitor,
|
|
3387
|
-
const ctrl = await callVisitor(key2, node, visitor,
|
|
3386
|
+
async function visitAsync_(key2, node, visitor, path101) {
|
|
3387
|
+
const ctrl = await callVisitor(key2, node, visitor, path101);
|
|
3388
3388
|
if (isNode(ctrl) || isPair(ctrl)) {
|
|
3389
|
-
replaceNode(key2,
|
|
3390
|
-
return visitAsync_(key2, ctrl, visitor,
|
|
3389
|
+
replaceNode(key2, path101, ctrl);
|
|
3390
|
+
return visitAsync_(key2, ctrl, visitor, path101);
|
|
3391
3391
|
}
|
|
3392
3392
|
if (typeof ctrl !== "symbol") {
|
|
3393
3393
|
if (isCollection(node)) {
|
|
3394
|
-
|
|
3394
|
+
path101 = Object.freeze(path101.concat(node));
|
|
3395
3395
|
for (let i = 0; i < node.items.length; ++i) {
|
|
3396
|
-
const ci = await visitAsync_(i, node.items[i], visitor,
|
|
3396
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path101);
|
|
3397
3397
|
if (typeof ci === "number")
|
|
3398
3398
|
i = ci - 1;
|
|
3399
3399
|
else if (ci === BREAK)
|
|
@@ -3404,13 +3404,13 @@ async function visitAsync_(key2, node, visitor, path100) {
|
|
|
3404
3404
|
}
|
|
3405
3405
|
}
|
|
3406
3406
|
} else if (isPair(node)) {
|
|
3407
|
-
|
|
3408
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
3407
|
+
path101 = Object.freeze(path101.concat(node));
|
|
3408
|
+
const ck = await visitAsync_("key", node.key, visitor, path101);
|
|
3409
3409
|
if (ck === BREAK)
|
|
3410
3410
|
return BREAK;
|
|
3411
3411
|
else if (ck === REMOVE)
|
|
3412
3412
|
node.key = null;
|
|
3413
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
3413
|
+
const cv = await visitAsync_("value", node.value, visitor, path101);
|
|
3414
3414
|
if (cv === BREAK)
|
|
3415
3415
|
return BREAK;
|
|
3416
3416
|
else if (cv === REMOVE)
|
|
@@ -3437,23 +3437,23 @@ function initVisitor(visitor) {
|
|
|
3437
3437
|
}
|
|
3438
3438
|
return visitor;
|
|
3439
3439
|
}
|
|
3440
|
-
function callVisitor(key2, node, visitor,
|
|
3440
|
+
function callVisitor(key2, node, visitor, path101) {
|
|
3441
3441
|
if (typeof visitor === "function")
|
|
3442
|
-
return visitor(key2, node,
|
|
3442
|
+
return visitor(key2, node, path101);
|
|
3443
3443
|
if (isMap(node))
|
|
3444
|
-
return visitor.Map?.(key2, node,
|
|
3444
|
+
return visitor.Map?.(key2, node, path101);
|
|
3445
3445
|
if (isSeq(node))
|
|
3446
|
-
return visitor.Seq?.(key2, node,
|
|
3446
|
+
return visitor.Seq?.(key2, node, path101);
|
|
3447
3447
|
if (isPair(node))
|
|
3448
|
-
return visitor.Pair?.(key2, node,
|
|
3448
|
+
return visitor.Pair?.(key2, node, path101);
|
|
3449
3449
|
if (isScalar(node))
|
|
3450
|
-
return visitor.Scalar?.(key2, node,
|
|
3450
|
+
return visitor.Scalar?.(key2, node, path101);
|
|
3451
3451
|
if (isAlias(node))
|
|
3452
|
-
return visitor.Alias?.(key2, node,
|
|
3452
|
+
return visitor.Alias?.(key2, node, path101);
|
|
3453
3453
|
return void 0;
|
|
3454
3454
|
}
|
|
3455
|
-
function replaceNode(key2,
|
|
3456
|
-
const parent =
|
|
3455
|
+
function replaceNode(key2, path101, node) {
|
|
3456
|
+
const parent = path101[path101.length - 1];
|
|
3457
3457
|
if (isCollection(parent)) {
|
|
3458
3458
|
parent.items[key2] = node;
|
|
3459
3459
|
} else if (isPair(parent)) {
|
|
@@ -4053,10 +4053,10 @@ var init_createNode = __esm({
|
|
|
4053
4053
|
});
|
|
4054
4054
|
|
|
4055
4055
|
// ../../node_modules/yaml/browser/dist/nodes/Collection.js
|
|
4056
|
-
function collectionFromPath(schema4,
|
|
4056
|
+
function collectionFromPath(schema4, path101, value) {
|
|
4057
4057
|
let v6 = value;
|
|
4058
|
-
for (let i =
|
|
4059
|
-
const k =
|
|
4058
|
+
for (let i = path101.length - 1; i >= 0; --i) {
|
|
4059
|
+
const k = path101[i];
|
|
4060
4060
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
4061
4061
|
const a = [];
|
|
4062
4062
|
a[k] = v6;
|
|
@@ -4081,7 +4081,7 @@ var init_Collection = __esm({
|
|
|
4081
4081
|
init_createNode();
|
|
4082
4082
|
init_identity();
|
|
4083
4083
|
init_Node();
|
|
4084
|
-
isEmptyPath = (
|
|
4084
|
+
isEmptyPath = (path101) => path101 == null || typeof path101 === "object" && !!path101[Symbol.iterator]().next().done;
|
|
4085
4085
|
Collection = class extends NodeBase {
|
|
4086
4086
|
constructor(type, schema4) {
|
|
4087
4087
|
super(type);
|
|
@@ -4111,11 +4111,11 @@ var init_Collection = __esm({
|
|
|
4111
4111
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
4112
4112
|
* that already exists in the map.
|
|
4113
4113
|
*/
|
|
4114
|
-
addIn(
|
|
4115
|
-
if (isEmptyPath(
|
|
4114
|
+
addIn(path101, value) {
|
|
4115
|
+
if (isEmptyPath(path101))
|
|
4116
4116
|
this.add(value);
|
|
4117
4117
|
else {
|
|
4118
|
-
const [key2, ...rest] =
|
|
4118
|
+
const [key2, ...rest] = path101;
|
|
4119
4119
|
const node = this.get(key2, true);
|
|
4120
4120
|
if (isCollection(node))
|
|
4121
4121
|
node.addIn(rest, value);
|
|
@@ -4129,8 +4129,8 @@ var init_Collection = __esm({
|
|
|
4129
4129
|
* Removes a value from the collection.
|
|
4130
4130
|
* @returns `true` if the item was found and removed.
|
|
4131
4131
|
*/
|
|
4132
|
-
deleteIn(
|
|
4133
|
-
const [key2, ...rest] =
|
|
4132
|
+
deleteIn(path101) {
|
|
4133
|
+
const [key2, ...rest] = path101;
|
|
4134
4134
|
if (rest.length === 0)
|
|
4135
4135
|
return this.delete(key2);
|
|
4136
4136
|
const node = this.get(key2, true);
|
|
@@ -4144,8 +4144,8 @@ var init_Collection = __esm({
|
|
|
4144
4144
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
4145
4145
|
* `true` (collections are always returned intact).
|
|
4146
4146
|
*/
|
|
4147
|
-
getIn(
|
|
4148
|
-
const [key2, ...rest] =
|
|
4147
|
+
getIn(path101, keepScalar) {
|
|
4148
|
+
const [key2, ...rest] = path101;
|
|
4149
4149
|
const node = this.get(key2, true);
|
|
4150
4150
|
if (rest.length === 0)
|
|
4151
4151
|
return !keepScalar && isScalar(node) ? node.value : node;
|
|
@@ -4163,8 +4163,8 @@ var init_Collection = __esm({
|
|
|
4163
4163
|
/**
|
|
4164
4164
|
* Checks if the collection includes a value with the key `key`.
|
|
4165
4165
|
*/
|
|
4166
|
-
hasIn(
|
|
4167
|
-
const [key2, ...rest] =
|
|
4166
|
+
hasIn(path101) {
|
|
4167
|
+
const [key2, ...rest] = path101;
|
|
4168
4168
|
if (rest.length === 0)
|
|
4169
4169
|
return this.has(key2);
|
|
4170
4170
|
const node = this.get(key2, true);
|
|
@@ -4174,8 +4174,8 @@ var init_Collection = __esm({
|
|
|
4174
4174
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
4175
4175
|
* boolean to add/remove the item from the set.
|
|
4176
4176
|
*/
|
|
4177
|
-
setIn(
|
|
4178
|
-
const [key2, ...rest] =
|
|
4177
|
+
setIn(path101, value) {
|
|
4178
|
+
const [key2, ...rest] = path101;
|
|
4179
4179
|
if (rest.length === 0) {
|
|
4180
4180
|
this.set(key2, value);
|
|
4181
4181
|
} else {
|
|
@@ -6609,9 +6609,9 @@ var init_Document = __esm({
|
|
|
6609
6609
|
this.contents.add(value);
|
|
6610
6610
|
}
|
|
6611
6611
|
/** Adds a value to the document. */
|
|
6612
|
-
addIn(
|
|
6612
|
+
addIn(path101, value) {
|
|
6613
6613
|
if (assertCollection(this.contents))
|
|
6614
|
-
this.contents.addIn(
|
|
6614
|
+
this.contents.addIn(path101, value);
|
|
6615
6615
|
}
|
|
6616
6616
|
/**
|
|
6617
6617
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -6686,14 +6686,14 @@ var init_Document = __esm({
|
|
|
6686
6686
|
* Removes a value from the document.
|
|
6687
6687
|
* @returns `true` if the item was found and removed.
|
|
6688
6688
|
*/
|
|
6689
|
-
deleteIn(
|
|
6690
|
-
if (isEmptyPath(
|
|
6689
|
+
deleteIn(path101) {
|
|
6690
|
+
if (isEmptyPath(path101)) {
|
|
6691
6691
|
if (this.contents == null)
|
|
6692
6692
|
return false;
|
|
6693
6693
|
this.contents = null;
|
|
6694
6694
|
return true;
|
|
6695
6695
|
}
|
|
6696
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
6696
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path101) : false;
|
|
6697
6697
|
}
|
|
6698
6698
|
/**
|
|
6699
6699
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -6708,10 +6708,10 @@ var init_Document = __esm({
|
|
|
6708
6708
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
6709
6709
|
* `true` (collections are always returned intact).
|
|
6710
6710
|
*/
|
|
6711
|
-
getIn(
|
|
6712
|
-
if (isEmptyPath(
|
|
6711
|
+
getIn(path101, keepScalar) {
|
|
6712
|
+
if (isEmptyPath(path101))
|
|
6713
6713
|
return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
|
|
6714
|
-
return isCollection(this.contents) ? this.contents.getIn(
|
|
6714
|
+
return isCollection(this.contents) ? this.contents.getIn(path101, keepScalar) : void 0;
|
|
6715
6715
|
}
|
|
6716
6716
|
/**
|
|
6717
6717
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -6722,10 +6722,10 @@ var init_Document = __esm({
|
|
|
6722
6722
|
/**
|
|
6723
6723
|
* Checks if the document includes a value at `path`.
|
|
6724
6724
|
*/
|
|
6725
|
-
hasIn(
|
|
6726
|
-
if (isEmptyPath(
|
|
6725
|
+
hasIn(path101) {
|
|
6726
|
+
if (isEmptyPath(path101))
|
|
6727
6727
|
return this.contents !== void 0;
|
|
6728
|
-
return isCollection(this.contents) ? this.contents.hasIn(
|
|
6728
|
+
return isCollection(this.contents) ? this.contents.hasIn(path101) : false;
|
|
6729
6729
|
}
|
|
6730
6730
|
/**
|
|
6731
6731
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -6742,13 +6742,13 @@ var init_Document = __esm({
|
|
|
6742
6742
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
6743
6743
|
* boolean to add/remove the item from the set.
|
|
6744
6744
|
*/
|
|
6745
|
-
setIn(
|
|
6746
|
-
if (isEmptyPath(
|
|
6745
|
+
setIn(path101, value) {
|
|
6746
|
+
if (isEmptyPath(path101)) {
|
|
6747
6747
|
this.contents = value;
|
|
6748
6748
|
} else if (this.contents == null) {
|
|
6749
|
-
this.contents = collectionFromPath(this.schema, Array.from(
|
|
6749
|
+
this.contents = collectionFromPath(this.schema, Array.from(path101), value);
|
|
6750
6750
|
} else if (assertCollection(this.contents)) {
|
|
6751
|
-
this.contents.setIn(
|
|
6751
|
+
this.contents.setIn(path101, value);
|
|
6752
6752
|
}
|
|
6753
6753
|
}
|
|
6754
6754
|
/**
|
|
@@ -8653,15 +8653,15 @@ function visit2(cst, visitor) {
|
|
|
8653
8653
|
cst = { start: cst.start, value: cst.value };
|
|
8654
8654
|
_visit(Object.freeze([]), cst, visitor);
|
|
8655
8655
|
}
|
|
8656
|
-
function _visit(
|
|
8657
|
-
let ctrl = visitor(item,
|
|
8656
|
+
function _visit(path101, item, visitor) {
|
|
8657
|
+
let ctrl = visitor(item, path101);
|
|
8658
8658
|
if (typeof ctrl === "symbol")
|
|
8659
8659
|
return ctrl;
|
|
8660
8660
|
for (const field of ["key", "value"]) {
|
|
8661
8661
|
const token = item[field];
|
|
8662
8662
|
if (token && "items" in token) {
|
|
8663
8663
|
for (let i = 0; i < token.items.length; ++i) {
|
|
8664
|
-
const ci = _visit(Object.freeze(
|
|
8664
|
+
const ci = _visit(Object.freeze(path101.concat([[field, i]])), token.items[i], visitor);
|
|
8665
8665
|
if (typeof ci === "number")
|
|
8666
8666
|
i = ci - 1;
|
|
8667
8667
|
else if (ci === BREAK2)
|
|
@@ -8672,10 +8672,10 @@ function _visit(path100, item, visitor) {
|
|
|
8672
8672
|
}
|
|
8673
8673
|
}
|
|
8674
8674
|
if (typeof ctrl === "function" && field === "key")
|
|
8675
|
-
ctrl = ctrl(item,
|
|
8675
|
+
ctrl = ctrl(item, path101);
|
|
8676
8676
|
}
|
|
8677
8677
|
}
|
|
8678
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
8678
|
+
return typeof ctrl === "function" ? ctrl(item, path101) : ctrl;
|
|
8679
8679
|
}
|
|
8680
8680
|
var BREAK2, SKIP2, REMOVE2;
|
|
8681
8681
|
var init_cst_visit = __esm({
|
|
@@ -8686,9 +8686,9 @@ var init_cst_visit = __esm({
|
|
|
8686
8686
|
visit2.BREAK = BREAK2;
|
|
8687
8687
|
visit2.SKIP = SKIP2;
|
|
8688
8688
|
visit2.REMOVE = REMOVE2;
|
|
8689
|
-
visit2.itemAtPath = (cst,
|
|
8689
|
+
visit2.itemAtPath = (cst, path101) => {
|
|
8690
8690
|
let item = cst;
|
|
8691
|
-
for (const [field, index] of
|
|
8691
|
+
for (const [field, index] of path101) {
|
|
8692
8692
|
const tok = item?.[field];
|
|
8693
8693
|
if (tok && "items" in tok) {
|
|
8694
8694
|
item = tok.items[index];
|
|
@@ -8697,9 +8697,9 @@ var init_cst_visit = __esm({
|
|
|
8697
8697
|
}
|
|
8698
8698
|
return item;
|
|
8699
8699
|
};
|
|
8700
|
-
visit2.parentCollection = (cst,
|
|
8701
|
-
const parent = visit2.itemAtPath(cst,
|
|
8702
|
-
const field =
|
|
8700
|
+
visit2.parentCollection = (cst, path101) => {
|
|
8701
|
+
const parent = visit2.itemAtPath(cst, path101.slice(0, -1));
|
|
8702
|
+
const field = path101[path101.length - 1][0];
|
|
8703
8703
|
const coll = parent?.[field];
|
|
8704
8704
|
if (coll && "items" in coll)
|
|
8705
8705
|
return coll;
|
|
@@ -10549,8 +10549,8 @@ function metadataValue(value, key2) {
|
|
|
10549
10549
|
if (!value || typeof value !== "object") return void 0;
|
|
10550
10550
|
return Object.getOwnPropertyDescriptor(value, key2)?.value;
|
|
10551
10551
|
}
|
|
10552
|
-
function readProjectJson(
|
|
10553
|
-
const text6 = readProjectMetadata(
|
|
10552
|
+
function readProjectJson(path101, files2 = nodeRepoFileReader) {
|
|
10553
|
+
const text6 = readProjectMetadata(path101, files2);
|
|
10554
10554
|
if (text6 === null) return null;
|
|
10555
10555
|
try {
|
|
10556
10556
|
const value = JSON.parse(text6);
|
|
@@ -11578,8 +11578,8 @@ export *
|
|
|
11578
11578
|
}`;
|
|
11579
11579
|
}
|
|
11580
11580
|
function swiftPackageIdentity(url) {
|
|
11581
|
-
const
|
|
11582
|
-
return (
|
|
11581
|
+
const path101 = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
11582
|
+
return (path101.split("/").pop() ?? path101).replace(/\.git$/, "").toLowerCase();
|
|
11583
11583
|
}
|
|
11584
11584
|
function clangSettingEntries(settings, tool) {
|
|
11585
11585
|
return (settings ?? []).flatMap(
|
|
@@ -12241,14 +12241,14 @@ function addAsset(into, asset) {
|
|
|
12241
12241
|
function checkStack(dir, type, devices) {
|
|
12242
12242
|
const sets = (parent, allowed) => (0, import_node_fs16.readdirSync)(parent, { withFileTypes: true }).flatMap((entry) => {
|
|
12243
12243
|
if (entry.name.startsWith(".") || entry.isFile()) return [];
|
|
12244
|
-
const
|
|
12244
|
+
const path101 = (0, import_node_path14.join)(parent, entry.name);
|
|
12245
12245
|
const extension = (0, import_node_path14.extname)(entry.name);
|
|
12246
12246
|
if (!entry.isDirectory() || !allowed.includes(extension))
|
|
12247
12247
|
return refuse(
|
|
12248
|
-
|
|
12248
|
+
path101,
|
|
12249
12249
|
`image stack content other than ${allowed.join(", ")} is unproven`
|
|
12250
12250
|
);
|
|
12251
|
-
return [{ path:
|
|
12251
|
+
return [{ path: path101, extension }];
|
|
12252
12252
|
});
|
|
12253
12253
|
for (const layer of sets(dir, [`.${type}layer`, ".imageset", ".colorset"])) {
|
|
12254
12254
|
if (layer.extension !== `.${type}layer`) continue;
|
|
@@ -12260,37 +12260,37 @@ function checkStack(dir, type, devices) {
|
|
|
12260
12260
|
function walk(dir, into, devices, extensions) {
|
|
12261
12261
|
for (const entry of (0, import_node_fs16.readdirSync)(dir, { withFileTypes: true })) {
|
|
12262
12262
|
if (entry.name.startsWith(".") || entry.isFile()) continue;
|
|
12263
|
-
const
|
|
12264
|
-
if (!entry.isDirectory()) return refuse(
|
|
12263
|
+
const path101 = (0, import_node_path14.join)(dir, entry.name);
|
|
12264
|
+
if (!entry.isDirectory()) return refuse(path101, "it is neither a file nor a directory");
|
|
12265
12265
|
const extension = (0, import_node_path14.extname)(entry.name).slice(1);
|
|
12266
12266
|
const type = extension.toLowerCase();
|
|
12267
12267
|
const base = entry.name.slice(0, entry.name.length - extension.length - 1);
|
|
12268
12268
|
if (type !== extension && knownTypes.has(type))
|
|
12269
|
-
return refuse(
|
|
12269
|
+
return refuse(path101, "its type extension is not lowercase");
|
|
12270
12270
|
if (type === "colorset" || type === "imageset" || type === "symbolset") {
|
|
12271
12271
|
addAsset(into, {
|
|
12272
12272
|
kind: type === "colorset" ? "color" : "image",
|
|
12273
12273
|
name: base,
|
|
12274
|
-
...assetState(
|
|
12274
|
+
...assetState(path101, type, devices),
|
|
12275
12275
|
extensions,
|
|
12276
|
-
source:
|
|
12276
|
+
source: path101
|
|
12277
12277
|
});
|
|
12278
12278
|
continue;
|
|
12279
12279
|
}
|
|
12280
12280
|
if (silentTypes.has(type)) continue;
|
|
12281
12281
|
if (stackTypes.has(type)) {
|
|
12282
|
-
checkStack(
|
|
12282
|
+
checkStack(path101, type, devices);
|
|
12283
12283
|
continue;
|
|
12284
12284
|
}
|
|
12285
|
-
if (unprovenTypes.has(type)) return refuse(
|
|
12285
|
+
if (unprovenTypes.has(type)) return refuse(path101, `${type} assets are unproven`);
|
|
12286
12286
|
const name3 = type === "spriteatlas" ? base : entry.name;
|
|
12287
|
-
if (!folderProperties((0, import_node_path14.join)(
|
|
12288
|
-
walk(
|
|
12287
|
+
if (!folderProperties((0, import_node_path14.join)(path101, "Contents.json")).namespace) {
|
|
12288
|
+
walk(path101, into, devices, extensions);
|
|
12289
12289
|
continue;
|
|
12290
12290
|
}
|
|
12291
|
-
const child = into.namespaces.get(name3) ?? scope(
|
|
12291
|
+
const child = into.namespaces.get(name3) ?? scope(path101);
|
|
12292
12292
|
into.namespaces.set(name3, child);
|
|
12293
|
-
walk(
|
|
12293
|
+
walk(path101, child, devices, extensions);
|
|
12294
12294
|
}
|
|
12295
12295
|
}
|
|
12296
12296
|
function words(name3) {
|
|
@@ -12337,11 +12337,11 @@ function members(into, kind, prefix, extensions) {
|
|
|
12337
12337
|
const assets2 = /* @__PURE__ */ new Set();
|
|
12338
12338
|
const out = [];
|
|
12339
12339
|
for (const entry of entries) {
|
|
12340
|
-
const
|
|
12340
|
+
const path101 = `${prefix}${entry.name}`;
|
|
12341
12341
|
const source = entry.child ? entry.child.source : entry.asset.source;
|
|
12342
12342
|
if (Array.from(entry.name).some((char) => char.charCodeAt(0) > 127))
|
|
12343
12343
|
refuse(source, "its name is not ASCII");
|
|
12344
|
-
const named = (text7) => `The \\"${escape(
|
|
12344
|
+
const named = (text7) => `The \\"${escape(path101)}\\" ${text7}`;
|
|
12345
12345
|
if (entry.child) {
|
|
12346
12346
|
const text7 = symbol(entry.name, true);
|
|
12347
12347
|
if (!text7)
|
|
@@ -12364,9 +12364,9 @@ function members(into, kind, prefix, extensions) {
|
|
|
12364
12364
|
namespaces.add(text7);
|
|
12365
12365
|
out.push({
|
|
12366
12366
|
type: "namespace",
|
|
12367
|
-
path:
|
|
12367
|
+
path: path101,
|
|
12368
12368
|
symbol: spelled(text7),
|
|
12369
|
-
members: members(entry.child, kind, `${
|
|
12369
|
+
members: members(entry.child, kind, `${path101}/`, extensions)
|
|
12370
12370
|
});
|
|
12371
12371
|
}
|
|
12372
12372
|
continue;
|
|
@@ -12393,7 +12393,7 @@ function members(into, kind, prefix, extensions) {
|
|
|
12393
12393
|
else if (!omitted)
|
|
12394
12394
|
out.push({
|
|
12395
12395
|
type: "asset",
|
|
12396
|
-
path:
|
|
12396
|
+
path: path101,
|
|
12397
12397
|
name: entry.name,
|
|
12398
12398
|
symbol: spelled(text6),
|
|
12399
12399
|
thinnable: asset.thinnable,
|
|
@@ -12674,8 +12674,8 @@ var init_xcode_asset_symbols = __esm({
|
|
|
12674
12674
|
import_node_path14 = require("node:path");
|
|
12675
12675
|
Refusal = class extends Error {
|
|
12676
12676
|
};
|
|
12677
|
-
refuse = (
|
|
12678
|
-
throw new Refusal(`Generated asset symbols are unproven for ${
|
|
12677
|
+
refuse = (path101, reason) => {
|
|
12678
|
+
throw new Refusal(`Generated asset symbols are unproven for ${path101}: ${reason}`);
|
|
12679
12679
|
};
|
|
12680
12680
|
isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12681
12681
|
scope = (source) => ({
|
|
@@ -13121,11 +13121,11 @@ function catalogDigest(directory2) {
|
|
|
13121
13121
|
for (const entry of (0, import_node_fs17.readdirSync)(dir, { withFileTypes: true }).sort(
|
|
13122
13122
|
(a, b) => a.name.localeCompare(b.name)
|
|
13123
13123
|
)) {
|
|
13124
|
-
const
|
|
13125
|
-
if (entry.isDirectory()) walk3(
|
|
13126
|
-
else if (entry.isFile() && (0, import_node_fs17.statSync)(
|
|
13127
|
-
hashes.push([(0, import_node_path15.relative)(directory2,
|
|
13128
|
-
else throw new Error(`Unsupported asset catalog entry: ${
|
|
13124
|
+
const path101 = (0, import_node_path15.join)(dir, entry.name);
|
|
13125
|
+
if (entry.isDirectory()) walk3(path101);
|
|
13126
|
+
else if (entry.isFile() && (0, import_node_fs17.statSync)(path101).size <= 64 * 1024 * 1024)
|
|
13127
|
+
hashes.push([(0, import_node_path15.relative)(directory2, path101), sha2562((0, import_node_fs17.readFileSync)(path101))]);
|
|
13128
|
+
else throw new Error(`Unsupported asset catalog entry: ${path101}`);
|
|
13129
13129
|
}
|
|
13130
13130
|
};
|
|
13131
13131
|
walk3(directory2);
|
|
@@ -13136,7 +13136,7 @@ function symbolSource(plan, root) {
|
|
|
13136
13136
|
const known = symbolTexts.get(key2);
|
|
13137
13137
|
if (known !== void 0) return { status: "source", text: known };
|
|
13138
13138
|
const source = assetSymbolSource(
|
|
13139
|
-
plan.catalogs.map(({ path:
|
|
13139
|
+
plan.catalogs.map(({ path: path101 }) => (0, import_node_path15.join)(root, path101)),
|
|
13140
13140
|
plan.settings
|
|
13141
13141
|
);
|
|
13142
13142
|
if (source.status === "source") symbolTexts.set(key2, source.text);
|
|
@@ -13195,9 +13195,9 @@ function planAssetSymbols(resources, root, settings) {
|
|
|
13195
13195
|
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,7, 1,3,7, 1,2,6 or 1,2,7; this target resolves to "${families}".`
|
|
13196
13196
|
);
|
|
13197
13197
|
const plan = {
|
|
13198
|
-
catalogs: catalogs.map((
|
|
13199
|
-
path:
|
|
13200
|
-
sha256: catalogDigest((0, import_node_path15.join)(root,
|
|
13198
|
+
catalogs: catalogs.map((path101) => ({
|
|
13199
|
+
path: path101,
|
|
13200
|
+
sha256: catalogDigest((0, import_node_path15.join)(root, path101))
|
|
13201
13201
|
})),
|
|
13202
13202
|
settings: { deployment: target, devices, extensions: extensions === "YES" }
|
|
13203
13203
|
};
|
|
@@ -16260,10 +16260,10 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
16260
16260
|
const enclosing = scopes.length > 0 ? scopes[scopes.length - 1].prefix : [];
|
|
16261
16261
|
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] !== "<") {
|
|
16262
16262
|
const name3 = scope2[4];
|
|
16263
|
-
const
|
|
16264
|
-
if (!byPath.has(
|
|
16263
|
+
const path101 = scopeOf(name3, enclosing, false);
|
|
16264
|
+
if (!byPath.has(path101.join(".")) && (path101.length === 1 || byPath.has(path101.slice(0, -1).join(".")))) {
|
|
16265
16265
|
const keptAttrs = [...(scope2[1] ?? "").matchAll(/@\w+(?:\([^)]*\))?/g)].map((attr) => attr[0]).filter((attr) => !attr.startsWith("@objc"));
|
|
16266
|
-
const id = `s:peach-synthesized-${module2}-${
|
|
16266
|
+
const id = `s:peach-synthesized-${module2}-${path101.join(".")}`;
|
|
16267
16267
|
const body = [];
|
|
16268
16268
|
let inner = 1;
|
|
16269
16269
|
let closed = false;
|
|
@@ -16318,15 +16318,15 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
16318
16318
|
symbols.push({
|
|
16319
16319
|
kind: { identifier: "swift.enum" },
|
|
16320
16320
|
identifier: { precise: id },
|
|
16321
|
-
pathComponents:
|
|
16321
|
+
pathComponents: path101,
|
|
16322
16322
|
declarationFragments: fragments,
|
|
16323
16323
|
accessLevel: "public"
|
|
16324
16324
|
});
|
|
16325
|
-
if (
|
|
16325
|
+
if (path101.length > 1)
|
|
16326
16326
|
relationships.push({
|
|
16327
16327
|
kind: "memberOf",
|
|
16328
16328
|
source: id,
|
|
16329
|
-
target: byPath.get(
|
|
16329
|
+
target: byPath.get(path101.slice(0, -1).join("."))
|
|
16330
16330
|
});
|
|
16331
16331
|
for (const kase of cases) {
|
|
16332
16332
|
const memberId = `${id}-${kase.leaf}`;
|
|
@@ -16335,7 +16335,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
16335
16335
|
symbols.push({
|
|
16336
16336
|
kind: { identifier: "swift.enum.case" },
|
|
16337
16337
|
identifier: { precise: memberId },
|
|
16338
|
-
pathComponents: [...
|
|
16338
|
+
pathComponents: [...path101, kase.leaf],
|
|
16339
16339
|
declarationFragments: [
|
|
16340
16340
|
{ kind: "keyword", spelling: "case" },
|
|
16341
16341
|
{ kind: "text", spelling: " " },
|
|
@@ -16351,7 +16351,7 @@ function synthesizedInterfaceEnums(interfaceText, module2, graphs) {
|
|
|
16351
16351
|
symbols.push({
|
|
16352
16352
|
kind: { identifier: "swift.init" },
|
|
16353
16353
|
identifier: { precise: initId },
|
|
16354
|
-
pathComponents: [...
|
|
16354
|
+
pathComponents: [...path101, "init(rawValue:)"],
|
|
16355
16355
|
declarationFragments: [
|
|
16356
16356
|
{ kind: "keyword", spelling: "init" },
|
|
16357
16357
|
{ kind: "text", spelling: "?(" },
|
|
@@ -16420,7 +16420,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16420
16420
|
})
|
|
16421
16421
|
)
|
|
16422
16422
|
);
|
|
16423
|
-
const trap = (
|
|
16423
|
+
const trap = (path101) => `fatalError("${path101} is ${options.placeholder === void 0 ? "a binary framework" : "a placeholder"} peach cannot run")`;
|
|
16424
16424
|
const skipped = [];
|
|
16425
16425
|
const behavior = options.behavior ?? /* @__PURE__ */ new Map();
|
|
16426
16426
|
const used = /* @__PURE__ */ new Set();
|
|
@@ -16770,34 +16770,34 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16770
16770
|
lines.push(...physical);
|
|
16771
16771
|
owners.push(...physical.map(() => current2));
|
|
16772
16772
|
};
|
|
16773
|
-
const emitAt = (
|
|
16774
|
-
if (omit.has(
|
|
16773
|
+
const emitAt = (path101, line) => {
|
|
16774
|
+
if (omit.has(path101)) return;
|
|
16775
16775
|
const previous = current2;
|
|
16776
|
-
current2 =
|
|
16776
|
+
current2 = path101;
|
|
16777
16777
|
emit(line);
|
|
16778
16778
|
current2 = previous;
|
|
16779
16779
|
};
|
|
16780
16780
|
const emitInertState = (id, indent2, build) => {
|
|
16781
|
-
const
|
|
16781
|
+
const path101 = pathOf(byId.get(id));
|
|
16782
16782
|
emitAt(hiddenInit(id), `${indent2}init(_peachInert: Void) { ${build} }`);
|
|
16783
16783
|
const list2 = conforms.get(id) ?? [];
|
|
16784
16784
|
const has = (name3) => (children.get(id) ?? []).some((member) => leaf(member) === name3);
|
|
16785
16785
|
if (list2.includes("Encodable") && !has("encode(to:)"))
|
|
16786
16786
|
emitAt(
|
|
16787
|
-
`${
|
|
16787
|
+
`${path101}.encode(to:)`,
|
|
16788
16788
|
`${indent2}public func encode(to encoder: Encoder) throws {}`
|
|
16789
16789
|
);
|
|
16790
16790
|
if (list2.includes("Decodable") && !has("init(from:)"))
|
|
16791
16791
|
emitAt(
|
|
16792
|
-
`${
|
|
16792
|
+
`${path101}.init(from:)`,
|
|
16793
16793
|
`${indent2}public init(from decoder: Decoder) throws { self.init(_peachInert: ()) }`
|
|
16794
16794
|
);
|
|
16795
16795
|
};
|
|
16796
16796
|
const scoped = (body) => (symbol2, ...rest) => {
|
|
16797
|
-
const
|
|
16798
|
-
if (omit.has(
|
|
16797
|
+
const path101 = pathOf(symbol2);
|
|
16798
|
+
if (omit.has(path101)) return void skipped.push({ path: path101, reason: omit.get(path101) });
|
|
16799
16799
|
const previous = current2;
|
|
16800
|
-
current2 =
|
|
16800
|
+
current2 = path101;
|
|
16801
16801
|
try {
|
|
16802
16802
|
body(symbol2, ...rest);
|
|
16803
16803
|
} finally {
|
|
@@ -16829,7 +16829,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16829
16829
|
};
|
|
16830
16830
|
const emitMember = scoped(
|
|
16831
16831
|
(member, indent2, context) => {
|
|
16832
|
-
const
|
|
16832
|
+
const path101 = pathOf(member);
|
|
16833
16833
|
if (TYPE_KINDS.has(member.kind.identifier)) {
|
|
16834
16834
|
const origin = origins.get(member.identifier.precise)?.split(".")[0];
|
|
16835
16835
|
const parent = owner.get(member.identifier.precise);
|
|
@@ -16846,7 +16846,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16846
16846
|
))
|
|
16847
16847
|
return;
|
|
16848
16848
|
if (!MEMBER_KINDS.has(member.kind.identifier)) {
|
|
16849
|
-
skipped.push({ path:
|
|
16849
|
+
skipped.push({ path: path101, reason: `unhandled ${member.kind.identifier}` });
|
|
16850
16850
|
return;
|
|
16851
16851
|
}
|
|
16852
16852
|
const { 1: spelledAttrs, 2: rest } = LEADING_ATTRS.exec(text(member));
|
|
@@ -16854,15 +16854,15 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16854
16854
|
/@(\w+)(?:\([^)]*\))?\s*/g,
|
|
16855
16855
|
(attr, name3) => typeByPath.has(name3) ? "" : attr
|
|
16856
16856
|
) : spelledAttrs;
|
|
16857
|
-
const attrs = options.unobjc?.has(
|
|
16857
|
+
const attrs = options.unobjc?.has(path101) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
|
|
16858
16858
|
const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
|
|
16859
16859
|
rest
|
|
16860
16860
|
);
|
|
16861
16861
|
const flags = new Set(
|
|
16862
16862
|
modifiers[1].trim().split(/\s+/).filter(Boolean).map((flag) => flag.replace(/\(.*/, ""))
|
|
16863
16863
|
);
|
|
16864
|
-
const requiredInit = context.inClass && !!options.requiredInits?.has(
|
|
16865
|
-
const restatesRequired = context.inClass &&
|
|
16864
|
+
const requiredInit = context.inClass && !!options.requiredInits?.has(path101);
|
|
16865
|
+
const restatesRequired = context.inClass && path101.endsWith(".init()") && [...superChain(owner.get(member.identifier.precise) ?? "")].some(
|
|
16866
16866
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
16867
16867
|
);
|
|
16868
16868
|
const protocolInit = member.kind.identifier === "swift.init" && /^c:objc\(pl\)\w+\(im\).*::SYNTHESIZED::c:objc\(cs\)/.test(
|
|
@@ -16872,12 +16872,12 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16872
16872
|
const final = context.inClass && flags.has("final") ? "final " : "";
|
|
16873
16873
|
const mutating = flags.has("mutating") ? "mutating " : flags.has("nonmutating") ? "nonmutating " : "";
|
|
16874
16874
|
let core = `${flags.has("convenience") ? "convenience " : ""}${modifiers[2]}`;
|
|
16875
|
-
const override = context.inClass && !options.plain?.has(
|
|
16875
|
+
const override = context.inClass && !options.plain?.has(path101) && !restatesRequired && (flags.has("override") || overrides.has(member.identifier.precise) || options.forcedOverride?.has(path101) || isObjC(member) && path101.endsWith(".init()")) ? "override " : "";
|
|
16876
16876
|
const head = `${indent2}${attrs}${access(member, context.openOwner)} ${required ? "required " : ""}${final}${override}${mutating}`;
|
|
16877
|
-
const measured = behavior.get(
|
|
16878
|
-
if (measured) used.add(
|
|
16877
|
+
const measured = behavior.get(path101);
|
|
16878
|
+
if (measured) used.add(path101);
|
|
16879
16879
|
const overloadBody = /\basync\b/.test(core) ? measured?.asyncBody : /\bResult</.test(core) ? measured?.resultBody : void 0;
|
|
16880
|
-
const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(
|
|
16880
|
+
const body = overloadBody ?? measured?.body ?? (options.inert ? inertBody(member) : trap(path101));
|
|
16881
16881
|
switch (member.kind.identifier) {
|
|
16882
16882
|
case "swift.property":
|
|
16883
16883
|
case "swift.type.property":
|
|
@@ -16890,13 +16890,13 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16890
16890
|
const parameter = !measured && !options.inert && !settable && /:\s*some\s/.test(decl) ? opaqueParameter(member) : void 0;
|
|
16891
16891
|
const getter = parameter ? `return ({ () -> ${parameter} in ${body} })()` : body;
|
|
16892
16892
|
const computed = decl.replace(/^((?:static |class )*)let /, "$1var ");
|
|
16893
|
-
const wrapper = options.projections?.get(
|
|
16893
|
+
const wrapper = options.projections?.get(path101);
|
|
16894
16894
|
if (wrapper) {
|
|
16895
16895
|
const type = /^var\s+`?\w+`?\s*:\s*(.+)$/s.exec(computed)?.[1];
|
|
16896
|
-
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [
|
|
16896
|
+
const initial = type && inertValue(type, /* @__PURE__ */ new Set(), [path101]);
|
|
16897
16897
|
if (!initial)
|
|
16898
16898
|
return void skipped.push({
|
|
16899
|
-
path:
|
|
16899
|
+
path: path101,
|
|
16900
16900
|
reason: `wrapped by ${wrapper} with no inert initial value`
|
|
16901
16901
|
});
|
|
16902
16902
|
const own = new RegExp(
|
|
@@ -16917,7 +16917,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16917
16917
|
return;
|
|
16918
16918
|
}
|
|
16919
16919
|
emit(
|
|
16920
|
-
`${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(
|
|
16920
|
+
`${head}${computed} { get${effects} { ${getter} }${settable && !effects ? ` ${parsed.nonmutating ? "nonmutating " : ""}set { ${measured?.set ?? (options.inert ? "" : trap(path101))} }` : ""} }`
|
|
16921
16921
|
);
|
|
16922
16922
|
return;
|
|
16923
16923
|
}
|
|
@@ -16976,7 +16976,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16976
16976
|
};
|
|
16977
16977
|
const emitType = scoped(
|
|
16978
16978
|
(symbol2, indent2) => {
|
|
16979
|
-
const
|
|
16979
|
+
const path101 = pathOf(symbol2);
|
|
16980
16980
|
const id = symbol2.identifier.precise;
|
|
16981
16981
|
const inner = `${indent2} `;
|
|
16982
16982
|
switch (symbol2.kind.identifier) {
|
|
@@ -16993,10 +16993,10 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
16993
16993
|
case "swift.class": {
|
|
16994
16994
|
const shape = header(symbol2, "class", indent2);
|
|
16995
16995
|
if (!shape)
|
|
16996
|
-
return void skipped.push({ path:
|
|
16997
|
-
const parent = options.superclasses?.get(
|
|
16996
|
+
return void skipped.push({ path: path101, reason: `unparsed class ${text(symbol2)}` });
|
|
16997
|
+
const parent = options.superclasses?.get(path101) ?? superclass.get(id);
|
|
16998
16998
|
const blocked = classBlocked(id);
|
|
16999
|
-
if (blocked) return void skipped.push({ path:
|
|
16999
|
+
if (blocked) return void skipped.push({ path: path101, reason: blocked });
|
|
17000
17000
|
const ancestors = /* @__PURE__ */ new Set();
|
|
17001
17001
|
const inherited = /* @__PURE__ */ new Set();
|
|
17002
17002
|
for (let at = superId.get(id); at; at = superId.get(at)) {
|
|
@@ -17012,7 +17012,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17012
17012
|
"Equatable",
|
|
17013
17013
|
"CustomStringConvertible",
|
|
17014
17014
|
"CustomDebugStringConvertible"
|
|
17015
|
-
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(
|
|
17015
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path101)?.has(name3.split(/::|\./).pop()) && !options.unconformed?.get(path101)?.has(name3)
|
|
17016
17016
|
)
|
|
17017
17017
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
17018
17018
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -17024,9 +17024,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17024
17024
|
`${indent2}${shape.attrs}${objcName ? `@objc(${objcName}) ` : ""}${shape.final}${open ? "open" : "public"} class ${shape.name}${shape.generics}${list2.length ? `: ${list2.join(", ")}` : ""}${selfConforming(shape.where)} {`
|
|
17025
17025
|
);
|
|
17026
17026
|
const members2 = membersOf(id);
|
|
17027
|
-
const extra = options.behavior?.get(
|
|
17027
|
+
const extra = options.behavior?.get(path101)?.members;
|
|
17028
17028
|
if (extra) {
|
|
17029
|
-
used.add(
|
|
17029
|
+
used.add(path101);
|
|
17030
17030
|
emit(`${inner}${extra}`);
|
|
17031
17031
|
}
|
|
17032
17032
|
for (const member of members2)
|
|
@@ -17082,11 +17082,11 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17082
17082
|
if (protocol && member.kind.identifier === "swift.method" && leaf(member).endsWith("()") && have.has(`instance|leaf|${leaf(member).slice(0, -2)}`))
|
|
17083
17083
|
propertyWitnesses.push({
|
|
17084
17084
|
owner: current2,
|
|
17085
|
-
head: `extension ${pathOf(protocol)} where Self: ${
|
|
17085
|
+
head: `extension ${pathOf(protocol)} where Self: ${path101} {`,
|
|
17086
17086
|
member,
|
|
17087
|
-
path:
|
|
17087
|
+
path: path101
|
|
17088
17088
|
});
|
|
17089
|
-
else emitWitness(member, inner,
|
|
17089
|
+
else emitWitness(member, inner, path101, open && isObjC(member));
|
|
17090
17090
|
}
|
|
17091
17091
|
}
|
|
17092
17092
|
if (options.inert && designated2 && classBuild(id) === "hidden")
|
|
@@ -17094,13 +17094,13 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17094
17094
|
const coder = members2.some((member) => leaf(member) === "init(coder:)");
|
|
17095
17095
|
if (designated2 && !coder && externalRoot(id) !== "NSObject" && externalRoot(id) !== null)
|
|
17096
17096
|
emit(
|
|
17097
|
-
`${inner}public required init${options.coderNonfailable?.has(
|
|
17097
|
+
`${inner}public required init${options.coderNonfailable?.has(path101) ? "" : "?"}(coder: NSCoder) { ${options.inert && !options.coderNonfailable?.has(path101) ? "return nil" : trap(`${path101}.init(coder:)`)} }`
|
|
17098
17098
|
);
|
|
17099
17099
|
if (designated2 && !members2.some((member) => leaf(member) === "init()") && [...superChain(id)].some(
|
|
17100
17100
|
(at) => options.requiredInits?.has(`${pathOf(byId.get(at))}.init()`)
|
|
17101
17101
|
))
|
|
17102
17102
|
emit(
|
|
17103
|
-
`${inner}public required init() { ${options.inert ? superInit(id) : trap(`${
|
|
17103
|
+
`${inner}public required init() { ${options.inert ? superInit(id) : trap(`${path101}.init()`)} }`
|
|
17104
17104
|
);
|
|
17105
17105
|
emit(`${indent2}}`);
|
|
17106
17106
|
return;
|
|
@@ -17108,7 +17108,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17108
17108
|
case "swift.struct": {
|
|
17109
17109
|
const shape = header(symbol2, "struct", indent2);
|
|
17110
17110
|
if (!shape)
|
|
17111
|
-
return void skipped.push({ path:
|
|
17111
|
+
return void skipped.push({ path: path101, reason: `unparsed struct ${text(symbol2)}` });
|
|
17112
17112
|
const members2 = membersOf(id);
|
|
17113
17113
|
const raw2 = rawType(members2);
|
|
17114
17114
|
const list2 = inheritance(id);
|
|
@@ -17148,7 +17148,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17148
17148
|
emitInertState(
|
|
17149
17149
|
id,
|
|
17150
17150
|
inner,
|
|
17151
|
-
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [
|
|
17151
|
+
raw2 ? `self.rawValue = ${inertValue(raw2, /* @__PURE__ */ new Set(), [path101]) ?? "0"}` : ""
|
|
17152
17152
|
);
|
|
17153
17153
|
emit(`${indent2}}`);
|
|
17154
17154
|
return;
|
|
@@ -17156,7 +17156,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17156
17156
|
case "swift.enum": {
|
|
17157
17157
|
const shape = header(symbol2, "enum", indent2);
|
|
17158
17158
|
if (!shape)
|
|
17159
|
-
return void skipped.push({ path:
|
|
17159
|
+
return void skipped.push({ path: path101, reason: `unparsed enum ${text(symbol2)}` });
|
|
17160
17160
|
const members2 = membersOf(id);
|
|
17161
17161
|
const cases = members2.filter(
|
|
17162
17162
|
(member) => member.kind.identifier === "swift.enum.case"
|
|
@@ -17166,7 +17166,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17166
17166
|
const missing2 = raw2 ? cases.filter((member) => !values.has(member.identifier.precise)) : [];
|
|
17167
17167
|
if (raw2 && (isObjC(symbol2) || /^c:@C?M@[^@]+@E@/.test(id)) && missing2.length > 0)
|
|
17168
17168
|
return void skipped.push({
|
|
17169
|
-
path:
|
|
17169
|
+
path: path101,
|
|
17170
17170
|
reason: `no header value for ${missing2.map(leaf).join(", ")}`
|
|
17171
17171
|
});
|
|
17172
17172
|
const list2 = inheritance(id, raw2 ?? void 0).filter(
|
|
@@ -17205,8 +17205,8 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17205
17205
|
});
|
|
17206
17206
|
}
|
|
17207
17207
|
if (options.inert) {
|
|
17208
|
-
const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(
|
|
17209
|
-
emitInertState(id, inner, value === null ? trap(
|
|
17208
|
+
const value = options.trapped?.has(hiddenInit(id)) ? null : inertValue(path101, /* @__PURE__ */ new Set(), []);
|
|
17209
|
+
emitInertState(id, inner, value === null ? trap(path101) : `self = ${value}`);
|
|
17210
17210
|
}
|
|
17211
17211
|
emit(`${indent2}}`);
|
|
17212
17212
|
return;
|
|
@@ -17215,14 +17215,14 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17215
17215
|
const shape = header(symbol2, "protocol", indent2);
|
|
17216
17216
|
if (!shape)
|
|
17217
17217
|
return void skipped.push({
|
|
17218
|
-
path:
|
|
17218
|
+
path: path101,
|
|
17219
17219
|
reason: `unparsed protocol ${text(symbol2)}`
|
|
17220
17220
|
});
|
|
17221
17221
|
const native = nativeObjcProtocols.has(id);
|
|
17222
17222
|
const objcName = native ? /^c:objc\(pl\)(\w+)$/.exec(id)?.[1] : void 0;
|
|
17223
17223
|
if (native && !objcName)
|
|
17224
17224
|
return void skipped.push({
|
|
17225
|
-
path:
|
|
17225
|
+
path: path101,
|
|
17226
17226
|
reason: `unknown Objective-C protocol identity ${id}`
|
|
17227
17227
|
});
|
|
17228
17228
|
const list2 = [
|
|
@@ -17250,7 +17250,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17250
17250
|
}
|
|
17251
17251
|
emit(`${indent2}}`);
|
|
17252
17252
|
if (defaults.length > 0) {
|
|
17253
|
-
emit(`${indent2}extension ${
|
|
17253
|
+
emit(`${indent2}extension ${path101} {`);
|
|
17254
17254
|
for (const member of defaults) {
|
|
17255
17255
|
const decl = text(member);
|
|
17256
17256
|
if (optional3.has(member.identifier.precise) && member.kind.identifier === "swift.method" && !decl.replace(/\([^)]*\)/g, "").includes("->") && !/ async\b/.test(decl))
|
|
@@ -17344,7 +17344,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17344
17344
|
return null;
|
|
17345
17345
|
};
|
|
17346
17346
|
const emitGlobal = scoped((symbol2) => {
|
|
17347
|
-
const
|
|
17347
|
+
const path101 = pathOf(symbol2);
|
|
17348
17348
|
const kind = symbol2.kind.identifier;
|
|
17349
17349
|
if (kind === "swift.func" || kind === "swift.func.op" || kind === "swift.method" || kind === "swift.type.method") {
|
|
17350
17350
|
const { 1: attrs, 2: rest } = LEADING_ATTRS.exec(text(symbol2));
|
|
@@ -17353,20 +17353,20 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17353
17353
|
if (leaf(symbol2).endsWith("(_:)") && !/^(?:prefix|infix|postfix)\b/.test(spelled2))
|
|
17354
17354
|
spelled2 = `prefix ${spelled2}`;
|
|
17355
17355
|
}
|
|
17356
|
-
const measured = behavior.get(
|
|
17357
|
-
if (measured) used.add(
|
|
17356
|
+
const measured = behavior.get(path101);
|
|
17357
|
+
if (measured) used.add(path101);
|
|
17358
17358
|
const overloadBody = /\basync\b/.test(spelled2) ? measured?.asyncBody : /\bResult</.test(spelled2) ? measured?.resultBody : void 0;
|
|
17359
17359
|
emit(
|
|
17360
|
-
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(
|
|
17360
|
+
`${attrs}public ${spelled2} { ${overloadBody ?? measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path101))} }`
|
|
17361
17361
|
);
|
|
17362
17362
|
} else if (kind === "swift.var") {
|
|
17363
17363
|
const parsed = splitAccessors(text(symbol2).replace(/^let /, "var "));
|
|
17364
|
-
const measured = behavior.get(
|
|
17365
|
-
if (measured) used.add(
|
|
17364
|
+
const measured = behavior.get(path101);
|
|
17365
|
+
if (measured) used.add(path101);
|
|
17366
17366
|
emit(
|
|
17367
|
-
`public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(
|
|
17367
|
+
`public ${parsed.decl} { ${measured?.body ?? (options.inert ? inertBody(symbol2) : trap(path101))} }`
|
|
17368
17368
|
);
|
|
17369
|
-
} else skipped.push({ path:
|
|
17369
|
+
} else skipped.push({ path: path101, reason: `unhandled top-level ${kind}` });
|
|
17370
17370
|
});
|
|
17371
17371
|
const cExports = new Set(
|
|
17372
17372
|
[...byId.values()].flatMap((symbol2) => {
|
|
@@ -17383,7 +17383,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17383
17383
|
return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
|
|
17384
17384
|
}).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
|
|
17385
17385
|
for (const symbol2 of roots) {
|
|
17386
|
-
const
|
|
17386
|
+
const path101 = pathOf(symbol2);
|
|
17387
17387
|
if (TYPE_KINDS.has(symbol2.kind.identifier)) emitType(symbol2, "");
|
|
17388
17388
|
else emitGlobal(symbol2);
|
|
17389
17389
|
}
|
|
@@ -17444,9 +17444,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
17444
17444
|
"#endif",
|
|
17445
17445
|
""
|
|
17446
17446
|
];
|
|
17447
|
-
for (const
|
|
17448
|
-
if (!used.has(
|
|
17449
|
-
skipped.push({ path:
|
|
17447
|
+
for (const path101 of behavior.keys())
|
|
17448
|
+
if (!used.has(path101))
|
|
17449
|
+
skipped.push({ path: path101, reason: "behavior names no emitted declaration" });
|
|
17450
17450
|
return {
|
|
17451
17451
|
source: `${[...banner, ...lines].join("\n")}
|
|
17452
17452
|
`,
|
|
@@ -19646,9 +19646,9 @@ function originalColumn(line, column) {
|
|
|
19646
19646
|
}
|
|
19647
19647
|
function designTimeDiagnostic(output2, files2) {
|
|
19648
19648
|
const rewritten = /* @__PURE__ */ new Map();
|
|
19649
|
-
const linesOf = (
|
|
19649
|
+
const linesOf = (path101) => {
|
|
19650
19650
|
const file = Object.keys(files2).find(
|
|
19651
|
-
(name3) => name3.endsWith(".swift") && (
|
|
19651
|
+
(name3) => name3.endsWith(".swift") && (path101 === name3 || path101.endsWith(`/${name3}`))
|
|
19652
19652
|
);
|
|
19653
19653
|
if (file === void 0) return null;
|
|
19654
19654
|
let lines = rewritten.get(file);
|
|
@@ -40272,7 +40272,7 @@ function scanLocalNative(appDir, pkg, answered, platform2, knownPackages = /* @_
|
|
|
40272
40272
|
expoModule: moduleDir ? (0, import_node_path59.relative)(appDir, moduleDir) || "." : null,
|
|
40273
40273
|
optional: optional3,
|
|
40274
40274
|
swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
|
|
40275
|
-
(
|
|
40275
|
+
(path101) => path101.endsWith(".swift") && [...(readSmallFile(path101) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
|
|
40276
40276
|
(match) => match[1] === name3
|
|
40277
40277
|
)
|
|
40278
40278
|
) : false,
|
|
@@ -41575,8 +41575,8 @@ function imagesetFiles(images) {
|
|
|
41575
41575
|
];
|
|
41576
41576
|
}).sort((a, b) => a.scale - b.scale);
|
|
41577
41577
|
}
|
|
41578
|
-
function flatScale(
|
|
41579
|
-
const match = /@([23])x\.[^./]+$/.exec(
|
|
41578
|
+
function flatScale(path101) {
|
|
41579
|
+
const match = /@([23])x\.[^./]+$/.exec(path101);
|
|
41580
41580
|
return match ? Number(match[1]) : 1;
|
|
41581
41581
|
}
|
|
41582
41582
|
function providesNamespace(text6) {
|
|
@@ -41603,8 +41603,8 @@ function catalogEntryName(contentsPath, kind, readText2) {
|
|
|
41603
41603
|
}
|
|
41604
41604
|
return segments.join("/");
|
|
41605
41605
|
}
|
|
41606
|
-
function isFlatResourceImage(
|
|
41607
|
-
return
|
|
41606
|
+
function isFlatResourceImage(path101) {
|
|
41607
|
+
return path101.split("/").includes("Resources") && RASTER_EXTENSIONS.has(extOf(path101));
|
|
41608
41608
|
}
|
|
41609
41609
|
function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
|
|
41610
41610
|
const table = [];
|
|
@@ -41617,7 +41617,7 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
|
|
|
41617
41617
|
seen.set(bundlePath, names);
|
|
41618
41618
|
return { bundlePath, names };
|
|
41619
41619
|
};
|
|
41620
|
-
const catalogs = paths.filter((
|
|
41620
|
+
const catalogs = paths.filter((path101) => baseOf(path101) === "Contents.json");
|
|
41621
41621
|
for (const contentsPath of catalogs) {
|
|
41622
41622
|
const name3 = catalogEntryName(contentsPath, ".imageset", readText2);
|
|
41623
41623
|
if (name3 === null) continue;
|
|
@@ -41649,13 +41649,13 @@ function enumerateBundleImages(paths, readText2, bundleForFile = () => ".") {
|
|
|
41649
41649
|
...intent === "template" || intent === "original" ? { renderingMode: intent } : {}
|
|
41650
41650
|
});
|
|
41651
41651
|
}
|
|
41652
|
-
for (const
|
|
41653
|
-
if (!isFlatResourceImage(
|
|
41654
|
-
const name3 = baseOf(
|
|
41655
|
-
const { bundlePath, names } = namesFor(
|
|
41652
|
+
for (const path101 of paths) {
|
|
41653
|
+
if (!isFlatResourceImage(path101)) continue;
|
|
41654
|
+
const name3 = baseOf(path101).slice(0, -extOf(path101).length);
|
|
41655
|
+
const { bundlePath, names } = namesFor(path101);
|
|
41656
41656
|
if (name3 === "" || names.has(name3)) continue;
|
|
41657
41657
|
names.add(name3);
|
|
41658
|
-
table.push({ name: name3, file:
|
|
41658
|
+
table.push({ name: name3, file: path101, scale: flatScale(path101), bundlePath });
|
|
41659
41659
|
}
|
|
41660
41660
|
return table;
|
|
41661
41661
|
}
|
|
@@ -41690,7 +41690,7 @@ function colorsetValue(color) {
|
|
|
41690
41690
|
}
|
|
41691
41691
|
function enumerateBundleColors(paths, readText2) {
|
|
41692
41692
|
const table = {};
|
|
41693
|
-
for (const contentsPath of paths.filter((
|
|
41693
|
+
for (const contentsPath of paths.filter((path101) => baseOf(path101) === "Contents.json")) {
|
|
41694
41694
|
const name3 = catalogEntryName(contentsPath, ".colorset", readText2);
|
|
41695
41695
|
if (name3 === null || name3 in table) continue;
|
|
41696
41696
|
let colors;
|
|
@@ -41754,8 +41754,8 @@ function axisExtremes(points) {
|
|
|
41754
41754
|
function pathBounds(d) {
|
|
41755
41755
|
const xs = [];
|
|
41756
41756
|
const ys = [];
|
|
41757
|
-
for (const
|
|
41758
|
-
(0, import_svgpath.default)(
|
|
41757
|
+
for (const path101 of d)
|
|
41758
|
+
(0, import_svgpath.default)(path101).abs().unshort().unarc().iterate((segment2, _index, x, y) => {
|
|
41759
41759
|
const [command, ...args] = segment2;
|
|
41760
41760
|
if (command === "M" || command === "L") {
|
|
41761
41761
|
xs.push(Number(args[0]));
|
|
@@ -41782,7 +41782,7 @@ function guide(svg, id, axis) {
|
|
|
41782
41782
|
}
|
|
41783
41783
|
function enumerateBundleSymbols(paths, readText2, bundleForFile) {
|
|
41784
41784
|
const table = {};
|
|
41785
|
-
for (const contentsPath of paths.filter((
|
|
41785
|
+
for (const contentsPath of paths.filter((path101) => baseOf(path101) === "Contents.json")) {
|
|
41786
41786
|
const name3 = catalogEntryName(contentsPath, ".symbolset", readText2);
|
|
41787
41787
|
if (name3 === null) continue;
|
|
41788
41788
|
const bundle = bundleForFile(contentsPath);
|
|
@@ -41841,8 +41841,8 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
|
|
|
41841
41841
|
advance,
|
|
41842
41842
|
box: [12 - wide2 / 2, 12 - tall / 2, wide2, tall],
|
|
41843
41843
|
...customLayout ? { customLayout } : {},
|
|
41844
|
-
layers: d.map((
|
|
41845
|
-
d: (0, import_svgpath.default)(
|
|
41844
|
+
layers: d.map((path101) => ({
|
|
41845
|
+
d: (0, import_svgpath.default)(path101).abs().scale(em).translate(translateX, translateY).round(3).toString()
|
|
41846
41846
|
}))
|
|
41847
41847
|
};
|
|
41848
41848
|
table[vectorKey] = vector;
|
|
@@ -41853,21 +41853,21 @@ function enumerateBundleSymbols(paths, readText2, bundleForFile) {
|
|
|
41853
41853
|
}
|
|
41854
41854
|
return table;
|
|
41855
41855
|
}
|
|
41856
|
-
function isCopiedResource(
|
|
41857
|
-
const segments =
|
|
41856
|
+
function isCopiedResource(path101, copiedBundle) {
|
|
41857
|
+
const segments = path101.split("/");
|
|
41858
41858
|
if (segments.some((segment2) => /\.(atlasc|bundle|storyboardc|nib|momd)$/.test(segment2)))
|
|
41859
41859
|
return true;
|
|
41860
41860
|
if (segments.some((segment2) => /\.xcdatamodeld?$/.test(segment2))) return false;
|
|
41861
41861
|
if (copiedBundle) return true;
|
|
41862
|
-
const ext = extOf(
|
|
41862
|
+
const ext = extOf(path101);
|
|
41863
41863
|
if (ext === ".json" || ext === ".xcstrings") return true;
|
|
41864
|
-
return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !
|
|
41864
|
+
return !RASTER_EXTENSIONS.has(ext) && !COMPILED_EXTENSIONS.has(ext) && !path101.split("/").some((segment2) => segment2.endsWith(".xcassets"));
|
|
41865
41865
|
}
|
|
41866
41866
|
function enumerateBundleResources(paths, copiedBundle = false) {
|
|
41867
41867
|
const found = [];
|
|
41868
41868
|
const seen = /* @__PURE__ */ new Set();
|
|
41869
41869
|
const ordered = [...paths].filter(
|
|
41870
|
-
(
|
|
41870
|
+
(path101) => path101.split("/").includes("Resources") && path101.split("/").every((segment2) => segment2 !== "" && segment2 !== "..") && isCopiedResource(path101, copiedBundle)
|
|
41871
41871
|
).sort((a, b) => {
|
|
41872
41872
|
const aDepth = a.split("/").length;
|
|
41873
41873
|
const bDepth = b.split("/").length;
|
|
@@ -42012,31 +42012,31 @@ function tokens(text6) {
|
|
|
42012
42012
|
}
|
|
42013
42013
|
return result;
|
|
42014
42014
|
}
|
|
42015
|
-
function qualified(language, key2,
|
|
42016
|
-
return `(${language}: ${key2}${
|
|
42015
|
+
function qualified(language, key2, path101) {
|
|
42016
|
+
return `(${language}: ${key2}${path101 === "" ? "" : "|==|" + path101})`;
|
|
42017
42017
|
}
|
|
42018
|
-
function requiresNumber(language, key2,
|
|
42018
|
+
function requiresNumber(language, key2, path101) {
|
|
42019
42019
|
return Error(
|
|
42020
|
-
"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,
|
|
42020
|
+
"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, path101)
|
|
42021
42021
|
);
|
|
42022
42022
|
}
|
|
42023
|
-
function moreThanOne(language, key2,
|
|
42023
|
+
function moreThanOne(language, key2, path101) {
|
|
42024
42024
|
return Error(
|
|
42025
|
-
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2,
|
|
42025
|
+
"Cannot infer format specifier for string group because more than one numerical specifier was found " + qualified(language, key2, path101)
|
|
42026
42026
|
);
|
|
42027
42027
|
}
|
|
42028
42028
|
function schemaPath(segments) {
|
|
42029
42029
|
return segments.map((segment2) => `'${segment2}'`).join(" -> ");
|
|
42030
42030
|
}
|
|
42031
|
-
function checkUnitShape(node,
|
|
42031
|
+
function checkUnitShape(node, path101) {
|
|
42032
42032
|
const raw2 = node.stringUnit;
|
|
42033
42033
|
if (raw2 === void 0)
|
|
42034
|
-
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(
|
|
42034
|
+
throw Error(`Missing required key 'stringUnit' inside ${schemaPath(path101)}`);
|
|
42035
42035
|
if (raw2 === null)
|
|
42036
|
-
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(
|
|
42036
|
+
throw Error(`Missing required value for key 'stringUnit' inside ${schemaPath(path101)}`);
|
|
42037
42037
|
if (!isRecord3(raw2))
|
|
42038
|
-
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(
|
|
42039
|
-
const unitPath = [...
|
|
42038
|
+
throw Error(`Expected dictionary for key 'stringUnit' inside ${schemaPath(path101)}`);
|
|
42039
|
+
const unitPath = [...path101, "stringUnit"];
|
|
42040
42040
|
if (!Object.hasOwn(raw2, "state"))
|
|
42041
42041
|
throw Error(`Missing required key 'state' inside ${schemaPath(unitPath)}`);
|
|
42042
42042
|
const state = raw2.state;
|
|
@@ -42053,38 +42053,38 @@ function checkUnitShape(node, path100) {
|
|
|
42053
42053
|
throw Error(`Expected string for key 'value' inside ${schemaPath(unitPath)}`);
|
|
42054
42054
|
return value;
|
|
42055
42055
|
}
|
|
42056
|
-
function checkPluralShape(node,
|
|
42056
|
+
function checkPluralShape(node, path101) {
|
|
42057
42057
|
for (const [category, raw2] of Object.entries(node)) {
|
|
42058
|
-
const categoryPath = [...
|
|
42058
|
+
const categoryPath = [...path101, category];
|
|
42059
42059
|
if (raw2 === null)
|
|
42060
42060
|
throw Error(
|
|
42061
|
-
`Missing required value for key '${category}' inside ${schemaPath(
|
|
42061
|
+
`Missing required value for key '${category}' inside ${schemaPath(path101)}`
|
|
42062
42062
|
);
|
|
42063
42063
|
if (!isRecord3(raw2))
|
|
42064
|
-
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(
|
|
42064
|
+
throw Error(`Expected dictionary for key '${category}' inside ${schemaPath(path101)}`);
|
|
42065
42065
|
checkUnitShape(raw2, categoryPath);
|
|
42066
42066
|
}
|
|
42067
42067
|
}
|
|
42068
|
-
function checkLocalizationShape(node,
|
|
42068
|
+
function checkLocalizationShape(node, path101, deviceValue = false) {
|
|
42069
42069
|
if (node === null)
|
|
42070
42070
|
throw Error(
|
|
42071
|
-
`Missing required value for key '${
|
|
42071
|
+
`Missing required value for key '${path101[path101.length - 1]}' inside ${schemaPath(path101.slice(0, -1))}`
|
|
42072
42072
|
);
|
|
42073
42073
|
if (!isRecord3(node))
|
|
42074
42074
|
throw Error(
|
|
42075
|
-
`Expected dictionary for key '${
|
|
42075
|
+
`Expected dictionary for key '${path101[path101.length - 1]}' inside ${schemaPath(path101.slice(0, -1))}`
|
|
42076
42076
|
);
|
|
42077
|
-
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations,
|
|
42077
|
+
if (Object.hasOwn(node, "variations")) checkVariationsShape(node.variations, path101);
|
|
42078
42078
|
if (!deviceValue && Object.hasOwn(node, "substitutions"))
|
|
42079
|
-
checkSubstitutionsShape(node.substitutions,
|
|
42080
|
-
if (!Object.hasOwn(node, "variations")) checkUnitShape(node,
|
|
42079
|
+
checkSubstitutionsShape(node.substitutions, path101);
|
|
42080
|
+
if (!Object.hasOwn(node, "variations")) checkUnitShape(node, path101);
|
|
42081
42081
|
}
|
|
42082
|
-
function checkVariationsShape(variations,
|
|
42082
|
+
function checkVariationsShape(variations, path101) {
|
|
42083
42083
|
if (variations === null)
|
|
42084
|
-
throw Error(`Missing required value for key 'variations' inside ${schemaPath(
|
|
42084
|
+
throw Error(`Missing required value for key 'variations' inside ${schemaPath(path101)}`);
|
|
42085
42085
|
if (!isRecord3(variations))
|
|
42086
|
-
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(
|
|
42087
|
-
const variationsPath = [...
|
|
42086
|
+
throw Error(`Expected dictionary for key 'variations' inside ${schemaPath(path101)}`);
|
|
42087
|
+
const variationsPath = [...path101, "variations"];
|
|
42088
42088
|
for (const [type, raw2] of Object.entries(variations)) {
|
|
42089
42089
|
if (raw2 === null)
|
|
42090
42090
|
throw Error(
|
|
@@ -42110,11 +42110,11 @@ function checkVariationsShape(variations, path100) {
|
|
|
42110
42110
|
}
|
|
42111
42111
|
}
|
|
42112
42112
|
}
|
|
42113
|
-
function checkSubstitutionsShape(substitutions,
|
|
42113
|
+
function checkSubstitutionsShape(substitutions, path101) {
|
|
42114
42114
|
if (substitutions === null) return;
|
|
42115
42115
|
if (!isRecord3(substitutions))
|
|
42116
|
-
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(
|
|
42117
|
-
const substitutionsPath = [...
|
|
42116
|
+
throw Error(`Expected dictionary for key 'substitutions' inside ${schemaPath(path101)}`);
|
|
42117
|
+
const substitutionsPath = [...path101, "substitutions"];
|
|
42118
42118
|
for (const [name3, raw2] of Object.entries(substitutions)) {
|
|
42119
42119
|
const subPath = [...substitutionsPath, name3];
|
|
42120
42120
|
if (raw2 === null)
|
|
@@ -42156,10 +42156,10 @@ function scanSpecs(forms) {
|
|
|
42156
42156
|
}
|
|
42157
42157
|
return specs;
|
|
42158
42158
|
}
|
|
42159
|
-
function inferPlural(forms, language, key2,
|
|
42159
|
+
function inferPlural(forms, language, key2, path101) {
|
|
42160
42160
|
const specs = scanSpecs(forms);
|
|
42161
|
-
if (specs.size === 0) throw requiresNumber(language, key2,
|
|
42162
|
-
if (specs.size > 1) throw moreThanOne(language, key2,
|
|
42161
|
+
if (specs.size === 0) throw requiresNumber(language, key2, path101);
|
|
42162
|
+
if (specs.size > 1) throw moreThanOne(language, key2, path101);
|
|
42163
42163
|
return [...specs.values()][0] ?? { specifier: "", argument: 0 };
|
|
42164
42164
|
}
|
|
42165
42165
|
function unit(value) {
|
|
@@ -42628,8 +42628,8 @@ function plist3(value, depth) {
|
|
|
42628
42628
|
}
|
|
42629
42629
|
function compileStringCatalog(source, name3) {
|
|
42630
42630
|
return Object.fromEntries(
|
|
42631
|
-
Object.entries(compileCatalogTables(source, name3)).map(([
|
|
42632
|
-
|
|
42631
|
+
Object.entries(compileCatalogTables(source, name3)).map(([path101, table]) => [
|
|
42632
|
+
path101,
|
|
42633
42633
|
'<?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' + plist3(table, 0) + "</plist>\n"
|
|
42634
42634
|
])
|
|
42635
42635
|
);
|
|
@@ -44563,7 +44563,7 @@ function resolveSwiftPackages(options) {
|
|
|
44563
44563
|
headers.set(name3, import_node_path69.default.relative(binary2.dir, dir));
|
|
44564
44564
|
};
|
|
44565
44565
|
visit3(pkg, binary2.target);
|
|
44566
|
-
binary2.headerDependencies = [...headers].map(([module2,
|
|
44566
|
+
binary2.headerDependencies = [...headers].map(([module2, path101]) => ({ module: module2, path: path101 }));
|
|
44567
44567
|
}
|
|
44568
44568
|
for (const owner of options.owners ?? []) {
|
|
44569
44569
|
const found = productClosure(owner.products);
|
|
@@ -45301,8 +45301,8 @@ function withBuiltinStandinBehavior(behavior) {
|
|
|
45301
45301
|
for (const [module2, members2] of Object.entries(BUILTIN_STANDIN_BEHAVIOR))
|
|
45302
45302
|
merged[module2] = {
|
|
45303
45303
|
...Object.fromEntries(
|
|
45304
|
-
Object.entries(members2).map(([
|
|
45305
|
-
|
|
45304
|
+
Object.entries(members2).map(([path101, entry]) => [
|
|
45305
|
+
path101,
|
|
45306
45306
|
{ ...entry, builtin: true }
|
|
45307
45307
|
])
|
|
45308
45308
|
),
|
|
@@ -49557,8 +49557,8 @@ function sourceEntryPath() {
|
|
|
49557
49557
|
return null;
|
|
49558
49558
|
}
|
|
49559
49559
|
}
|
|
49560
|
-
function isCliEntry(
|
|
49561
|
-
const name3 = (0, import_node_path77.basename)(
|
|
49560
|
+
function isCliEntry(path101) {
|
|
49561
|
+
const name3 = (0, import_node_path77.basename)(path101);
|
|
49562
49562
|
return name3 === "bin.ts" || name3 === "bin.js";
|
|
49563
49563
|
}
|
|
49564
49564
|
function rnxSelfInvocation() {
|
|
@@ -54586,11 +54586,11 @@ function stringList(value) {
|
|
|
54586
54586
|
function externalSpecMembers(root, requested) {
|
|
54587
54587
|
const children = (spec) => Array.isArray(spec.subspecs) ? spec.subspecs.filter(object5) : [];
|
|
54588
54588
|
const chains = /* @__PURE__ */ new Map();
|
|
54589
|
-
const select = (
|
|
54590
|
-
const key2 =
|
|
54589
|
+
const select = (path101) => {
|
|
54590
|
+
const key2 = path101.join("/");
|
|
54591
54591
|
if (chains.has(key2)) return;
|
|
54592
54592
|
const chain = [root];
|
|
54593
|
-
for (const part of
|
|
54593
|
+
for (const part of path101) {
|
|
54594
54594
|
const child = children(chain.at(-1)).find((sub) => sub.name === part);
|
|
54595
54595
|
if (!child) throw new Error(`${String(root.name)} has no subspec ${key2}`);
|
|
54596
54596
|
chain.push(child);
|
|
@@ -54599,7 +54599,7 @@ function externalSpecMembers(root, requested) {
|
|
|
54599
54599
|
const spec = chain.at(-1);
|
|
54600
54600
|
const defaults = stringList(spec.default_subspecs ?? spec.default_subspec);
|
|
54601
54601
|
const activated = defaults[0] === "none" ? [] : defaults.length > 0 ? defaults : children(spec).map((sub) => String(sub.name));
|
|
54602
|
-
for (const name3 of activated) select([...
|
|
54602
|
+
for (const name3 of activated) select([...path101, ...name3.split("/")]);
|
|
54603
54603
|
for (const member of chain)
|
|
54604
54604
|
for (const dependencies of [member.dependencies, iosOf(member)?.dependencies])
|
|
54605
54605
|
for (const dependency of object5(dependencies) ? Object.keys(dependencies) : []) {
|
|
@@ -57230,9 +57230,9 @@ async function packageTreeDigest(root) {
|
|
|
57230
57230
|
(a, b) => a.name.localeCompare(b.name)
|
|
57231
57231
|
)) {
|
|
57232
57232
|
if (entry.name === "node_modules") continue;
|
|
57233
|
-
const
|
|
57234
|
-
if (entry.isDirectory()) walk3((0, import_node_path86.join)(directory2, entry.name), `${
|
|
57235
|
-
else if (entry.isFile()) files2.push(
|
|
57233
|
+
const path101 = `${relative4}${entry.name}`;
|
|
57234
|
+
if (entry.isDirectory()) walk3((0, import_node_path86.join)(directory2, entry.name), `${path101}/`);
|
|
57235
|
+
else if (entry.isFile()) files2.push(path101);
|
|
57236
57236
|
}
|
|
57237
57237
|
};
|
|
57238
57238
|
walk3(root, "");
|
|
@@ -65572,13 +65572,13 @@ var init_replacementModule = __esm({
|
|
|
65572
65572
|
|
|
65573
65573
|
// src/host/replacement-module-handler.ts
|
|
65574
65574
|
function resolveReplacementModuleFile(fromFile, specifier) {
|
|
65575
|
-
const base =
|
|
65575
|
+
const base = import_node_path110.default.resolve(import_node_path110.default.dirname(fromFile), specifier);
|
|
65576
65576
|
const candidates = [
|
|
65577
65577
|
...REPLACEMENT_MODULE_EXTENSIONS.some(
|
|
65578
|
-
(ext) => ext ===
|
|
65578
|
+
(ext) => ext === import_node_path110.default.extname(base).toLowerCase()
|
|
65579
65579
|
) ? [base] : [],
|
|
65580
65580
|
...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => base + ext),
|
|
65581
|
-
...REPLACEMENT_MODULE_EXTENSIONS.map((ext) =>
|
|
65581
|
+
...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path110.default.join(base, `index${ext}`))
|
|
65582
65582
|
];
|
|
65583
65583
|
const found = candidates.find(
|
|
65584
65584
|
(candidate) => (0, import_node_fs110.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
|
|
@@ -65590,12 +65590,12 @@ function resolveReplacementModuleFile(fromFile, specifier) {
|
|
|
65590
65590
|
}
|
|
65591
65591
|
return found;
|
|
65592
65592
|
}
|
|
65593
|
-
var import_node_fs110,
|
|
65593
|
+
var import_node_fs110, import_node_path110;
|
|
65594
65594
|
var init_replacement_module_handler = __esm({
|
|
65595
65595
|
"src/host/replacement-module-handler.ts"() {
|
|
65596
65596
|
"use strict";
|
|
65597
65597
|
import_node_fs110 = require("node:fs");
|
|
65598
|
-
|
|
65598
|
+
import_node_path110 = __toESM(require("node:path"), 1);
|
|
65599
65599
|
init_replacementModule();
|
|
65600
65600
|
init_backend_origin();
|
|
65601
65601
|
}
|
|
@@ -65656,7 +65656,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
65656
65656
|
if (!entries || typeof entries !== "object") continue;
|
|
65657
65657
|
for (const resolution of Object.values(entries)) {
|
|
65658
65658
|
if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
|
|
65659
|
-
resolution.file = visit3(
|
|
65659
|
+
resolution.file = visit3(import_node_path111.default.resolve(resolution.file));
|
|
65660
65660
|
}
|
|
65661
65661
|
}
|
|
65662
65662
|
}
|
|
@@ -65680,12 +65680,12 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
65680
65680
|
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
65681
65681
|
return prefix + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
65682
65682
|
}
|
|
65683
|
-
var import_node_fs111,
|
|
65683
|
+
var import_node_fs111, import_node_path111, import_sucrase3, import_terser, PREFIX_START, PREFIX_END;
|
|
65684
65684
|
var init_configured_bundle_producer = __esm({
|
|
65685
65685
|
"src/configured-bundle-producer.ts"() {
|
|
65686
65686
|
"use strict";
|
|
65687
65687
|
import_node_fs111 = __toESM(require("node:fs"), 1);
|
|
65688
|
-
|
|
65688
|
+
import_node_path111 = __toESM(require("node:path"), 1);
|
|
65689
65689
|
init_bundle_global_footer();
|
|
65690
65690
|
import_sucrase3 = require("sucrase");
|
|
65691
65691
|
import_terser = require("terser");
|
|
@@ -65710,7 +65710,7 @@ __export(bundle_channel_exports, {
|
|
|
65710
65710
|
module.exports = __toCommonJS(bundle_channel_exports);
|
|
65711
65711
|
var import_node_crypto58 = require("node:crypto");
|
|
65712
65712
|
var import_node_fs112 = require("node:fs");
|
|
65713
|
-
var
|
|
65713
|
+
var import_node_path112 = require("node:path");
|
|
65714
65714
|
var import_node_vm = require("node:vm");
|
|
65715
65715
|
var import_node_zlib4 = require("node:zlib");
|
|
65716
65716
|
init_backend_origin();
|
|
@@ -65818,8 +65818,8 @@ function getDefaultPortForProtocol(protocol) {
|
|
|
65818
65818
|
return protocol === "https:" ? 443 : 80;
|
|
65819
65819
|
}
|
|
65820
65820
|
function isBaseServerUrl(url) {
|
|
65821
|
-
const
|
|
65822
|
-
return (
|
|
65821
|
+
const path101 = url.pathname || "/";
|
|
65822
|
+
return (path101 === "/" || path101 === "") && !url.search && !url.hash;
|
|
65823
65823
|
}
|
|
65824
65824
|
async function resolvePortViaServerScan(port) {
|
|
65825
65825
|
try {
|
|
@@ -69424,7 +69424,7 @@ init_process_group();
|
|
|
69424
69424
|
|
|
69425
69425
|
// cli/app-catalog.ts
|
|
69426
69426
|
var import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
69427
|
-
var
|
|
69427
|
+
var import_node_path109 = __toESM(require("node:path"), 1);
|
|
69428
69428
|
init_bundleAssets();
|
|
69429
69429
|
init_expo_native_workspace();
|
|
69430
69430
|
|
|
@@ -69553,7 +69553,22 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
|
|
|
69553
69553
|
}
|
|
69554
69554
|
|
|
69555
69555
|
// src/one-native-app-catalog.ts
|
|
69556
|
+
var import_node_path108 = __toESM(require("node:path"), 1);
|
|
69556
69557
|
init_is_record();
|
|
69558
|
+
var ONE_NATIVE_APP_CATALOG_ROUTE = "/__peach/native-app-catalog";
|
|
69559
|
+
var HEX_COLOR = /^#[\da-f]{6}$/i;
|
|
69560
|
+
function parseAccent(value) {
|
|
69561
|
+
if (!isRecord(value) || typeof value.light !== "string") return null;
|
|
69562
|
+
if (!HEX_COLOR.test(value.light)) return null;
|
|
69563
|
+
const dark = typeof value.dark === "string" && HEX_COLOR.test(value.dark) ? value.dark : value.light;
|
|
69564
|
+
return { light: value.light, dark };
|
|
69565
|
+
}
|
|
69566
|
+
function parseOneNativeAppCatalog(value) {
|
|
69567
|
+
if (!isRecord(value)) return null;
|
|
69568
|
+
const accentColor = parseAccent(value.accentColor);
|
|
69569
|
+
const assetCatalog = typeof value.assetCatalog === "string" && import_node_path108.default.isAbsolute(value.assetCatalog) ? value.assetCatalog : null;
|
|
69570
|
+
return accentColor || assetCatalog ? { accentColor, assetCatalog } : null;
|
|
69571
|
+
}
|
|
69557
69572
|
|
|
69558
69573
|
// cli/app-catalog.ts
|
|
69559
69574
|
init_app_project();
|
|
@@ -69575,7 +69590,7 @@ function readText(file) {
|
|
|
69575
69590
|
}
|
|
69576
69591
|
function catalogFiles(dir, found) {
|
|
69577
69592
|
for (const entry of listDir2(dir)) {
|
|
69578
|
-
const full =
|
|
69593
|
+
const full = import_node_path109.default.join(dir, entry.name);
|
|
69579
69594
|
if (entry.isDirectory()) catalogFiles(full, found);
|
|
69580
69595
|
else if (entry.name === "Contents.json") found.push(full);
|
|
69581
69596
|
}
|
|
@@ -69601,33 +69616,33 @@ function readAssetCatalog(files2, readContents2, imageUri, accentName) {
|
|
|
69601
69616
|
return { colors, images, symbols, accentName };
|
|
69602
69617
|
}
|
|
69603
69618
|
async function discoverAppCatalog(appDir, assetOrigin) {
|
|
69604
|
-
if (!import_node_fs109.default.existsSync(
|
|
69605
|
-
const packageJson = readText(
|
|
69619
|
+
if (!import_node_fs109.default.existsSync(import_node_path109.default.join(appDir, "ios")) && findExpoAppConfig(appDir)) {
|
|
69620
|
+
const packageJson = readText(import_node_path109.default.join(appDir, "package.json"));
|
|
69606
69621
|
if (packageJson) {
|
|
69607
69622
|
const manifest = JSON.parse(packageJson);
|
|
69608
69623
|
if (declaresNativeDependency(manifest, "expo") || declaresNativeDependency(manifest, "one"))
|
|
69609
69624
|
appDir = (await prepareExpoNativeProject(appDir)).app;
|
|
69610
69625
|
}
|
|
69611
69626
|
}
|
|
69612
|
-
const iosDir =
|
|
69627
|
+
const iosDir = import_node_path109.default.join(appDir, "ios");
|
|
69613
69628
|
const target = listDir2(iosDir).find(
|
|
69614
|
-
(entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(
|
|
69629
|
+
(entry) => entry.isDirectory() && entry.name !== "Pods" && listDir2(import_node_path109.default.join(iosDir, entry.name)).some(
|
|
69615
69630
|
(file) => /^AppDelegate\.(swift|mm|m)$/.test(file.name)
|
|
69616
69631
|
)
|
|
69617
69632
|
);
|
|
69618
69633
|
if (!target) return null;
|
|
69619
|
-
const targetDir =
|
|
69634
|
+
const targetDir = import_node_path109.default.join(iosDir, target.name);
|
|
69620
69635
|
const files2 = [];
|
|
69621
69636
|
for (const entry of listDir2(targetDir)) {
|
|
69622
69637
|
if (entry.isDirectory() && entry.name.endsWith(".xcassets"))
|
|
69623
|
-
catalogFiles(
|
|
69638
|
+
catalogFiles(import_node_path109.default.join(targetDir, entry.name), files2);
|
|
69624
69639
|
}
|
|
69625
69640
|
const relative4 = files2.map(
|
|
69626
|
-
(file) =>
|
|
69641
|
+
(file) => import_node_path109.default.relative(targetDir, file).split(import_node_path109.default.sep).join(import_node_path109.default.posix.sep)
|
|
69627
69642
|
);
|
|
69628
|
-
const readContents2 = (candidate) => readText(
|
|
69643
|
+
const readContents2 = (candidate) => readText(import_node_path109.default.join(targetDir, candidate));
|
|
69629
69644
|
const pbxproj = listDir2(iosDir).find((entry) => entry.name.endsWith(".xcodeproj"));
|
|
69630
|
-
const accentName = readText(
|
|
69645
|
+
const accentName = readText(import_node_path109.default.join(targetDir, "Info.plist"))?.match(PLIST_ACCENT)?.[1] ?? (pbxproj ? readText(import_node_path109.default.join(iosDir, pbxproj.name, "project.pbxproj"))?.match(
|
|
69631
69646
|
ACCENT_BUILD_SETTING
|
|
69632
69647
|
)?.[1] : void 0) ?? null;
|
|
69633
69648
|
return readAssetCatalog(
|
|
@@ -69640,11 +69655,32 @@ async function discoverAppCatalog(appDir, assetOrigin) {
|
|
|
69640
69655
|
);
|
|
69641
69656
|
return null;
|
|
69642
69657
|
}
|
|
69643
|
-
return stageHostFile(
|
|
69658
|
+
return stageHostFile(import_node_path109.default.join(targetDir, file), assetOrigin);
|
|
69644
69659
|
},
|
|
69645
69660
|
accentName
|
|
69646
69661
|
);
|
|
69647
69662
|
}
|
|
69663
|
+
async function discoverOneNativeAppCatalog(metroOrigin, assetOrigin) {
|
|
69664
|
+
const response = await fetch(`${metroOrigin}${ONE_NATIVE_APP_CATALOG_ROUTE}`, {
|
|
69665
|
+
signal: AbortSignal.timeout(1500)
|
|
69666
|
+
}).catch(() => null);
|
|
69667
|
+
if (!response?.ok || !(response.headers.get("content-type") ?? "").toLowerCase().includes("json"))
|
|
69668
|
+
return null;
|
|
69669
|
+
const declared = parseOneNativeAppCatalog(await response.json().catch(() => null));
|
|
69670
|
+
if (!declared) return null;
|
|
69671
|
+
const { accentColor, assetCatalog } = declared;
|
|
69672
|
+
const accentName = accentColor ? "AccentColor" : null;
|
|
69673
|
+
const files2 = [];
|
|
69674
|
+
if (assetCatalog) catalogFiles(assetCatalog, files2);
|
|
69675
|
+
const catalog = readAssetCatalog(
|
|
69676
|
+
files2,
|
|
69677
|
+
readText,
|
|
69678
|
+
(file) => stageHostFile(file, assetOrigin),
|
|
69679
|
+
accentName
|
|
69680
|
+
);
|
|
69681
|
+
if (catalog && accentColor) catalog.colors.AccentColor = accentColor;
|
|
69682
|
+
return catalog;
|
|
69683
|
+
}
|
|
69648
69684
|
|
|
69649
69685
|
// src/bundle-channel.mjs
|
|
69650
69686
|
var digest3 = (bytes) => (0, import_node_crypto58.createHash)("sha256").update(bytes).digest("hex");
|
|
@@ -69754,10 +69790,10 @@ async function prepareChannel({
|
|
|
69754
69790
|
}
|
|
69755
69791
|
}
|
|
69756
69792
|
const identity2 = (0, import_node_crypto58.createHash)("sha256").update(bundle).update(icon);
|
|
69757
|
-
for (const [
|
|
69793
|
+
for (const [path101, bytes] of [...files2].sort(
|
|
69758
69794
|
([a], [b]) => a < b ? -1 : a > b ? 1 : 0
|
|
69759
69795
|
)) {
|
|
69760
|
-
identity2.update(JSON.stringify([
|
|
69796
|
+
identity2.update(JSON.stringify([path101, digest3(bytes)]));
|
|
69761
69797
|
}
|
|
69762
69798
|
if (native) identity2.update(JSON.stringify(native.metadata));
|
|
69763
69799
|
if (oneSDK) identity2.update(JSON.stringify(oneSDK.metadata));
|
|
@@ -69767,7 +69803,7 @@ async function prepareChannel({
|
|
|
69767
69803
|
const releaseKey = `${prefix}/peach/releases/${identity2.digest("hex")}`;
|
|
69768
69804
|
const assetBaseUrl = `${origin.origin}/${releaseKey}/`;
|
|
69769
69805
|
const directories = new Set(
|
|
69770
|
-
[...files2.keys()].map((
|
|
69806
|
+
[...files2.keys()].map((path101) => path101.slice(0, path101.lastIndexOf("/")))
|
|
69771
69807
|
);
|
|
69772
69808
|
let locations = 0;
|
|
69773
69809
|
const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } = getCliRuntime().rolldown_bundle_inventory;
|
|
@@ -69781,12 +69817,12 @@ async function prepareChannel({
|
|
|
69781
69817
|
/("?httpServerLocation"?\s*:\s*)(?:"((?:[^"\\]|\\.)*)"|`([^`\\$]*)`)/g,
|
|
69782
69818
|
(match, property, quoted2, template) => {
|
|
69783
69819
|
const location = quoted2 === void 0 ? template : JSON.parse(`"${quoted2}"`);
|
|
69784
|
-
const
|
|
69785
|
-
if (!directories.has(
|
|
69820
|
+
const path101 = packagedAssetDirectory(location);
|
|
69821
|
+
if (!directories.has(path101)) {
|
|
69786
69822
|
throw new Error(`bundle asset location has no packaged files: ${location}`);
|
|
69787
69823
|
}
|
|
69788
69824
|
locations++;
|
|
69789
|
-
return `${property}${JSON.stringify(new URL(
|
|
69825
|
+
return `${property}${JSON.stringify(new URL(path101, assetBaseUrl).href)}`;
|
|
69790
69826
|
}
|
|
69791
69827
|
);
|
|
69792
69828
|
if (assets2.some((asset) => !asset.path.startsWith("assets/native-catalog/")) && !locations)
|
|
@@ -69794,7 +69830,7 @@ async function prepareChannel({
|
|
|
69794
69830
|
const attached = insertNativeBundleFooters(
|
|
69795
69831
|
source,
|
|
69796
69832
|
{ oneSDK, expoSwift, expoKotlin, nitro, turbo },
|
|
69797
|
-
(
|
|
69833
|
+
(path101) => new URL(path101, assetBaseUrl).href
|
|
69798
69834
|
);
|
|
69799
69835
|
source = attached.source;
|
|
69800
69836
|
if (appCatalog) {
|
|
@@ -69832,10 +69868,10 @@ async function prepareChannel({
|
|
|
69832
69868
|
contentType: "application/javascript"
|
|
69833
69869
|
},
|
|
69834
69870
|
{ key: `${releaseKey}/icon.png`, bytes: icon, contentType: "image/png" },
|
|
69835
|
-
...[...files2].map(([
|
|
69836
|
-
key: `${releaseKey}/${
|
|
69871
|
+
...[...files2].map(([path101, bytes]) => ({
|
|
69872
|
+
key: `${releaseKey}/${path101}`,
|
|
69837
69873
|
bytes,
|
|
69838
|
-
contentType: nativeAssets.get(
|
|
69874
|
+
contentType: nativeAssets.get(path101)?.contentType ?? {
|
|
69839
69875
|
png: "image/png",
|
|
69840
69876
|
jpg: "image/jpeg",
|
|
69841
69877
|
jpeg: "image/jpeg",
|
|
@@ -69844,13 +69880,13 @@ async function prepareChannel({
|
|
|
69844
69880
|
ttf: "font/ttf",
|
|
69845
69881
|
otf: "font/otf",
|
|
69846
69882
|
wav: "audio/wav"
|
|
69847
|
-
}[
|
|
69883
|
+
}[path101.split(".").pop()] ?? "application/octet-stream"
|
|
69848
69884
|
}))
|
|
69849
69885
|
];
|
|
69850
69886
|
return { platform: platform2, key: `${prefix}/${channelKey(platform2)}`, metadata, objects };
|
|
69851
69887
|
}
|
|
69852
69888
|
function brotliCompressCached(bytes) {
|
|
69853
|
-
const file = (0,
|
|
69889
|
+
const file = (0, import_node_path112.join)(cacheDir(), "bundle-channel-brotli", `${digest3(bytes)}-q11-w24.br`);
|
|
69854
69890
|
if ((0, import_node_fs112.existsSync)(file)) return (0, import_node_fs112.readFileSync)(file);
|
|
69855
69891
|
const compressed = (0, import_node_zlib4.brotliCompressSync)(bytes, {
|
|
69856
69892
|
params: {
|
|
@@ -69858,7 +69894,7 @@ function brotliCompressCached(bytes) {
|
|
|
69858
69894
|
[import_node_zlib4.constants.BROTLI_PARAM_LGWIN]: 24
|
|
69859
69895
|
}
|
|
69860
69896
|
});
|
|
69861
|
-
(0, import_node_fs112.mkdirSync)((0,
|
|
69897
|
+
(0, import_node_fs112.mkdirSync)((0, import_node_path112.dirname)(file), { recursive: true });
|
|
69862
69898
|
(0, import_node_fs112.writeFileSync)(`${file}.${process.pid}`, compressed);
|
|
69863
69899
|
(0, import_node_fs112.renameSync)(`${file}.${process.pid}`, file);
|
|
69864
69900
|
return compressed;
|
|
@@ -69903,7 +69939,7 @@ async function publishBundleChannel(release, { put, fetchObject = fetch }) {
|
|
|
69903
69939
|
);
|
|
69904
69940
|
}
|
|
69905
69941
|
}
|
|
69906
|
-
async function packagePlatformBundle(projectRoot, platform2, bundle, { config, versions, readAssetFile, configuration }) {
|
|
69942
|
+
async function packagePlatformBundle(projectRoot, platform2, bundle, { config, versions, readAssetFile, configuration, devOrigin = null }) {
|
|
69907
69943
|
const { produceConfiguredBundle: produceConfiguredBundle2 } = await Promise.resolve().then(() => (init_configured_bundle_producer(), configured_bundle_producer_exports));
|
|
69908
69944
|
const assets2 = /* @__PURE__ */ new Map();
|
|
69909
69945
|
for (const [registration] of bundle.toString("utf8").matchAll(/(?<=registerAsset\()\{[^{}]*"__packager_asset": true[^{}]*\}/g)) {
|
|
@@ -69911,27 +69947,29 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
|
|
|
69911
69947
|
const directory2 = packagedAssetDirectory(asset.httpServerLocation);
|
|
69912
69948
|
if (asset.files) {
|
|
69913
69949
|
for (const file of asset.files) {
|
|
69914
|
-
const
|
|
69915
|
-
if (!assets2.has(
|
|
69950
|
+
const path101 = `${directory2}/${(0, import_node_path112.basename)(file)}`;
|
|
69951
|
+
if (!assets2.has(path101)) assets2.set(path101, (0, import_node_fs112.readFileSync)(file));
|
|
69916
69952
|
}
|
|
69917
69953
|
continue;
|
|
69918
69954
|
}
|
|
69919
69955
|
for (const scale of asset.scales) {
|
|
69920
69956
|
const file = `${asset.name}${scale === 1 ? "" : `@${scale}x`}.${asset.type}`;
|
|
69921
|
-
const
|
|
69922
|
-
if (!assets2.has(
|
|
69957
|
+
const path101 = `${directory2}/${file}`;
|
|
69958
|
+
if (!assets2.has(path101)) assets2.set(path101, await readAssetFile(asset, file));
|
|
69923
69959
|
}
|
|
69924
69960
|
}
|
|
69925
69961
|
let appCatalog = null;
|
|
69926
69962
|
if (platform2 === "ios") {
|
|
69927
|
-
const captured = await captureStagedHostFiles(
|
|
69963
|
+
const captured = await captureStagedHostFiles(
|
|
69964
|
+
async () => await discoverAppCatalog(projectRoot, "https://packaged.invalid") ?? (devOrigin ? await discoverOneNativeAppCatalog(devOrigin, "https://packaged.invalid") : null)
|
|
69965
|
+
);
|
|
69928
69966
|
if (captured.value) {
|
|
69929
69967
|
appCatalog = {
|
|
69930
69968
|
...captured.value,
|
|
69931
69969
|
images: Object.fromEntries(Object.entries(captured.value.images).map(([name3, variants]) => [
|
|
69932
69970
|
name3,
|
|
69933
69971
|
variants.map((image) => {
|
|
69934
|
-
const file = (0,
|
|
69972
|
+
const file = (0, import_node_path112.basename)(new URL(image.uri).pathname);
|
|
69935
69973
|
const staged = captured.files.get(file);
|
|
69936
69974
|
if (!staged) throw new Error("app catalog image was not staged");
|
|
69937
69975
|
const resource = `assets/native-catalog/${file}`;
|
|
@@ -69956,7 +69994,7 @@ async function packagePlatformBundle(projectRoot, platform2, bundle, { config, v
|
|
|
69956
69994
|
versions
|
|
69957
69995
|
)
|
|
69958
69996
|
),
|
|
69959
|
-
assets: [...assets2].map(([
|
|
69997
|
+
assets: [...assets2].map(([path101, bytes]) => ({ path: path101, bytes })),
|
|
69960
69998
|
...await buildNativeBundles(projectRoot, platform2, configuration)
|
|
69961
69999
|
};
|
|
69962
70000
|
}
|
|
@@ -70015,6 +70053,7 @@ ${await response.text()}`
|
|
|
70015
70053
|
await packagePlatformBundle(projectRoot, platform2, bundle, {
|
|
70016
70054
|
...inputs,
|
|
70017
70055
|
configuration: "Debug",
|
|
70056
|
+
devOrigin: origin,
|
|
70018
70057
|
readAssetFile: async (asset, file) => {
|
|
70019
70058
|
const response = await fetch(
|
|
70020
70059
|
`${origin}${asset.httpServerLocation}/${file}?platform=${platform2}&hash=${asset.hash}`
|
|
@@ -70036,12 +70075,12 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
|
|
|
70036
70075
|
const inputs = await readPackagingInputs(projectRoot);
|
|
70037
70076
|
const snapshots = [];
|
|
70038
70077
|
for (const platform2 of platforms2) {
|
|
70039
|
-
const out = await mkdtemp((0,
|
|
70078
|
+
const out = await mkdtemp((0, import_node_path112.join)(tmpdir3(), "peach-production-bundle-"));
|
|
70040
70079
|
try {
|
|
70041
70080
|
await promisify21(execFile22)(
|
|
70042
70081
|
runtimeExecutable,
|
|
70043
70082
|
[
|
|
70044
|
-
(0,
|
|
70083
|
+
(0, import_node_path112.join)(projectRoot, "node_modules/.bin/react-native"),
|
|
70045
70084
|
"bundle",
|
|
70046
70085
|
"--platform",
|
|
70047
70086
|
platform2,
|
|
@@ -70052,19 +70091,19 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
|
|
|
70052
70091
|
"--entry-file",
|
|
70053
70092
|
entryFile,
|
|
70054
70093
|
"--bundle-output",
|
|
70055
|
-
(0,
|
|
70094
|
+
(0, import_node_path112.join)(out, "bundle.js"),
|
|
70056
70095
|
"--assets-dest",
|
|
70057
|
-
(0,
|
|
70096
|
+
(0, import_node_path112.join)(out, "assets"),
|
|
70058
70097
|
"--sourcemap-output",
|
|
70059
|
-
(0,
|
|
70098
|
+
(0, import_node_path112.join)(out, "bundle.js.map")
|
|
70060
70099
|
],
|
|
70061
70100
|
{ cwd: projectRoot, env: { ...process.env, ...env, NODE_ENV: "production" } }
|
|
70062
70101
|
);
|
|
70063
70102
|
snapshots.push(
|
|
70064
|
-
await packagePlatformBundle(projectRoot, platform2, await readFile3((0,
|
|
70103
|
+
await packagePlatformBundle(projectRoot, platform2, await readFile3((0, import_node_path112.join)(out, "bundle.js")), {
|
|
70065
70104
|
...inputs,
|
|
70066
70105
|
configuration: "Release",
|
|
70067
|
-
readAssetFile: (asset, file) => readFile3((0,
|
|
70106
|
+
readAssetFile: (asset, file) => readFile3((0, import_node_path112.join)(out, asset.httpServerLocation, file))
|
|
70068
70107
|
})
|
|
70069
70108
|
);
|
|
70070
70109
|
} finally {
|
|
@@ -70077,11 +70116,11 @@ async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable =
|
|
|
70077
70116
|
const { spawn: spawn9 } = await import("node:child_process");
|
|
70078
70117
|
const { createServer } = await import("node:net");
|
|
70079
70118
|
const { createRequire: createRequire19 } = await import("node:module");
|
|
70080
|
-
const onePackage = createRequire19((0,
|
|
70119
|
+
const onePackage = createRequire19((0, import_node_path112.join)(projectRoot, "package.json")).resolve(
|
|
70081
70120
|
"one/package.json"
|
|
70082
70121
|
);
|
|
70083
|
-
const oneBin = (0,
|
|
70084
|
-
(0,
|
|
70122
|
+
const oneBin = (0, import_node_path112.join)(
|
|
70123
|
+
(0, import_node_path112.dirname)(onePackage),
|
|
70085
70124
|
JSON.parse((0, import_node_fs112.readFileSync)(onePackage, "utf8")).bin.one
|
|
70086
70125
|
);
|
|
70087
70126
|
const port = await new Promise((resolve4, reject) => {
|