peachsim 0.1.2404 → 0.1.2406
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/cli-update.ts +2 -2
- package/cli/outbound-endpoints.ts +1 -1
- 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 +2 -2
- 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 +81 -21
- package/dist-lib/cloud.mjs +81 -21
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- 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 +2 -2
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/observability/diagnostics-sample.d.ts +10 -0
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/sootsim-event.d.ts +2 -0
- package/install.sh +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/cloud.ts +90 -22
package/cli/cli-update.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { compareSemver } from '@contrast/runtime-delivery'
|
|
|
4
4
|
import { automaticPeachUpdatesEnabled } from '../src/automatic-update-policy'
|
|
5
5
|
import { getCliVersion } from '../src/cli-version'
|
|
6
6
|
import { cliUpdateFilePath } from '../src/home-paths'
|
|
7
|
-
import { isAgentEnv } from './commands/inspect/env'
|
|
8
7
|
import { DEFAULT_CLI_RELEASE_ORIGIN } from './cli-release-origin'
|
|
8
|
+
import { isAgentEnv } from './commands/inspect/env'
|
|
9
9
|
|
|
10
10
|
export const CLI_UPDATE_CHECK_INTERVAL_MS = 20 * 60 * 60 * 1000
|
|
11
11
|
export const CLI_UPDATE_NOTIFICATION_COOLDOWN_MS = 7 * 24 * 60 * 60 * 1000
|
|
@@ -261,7 +261,7 @@ export async function refreshCliUpdateCache(
|
|
|
261
261
|
)
|
|
262
262
|
const latestVersion = (
|
|
263
263
|
await fetchCliReleaseFile(
|
|
264
|
-
`${releaseOrigin}/channels/
|
|
264
|
+
`${releaseOrigin}/channels/ready`,
|
|
265
265
|
options.timeoutMs ?? 8_000,
|
|
266
266
|
)
|
|
267
267
|
)
|
|
@@ -102,7 +102,7 @@ export const OUTBOUND_ENDPOINTS: Record<string, OutboundEndpointDeclaration> = {
|
|
|
102
102
|
cli_delivery: {
|
|
103
103
|
category: 'explicit-user-action',
|
|
104
104
|
destination:
|
|
105
|
-
'https://r2.rnxsim.com/rnx-cli/channels/
|
|
105
|
+
'https://r2.rnxsim.com/rnx-cli/channels/ready and the selected executable/checksum',
|
|
106
106
|
preConsent: false,
|
|
107
107
|
payload: 'requested CLI version, platform, and architecture only',
|
|
108
108
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -73149,7 +73149,7 @@ var import_node_path5 = require("node:path");
|
|
|
73149
73149
|
init_src();
|
|
73150
73150
|
|
|
73151
73151
|
// runtime-companion.json
|
|
73152
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
73152
|
+
var runtime_companion_default = { abi: 1, sha256: "7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4", file: "node/cli-7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4.cjs" };
|
|
73153
73153
|
|
|
73154
73154
|
// src/cli-runtime.ts
|
|
73155
73155
|
init_answeredNativePackages();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/cloud.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -376,7 +376,7 @@ function cloudCommand(command, scopes) {
|
|
|
376
376
|
}
|
|
377
377
|
return { ...clean, type: command.type };
|
|
378
378
|
}
|
|
379
|
-
var RemoteSimulator = class {
|
|
379
|
+
var RemoteSimulator = class _RemoteSimulator {
|
|
380
380
|
session;
|
|
381
381
|
// driving verbs live here so the client reads the way the CLI does. bound to
|
|
382
382
|
// this simulator at construction, and every verb reads the session live, so a
|
|
@@ -501,7 +501,7 @@ var RemoteSimulator = class {
|
|
|
501
501
|
}
|
|
502
502
|
return parsed.result;
|
|
503
503
|
}
|
|
504
|
-
async confirm() {
|
|
504
|
+
async confirm(options) {
|
|
505
505
|
if (!this.session.claim) {
|
|
506
506
|
throw new Error("this simulator was attached with connect() and holds no claim");
|
|
507
507
|
}
|
|
@@ -515,7 +515,8 @@ var RemoteSimulator = class {
|
|
|
515
515
|
"content-type": "application/json"
|
|
516
516
|
},
|
|
517
517
|
body: JSON.stringify({ claimId })
|
|
518
|
-
}
|
|
518
|
+
},
|
|
519
|
+
options
|
|
519
520
|
);
|
|
520
521
|
const text = await response.text();
|
|
521
522
|
if (!response.ok) throw responseError(response.status, text);
|
|
@@ -532,7 +533,45 @@ var RemoteSimulator = class {
|
|
|
532
533
|
this.session = { ...this.session, claim };
|
|
533
534
|
return claim;
|
|
534
535
|
}
|
|
535
|
-
async
|
|
536
|
+
async createInBox(options) {
|
|
537
|
+
const { artifact, boxId, boxToken, origin, scopes } = this.session;
|
|
538
|
+
if (!boxId || !boxToken) throw new Error("this simulator does not own a box");
|
|
539
|
+
const response = await fetchWithCloudRetry(
|
|
540
|
+
`${origin}/v1/boxes/${encodeURIComponent(boxId)}/simulators`,
|
|
541
|
+
{
|
|
542
|
+
method: "POST",
|
|
543
|
+
headers: {
|
|
544
|
+
authorization: `Bearer ${boxToken}`,
|
|
545
|
+
"x-rnx-account-authorization": options.authorization,
|
|
546
|
+
"content-type": "application/json"
|
|
547
|
+
},
|
|
548
|
+
body: JSON.stringify({
|
|
549
|
+
device: options.device,
|
|
550
|
+
artifactSha256: artifact.id.slice(7)
|
|
551
|
+
})
|
|
552
|
+
},
|
|
553
|
+
options
|
|
554
|
+
);
|
|
555
|
+
const body = await response.text();
|
|
556
|
+
if (!response.ok) throw responseError(response.status, body);
|
|
557
|
+
const parsed = JSON.parse(body);
|
|
558
|
+
if (!isRecord(parsed) || parsed.boxId !== boxId) {
|
|
559
|
+
throw new Error("Peach Cloud create returned an invalid box id");
|
|
560
|
+
}
|
|
561
|
+
const created = readSimulatorCreate(parsed.simulator, artifact.id, artifact.bytes);
|
|
562
|
+
const simulator = new _RemoteSimulator({
|
|
563
|
+
origin,
|
|
564
|
+
boxId: null,
|
|
565
|
+
boxToken: null,
|
|
566
|
+
simId: created.simId,
|
|
567
|
+
simulatorToken: created.token,
|
|
568
|
+
claim: created.claim,
|
|
569
|
+
artifact: created.artifact,
|
|
570
|
+
scopes
|
|
571
|
+
});
|
|
572
|
+
return confirmNewSimulator(simulator, options);
|
|
573
|
+
}
|
|
574
|
+
async close(options) {
|
|
536
575
|
const target = this.session.boxId !== null && this.session.boxToken !== null ? {
|
|
537
576
|
url: `${this.session.origin}/v1/boxes/${encodeURIComponent(this.session.boxId)}`,
|
|
538
577
|
authorization: `Bearer ${this.session.boxToken}`
|
|
@@ -540,10 +579,11 @@ var RemoteSimulator = class {
|
|
|
540
579
|
url: `${this.session.origin}/v1/sims/${encodeURIComponent(this.session.simId)}`,
|
|
541
580
|
authorization: `Bearer ${this.session.simulatorToken}`
|
|
542
581
|
};
|
|
543
|
-
const response = await fetchWithCloudRetry(
|
|
544
|
-
|
|
545
|
-
headers: { authorization: target.authorization }
|
|
546
|
-
|
|
582
|
+
const response = await fetchWithCloudRetry(
|
|
583
|
+
target.url,
|
|
584
|
+
{ method: "DELETE", headers: { authorization: target.authorization } },
|
|
585
|
+
options
|
|
586
|
+
);
|
|
547
587
|
const text = await response.text();
|
|
548
588
|
if (!response.ok && response.status !== 404) {
|
|
549
589
|
throw responseError(response.status, text);
|
|
@@ -568,18 +608,23 @@ async function createRemoteSimulator(input) {
|
|
|
568
608
|
const device = input.device?.trim() || DEFAULT_DEVICE;
|
|
569
609
|
let response;
|
|
570
610
|
try {
|
|
571
|
-
response = await fetchWithCloudRetry(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
611
|
+
response = await fetchWithCloudRetry(
|
|
612
|
+
`${origin}/v1/boxes`,
|
|
613
|
+
{
|
|
614
|
+
method: "POST",
|
|
615
|
+
headers: {
|
|
616
|
+
authorization: input.authorization,
|
|
617
|
+
"content-type": "application/javascript",
|
|
618
|
+
"x-rnx-box-size": "nano",
|
|
619
|
+
"x-rnx-artifact-sha256": sha256,
|
|
620
|
+
"x-rnx-platform": "ios",
|
|
621
|
+
"x-rnx-device": device,
|
|
622
|
+
...input.name ? { "x-rnx-box-name": input.name } : {}
|
|
623
|
+
},
|
|
624
|
+
body: copyArrayBuffer(input.artifact)
|
|
580
625
|
},
|
|
581
|
-
|
|
582
|
-
|
|
626
|
+
input
|
|
627
|
+
);
|
|
583
628
|
} catch (error) {
|
|
584
629
|
throw new Error(
|
|
585
630
|
`could not reach Peach Cloud at ${origin}: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -604,7 +649,22 @@ async function createRemoteSimulator(input) {
|
|
|
604
649
|
artifact: created.receipt.artifact,
|
|
605
650
|
scopes: RNX_CLOUD_TOKEN_SCOPES
|
|
606
651
|
});
|
|
607
|
-
|
|
652
|
+
return confirmNewSimulator(simulator, input);
|
|
653
|
+
}
|
|
654
|
+
async function confirmNewSimulator(simulator, options) {
|
|
655
|
+
try {
|
|
656
|
+
await simulator.confirm(options);
|
|
657
|
+
} catch (error) {
|
|
658
|
+
try {
|
|
659
|
+
await simulator.close(options);
|
|
660
|
+
} catch (cleanupError) {
|
|
661
|
+
throw new AggregateError(
|
|
662
|
+
[error, cleanupError],
|
|
663
|
+
"unconfirmed simulator cleanup failed"
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
throw error;
|
|
667
|
+
}
|
|
608
668
|
return simulator;
|
|
609
669
|
}
|
|
610
670
|
function readSimArtifact(value) {
|
package/dist-lib/cloud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -346,7 +346,7 @@ function cloudCommand(command, scopes) {
|
|
|
346
346
|
}
|
|
347
347
|
return { ...clean, type: command.type };
|
|
348
348
|
}
|
|
349
|
-
var RemoteSimulator = class {
|
|
349
|
+
var RemoteSimulator = class _RemoteSimulator {
|
|
350
350
|
constructor(session) {
|
|
351
351
|
__publicField(this, "session");
|
|
352
352
|
// driving verbs live here so the client reads the way the CLI does. bound to
|
|
@@ -471,7 +471,7 @@ var RemoteSimulator = class {
|
|
|
471
471
|
}
|
|
472
472
|
return parsed.result;
|
|
473
473
|
}
|
|
474
|
-
async confirm() {
|
|
474
|
+
async confirm(options) {
|
|
475
475
|
if (!this.session.claim) {
|
|
476
476
|
throw new Error("this simulator was attached with connect() and holds no claim");
|
|
477
477
|
}
|
|
@@ -485,7 +485,8 @@ var RemoteSimulator = class {
|
|
|
485
485
|
"content-type": "application/json"
|
|
486
486
|
},
|
|
487
487
|
body: JSON.stringify({ claimId })
|
|
488
|
-
}
|
|
488
|
+
},
|
|
489
|
+
options
|
|
489
490
|
);
|
|
490
491
|
const text = await response.text();
|
|
491
492
|
if (!response.ok) throw responseError(response.status, text);
|
|
@@ -502,7 +503,45 @@ var RemoteSimulator = class {
|
|
|
502
503
|
this.session = { ...this.session, claim };
|
|
503
504
|
return claim;
|
|
504
505
|
}
|
|
505
|
-
async
|
|
506
|
+
async createInBox(options) {
|
|
507
|
+
const { artifact, boxId, boxToken, origin, scopes } = this.session;
|
|
508
|
+
if (!boxId || !boxToken) throw new Error("this simulator does not own a box");
|
|
509
|
+
const response = await fetchWithCloudRetry(
|
|
510
|
+
`${origin}/v1/boxes/${encodeURIComponent(boxId)}/simulators`,
|
|
511
|
+
{
|
|
512
|
+
method: "POST",
|
|
513
|
+
headers: {
|
|
514
|
+
authorization: `Bearer ${boxToken}`,
|
|
515
|
+
"x-rnx-account-authorization": options.authorization,
|
|
516
|
+
"content-type": "application/json"
|
|
517
|
+
},
|
|
518
|
+
body: JSON.stringify({
|
|
519
|
+
device: options.device,
|
|
520
|
+
artifactSha256: artifact.id.slice(7)
|
|
521
|
+
})
|
|
522
|
+
},
|
|
523
|
+
options
|
|
524
|
+
);
|
|
525
|
+
const body = await response.text();
|
|
526
|
+
if (!response.ok) throw responseError(response.status, body);
|
|
527
|
+
const parsed = JSON.parse(body);
|
|
528
|
+
if (!isRecord(parsed) || parsed.boxId !== boxId) {
|
|
529
|
+
throw new Error("Peach Cloud create returned an invalid box id");
|
|
530
|
+
}
|
|
531
|
+
const created = readSimulatorCreate(parsed.simulator, artifact.id, artifact.bytes);
|
|
532
|
+
const simulator = new _RemoteSimulator({
|
|
533
|
+
origin,
|
|
534
|
+
boxId: null,
|
|
535
|
+
boxToken: null,
|
|
536
|
+
simId: created.simId,
|
|
537
|
+
simulatorToken: created.token,
|
|
538
|
+
claim: created.claim,
|
|
539
|
+
artifact: created.artifact,
|
|
540
|
+
scopes
|
|
541
|
+
});
|
|
542
|
+
return confirmNewSimulator(simulator, options);
|
|
543
|
+
}
|
|
544
|
+
async close(options) {
|
|
506
545
|
const target = this.session.boxId !== null && this.session.boxToken !== null ? {
|
|
507
546
|
url: `${this.session.origin}/v1/boxes/${encodeURIComponent(this.session.boxId)}`,
|
|
508
547
|
authorization: `Bearer ${this.session.boxToken}`
|
|
@@ -510,10 +549,11 @@ var RemoteSimulator = class {
|
|
|
510
549
|
url: `${this.session.origin}/v1/sims/${encodeURIComponent(this.session.simId)}`,
|
|
511
550
|
authorization: `Bearer ${this.session.simulatorToken}`
|
|
512
551
|
};
|
|
513
|
-
const response = await fetchWithCloudRetry(
|
|
514
|
-
|
|
515
|
-
headers: { authorization: target.authorization }
|
|
516
|
-
|
|
552
|
+
const response = await fetchWithCloudRetry(
|
|
553
|
+
target.url,
|
|
554
|
+
{ method: "DELETE", headers: { authorization: target.authorization } },
|
|
555
|
+
options
|
|
556
|
+
);
|
|
517
557
|
const text = await response.text();
|
|
518
558
|
if (!response.ok && response.status !== 404) {
|
|
519
559
|
throw responseError(response.status, text);
|
|
@@ -538,18 +578,23 @@ async function createRemoteSimulator(input) {
|
|
|
538
578
|
const device = input.device?.trim() || DEFAULT_DEVICE;
|
|
539
579
|
let response;
|
|
540
580
|
try {
|
|
541
|
-
response = await fetchWithCloudRetry(
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
581
|
+
response = await fetchWithCloudRetry(
|
|
582
|
+
`${origin}/v1/boxes`,
|
|
583
|
+
{
|
|
584
|
+
method: "POST",
|
|
585
|
+
headers: {
|
|
586
|
+
authorization: input.authorization,
|
|
587
|
+
"content-type": "application/javascript",
|
|
588
|
+
"x-rnx-box-size": "nano",
|
|
589
|
+
"x-rnx-artifact-sha256": sha256,
|
|
590
|
+
"x-rnx-platform": "ios",
|
|
591
|
+
"x-rnx-device": device,
|
|
592
|
+
...input.name ? { "x-rnx-box-name": input.name } : {}
|
|
593
|
+
},
|
|
594
|
+
body: copyArrayBuffer(input.artifact)
|
|
550
595
|
},
|
|
551
|
-
|
|
552
|
-
|
|
596
|
+
input
|
|
597
|
+
);
|
|
553
598
|
} catch (error) {
|
|
554
599
|
throw new Error(
|
|
555
600
|
`could not reach Peach Cloud at ${origin}: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -574,7 +619,22 @@ async function createRemoteSimulator(input) {
|
|
|
574
619
|
artifact: created.receipt.artifact,
|
|
575
620
|
scopes: RNX_CLOUD_TOKEN_SCOPES
|
|
576
621
|
});
|
|
577
|
-
|
|
622
|
+
return confirmNewSimulator(simulator, input);
|
|
623
|
+
}
|
|
624
|
+
async function confirmNewSimulator(simulator, options) {
|
|
625
|
+
try {
|
|
626
|
+
await simulator.confirm(options);
|
|
627
|
+
} catch (error) {
|
|
628
|
+
try {
|
|
629
|
+
await simulator.close(options);
|
|
630
|
+
} catch (cleanupError) {
|
|
631
|
+
throw new AggregateError(
|
|
632
|
+
[error, cleanupError],
|
|
633
|
+
"unconfirmed simulator cleanup failed"
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
throw error;
|
|
637
|
+
}
|
|
578
638
|
return simulator;
|
|
579
639
|
}
|
|
580
640
|
function readSimArtifact(value) {
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/config.mjs
CHANGED
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -2476,7 +2476,7 @@ function isValidRuntimeVersion(value) {
|
|
|
2476
2476
|
}
|
|
2477
2477
|
|
|
2478
2478
|
// runtime-companion.json
|
|
2479
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
2479
|
+
var runtime_companion_default = { abi: 1, sha256: "7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4", file: "node/cli-7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4.cjs" };
|
|
2480
2480
|
|
|
2481
2481
|
// src/answeredNativePackages.ts
|
|
2482
2482
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -61902,7 +61902,7 @@ var init_nitro_superset = __esm({
|
|
|
61902
61902
|
var runtime_companion_default;
|
|
61903
61903
|
var init_runtime_companion = __esm({
|
|
61904
61904
|
"runtime-companion.json"() {
|
|
61905
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
61905
|
+
runtime_companion_default = { abi: 1, sha256: "7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4", file: "node/cli-7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4.cjs" };
|
|
61906
61906
|
}
|
|
61907
61907
|
});
|
|
61908
61908
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -11158,7 +11158,7 @@ var import_node_path10 = require("node:path");
|
|
|
11158
11158
|
init_src();
|
|
11159
11159
|
|
|
11160
11160
|
// runtime-companion.json
|
|
11161
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
11161
|
+
var runtime_companion_default = { abi: 1, sha256: "7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4", file: "node/cli-7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4.cjs" };
|
|
11162
11162
|
|
|
11163
11163
|
// src/cli-runtime.ts
|
|
11164
11164
|
init_answeredNativePackages();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2406 | (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;
|
|
@@ -1173,7 +1173,7 @@ var init_src = __esm({
|
|
|
1173
1173
|
var runtime_companion_default;
|
|
1174
1174
|
var init_runtime_companion = __esm({
|
|
1175
1175
|
"runtime-companion.json"() {
|
|
1176
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
1176
|
+
runtime_companion_default = { abi: 1, sha256: "7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4", file: "node/cli-7e162f525497b8964ff8f7274ce8219416ec01ac8fc6986a80d2df90a54c71c4.cjs" };
|
|
1177
1177
|
}
|
|
1178
1178
|
});
|
|
1179
1179
|
|