stim 1.17.2 → 1.18.0
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/README.md +50 -1
- package/dist/{activity-IRvJY_ru.mjs → activity-BxnkDZDi.mjs} +4 -4
- package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-CZ66YA4T.mjs} +8 -8
- package/dist/android-BKA16DTf.mjs +4 -0
- package/dist/{android-B9yaNKwa.mjs → android-BvwuMUJ9.mjs} +192 -98
- package/dist/{android-DE4v59Mb.mjs → android-CBwCNicO.mjs} +2 -2
- package/dist/{android-B_YNZy61.mjs → android-DC3ZLuw0.mjs} +9 -9
- package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-BBFyr9CA.mjs} +5 -5
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/api-D0VtFhqk.mjs +152 -0
- package/dist/api-run.d.mts +1 -0
- package/dist/api-run.mjs +145 -0
- package/dist/api.d.mts +212 -0
- package/dist/api.mjs +2 -0
- package/dist/{app-install-VPkI5WEg.mjs → app-install-D-PUENug.mjs} +3 -3
- package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
- package/dist/{budget-DfcgFdQB.mjs → budget-DIhL2BKx.mjs} +1578 -58
- package/dist/build-facts-DcLv2HSd.d.mts +111 -0
- package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-BI7ozfmH.mjs} +3 -3
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{chrome-BrcVWQyD.mjs → chrome-DJnmnS5q.mjs} +1 -1
- package/dist/cli-DNJMwADx.mjs +68 -0
- package/dist/cli.mjs +1 -1
- package/dist/{client-SvBdgObD.mjs → client-DzhapoMB.mjs} +139 -32
- package/dist/collector-run.mjs +9 -9
- package/dist/{command-output-CDAIFD-8.mjs → command-output-CBtzyIgF.mjs} +2 -2
- package/dist/{config-D0DbpZtM.mjs → config-CgYMahz7.mjs} +5 -5
- package/dist/{created-devices-CpvzBL25.mjs → created-devices-DKbeWsiK.mjs} +2 -2
- package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-xKoOypBm.mjs} +2 -2
- package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-BLfcgc4O.mjs} +1 -1
- package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CLnIH02x.mjs} +2 -2
- package/dist/{device-C8IOoJPv.mjs → device-D7oCHGWi.mjs} +8 -8
- package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-EUOOYr8T.mjs} +13 -13
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{device-ios-C2Um-XUR.mjs → device-ios-6MewKKnc.mjs} +13 -13
- package/dist/{device-lease-DpoS36_u.mjs → device-lease-Co-EwifR.mjs} +9 -9
- package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-w1xhCqIW.mjs} +4 -4
- package/dist/{device-pool-3o7s5lo4.mjs → device-pool-F5WvRPtD.mjs} +3 -3
- package/dist/{device-remote-hFSkpfQu.mjs → device-remote-tHbd1fKy.mjs} +15 -15
- package/dist/{doctor-CFv1fCrF.mjs → doctor-B9ckYUoU.mjs} +33 -30
- package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics-BRXOqDzG.mjs} +11 -11
- package/dist/{exec-CaErVv7t.mjs → exec-DWhCZDGm.mjs} +65 -2
- package/dist/{gc-DEmkg3Xh.mjs → gc-Dh6mXOKC.mjs} +23 -469
- package/dist/{gradle-dJpre3Yn.mjs → gradle-C6GKnunQ.mjs} +6 -6
- package/dist/{guide-status-Du-ZQ3FD.mjs → guide-status-Bhf9SJXc.mjs} +3 -3
- package/dist/{guide-CSmhMTf8.mjs → guide-tm6igAaa.mjs} +290 -53
- package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bv285t_t.mjs} +3 -3
- package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C-rMtppF.mjs} +2 -2
- package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-D5mNmtj4.mjs} +1 -1
- package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-DN8Iz4mJ.mjs} +9 -9
- package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-B-wEjlwG.mjs} +5 -5
- package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DeeOG8xZ.mjs} +6 -6
- package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-jjtxAn5C.mjs} +7 -8
- package/dist/{ios-DSfnPfse.mjs → ios-B3SbOWdw.mjs} +19 -7
- package/dist/{ios-Cr1h5gnO.mjs → ios-Bvbf0SGY.mjs} +1 -1
- package/dist/{ios-BJ4XUSe1.mjs → ios-CPdkoKaa.mjs} +181 -95
- package/dist/ios-DNpdygiv.mjs +7 -0
- package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-Bn7jWDB1.mjs} +1 -1
- package/dist/{ios-device-pAN4t54-.mjs → ios-device-vOaByMhw.mjs} +3 -3
- package/dist/{ios-state-8L3lgum6.mjs → ios-state-B2pES6Vs.mjs} +1 -1
- package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-hskNcWkZ.mjs} +5 -5
- package/dist/{logs-BAaS7gS2.mjs → logs-1Ylc1Ri6.mjs} +13 -13
- package/dist/macos-Ck7OBMNY.mjs +2 -0
- package/dist/{macos-BIRQS90f.mjs → macos-DF6C7wUU.mjs} +118 -34
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +349 -47
- package/dist/{metro-g8NqiJp-.mjs → metro-Dh8T4Ytd.mjs} +5 -5
- package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-CEUw9RMH.mjs} +4 -4
- package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
- package/dist/{named-ports-C8m8EQs2.mjs → named-ports-BFIz1Shz.mjs} +61 -6
- package/dist/{native-run-D1Q56rAD.mjs → native-run-B06FkmZx.mjs} +4 -4
- package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-D_603JiC.mjs} +6 -6
- package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
- package/dist/offload-worker.d.mts +3 -17
- package/dist/offload-worker.mjs +10 -11
- package/dist/{ownership-DyRQru0q.mjs → ownership-D6Se7gg_.mjs} +3 -3
- package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
- package/dist/placement-log-BcPhRwR4.mjs +84 -0
- package/dist/{build-plan-BDsSi09V.mjs → plan-placement-CtxkCO54.mjs} +122 -48
- package/dist/{ports-4nYqxPWC.mjs → ports-BLTtfBq-.mjs} +3 -3
- package/dist/{prebuild-D7RUMkwN.mjs → prebuild-juCyreaR.mjs} +5 -5
- package/dist/preview-D5V07Nrl.mjs +987 -0
- package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
- package/dist/{project-D47Rh0ly.mjs → project-C3ChRLZy.mjs} +4 -68
- package/dist/projects-DD7dBTCj.mjs +92 -0
- package/dist/{pull-request-pxnDCQzn.mjs → pull-request-u4vp7zmK.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/{recordings-BNgsD1Tr.mjs → recordings-BAWltsVt.mjs} +1 -1
- package/dist/{reload-DcRxj3qG.mjs → reload-DvyWzVjJ.mjs} +15 -15
- package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-BGg7aGIZ.mjs} +5 -5
- package/dist/{run-CkE9y0nc.mjs → run-vhtDgpHO.mjs} +5 -5
- package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-B9E7S1aR.mjs} +4 -5
- package/dist/server-expo-Db9HBUoa.mjs +2 -0
- package/dist/{server-expo-CHTyXD0G.mjs → server-expo-DoBHhuzK.mjs} +5 -6
- package/dist/{settings-SR9OmW9h.mjs → settings-Byp2AQ_E.mjs} +6 -5
- package/dist/{settings-Cfd-0r2d.mjs → settings-CQyMElEP.mjs} +24 -763
- package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
- package/dist/settings.schema.json +126 -3
- package/dist/{simslim-BWNrc3M3.mjs → simslim-EHBQ2R4G.mjs} +7 -7
- package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-C1nqh4mu.mjs} +6 -6
- package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
- package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
- package/dist/{stage-CzaiwFsI.mjs → stage-g_WqWeaE.mjs} +14 -3
- package/dist/{start-DUz3mYdb.mjs → start-D-IeOyoK.mjs} +19 -19
- package/dist/{start-AlfCPRVU.mjs → start-NTc1Ifqs.mjs} +1 -1
- package/dist/{state-PeQiJuIu.mjs → state-BG-aAk4k.mjs} +4 -4
- package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
- package/dist/{state-DyaNTgfR.mjs → state-xnqpx3AD.mjs} +2 -2
- package/dist/{stats-Bq4fJOdB.mjs → stats-DY6ekz8F.mjs} +5 -5
- package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
- package/dist/{status-BA2pehwf.mjs → status-DCjZeE-K.mjs} +33 -34
- package/dist/{status-CzS4bPO9.mjs → status-Dcr0Qexd.mjs} +5 -5
- package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-Behws_fi.mjs} +1 -1
- package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-aR_WsNOA.mjs} +1 -1
- package/dist/{stop-BIiM49EY.mjs → stop-BGhKMOuH.mjs} +5 -5
- package/dist/{stop-DQIasgKp.mjs → stop-BTjs3xbc.mjs} +17 -18
- package/dist/{stop-zF1y04f2.mjs → stop-DIJtD2GL.mjs} +2 -2
- package/dist/supervisor-run.d.mts +24 -22
- package/dist/supervisor-run.mjs +21 -22
- package/dist/{support-CsJNVfOc.mjs → support-BaayeYCf.mjs} +7 -7
- package/dist/{support-WvD__tSV.mjs → support-Bwvbrq5-.mjs} +5 -5
- package/dist/{toolchain-DNyR3NPq.mjs → toolchain-Bnyd_K3A.mjs} +471 -22
- package/dist/{trigger-Bemu8ytw.mjs → trigger-CJMhwXe8.mjs} +5 -5
- package/dist/trigger-DWAq9hkw.mjs +2 -0
- package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-CjB-MP6H.mjs} +7 -7
- package/dist/web-B6_bFDn7.mjs +2 -0
- package/dist/{web-Dl0KSRHf.mjs → web-DTU0uiWj.mjs} +22 -22
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-C59dqG-Z.mjs} +3 -3
- package/dist/{ownership-BMLqyBgJ.mjs → workspaces-xXItD8Dj.mjs} +577 -23
- package/dist/{worktree-j3IcFAI5.mjs → worktree-BJfnU6r5.mjs} +1 -1
- package/dist/{worktree-Be_7NLKy.mjs → worktree-BSYlofkq.mjs} +234 -35
- package/dist/worktree-CsKYexJM.mjs +753 -0
- package/package.json +10 -5
- package/dist/build-progress-D0WkjCPd.mjs +0 -1036
- package/dist/build-slots-41v_d2x9.mjs +0 -142
- package/dist/cli-CYXb29oE.mjs +0 -51
- package/dist/deps-iKw0eD4P.mjs +0 -438
- package/dist/errors-B6W7FkxQ.mjs +0 -15
- package/dist/idle-BXG__1BA.mjs +0 -176
- package/dist/in-use-CvGOUn-x.mjs +0 -130
- package/dist/preview-B-g9d7kV.mjs +0 -318
- package/dist/process-identity-BmRm1qV0.mjs +0 -12
- package/dist/server-expo-CeakhI8P.mjs +0 -2
- package/dist/state-BKa8wNN5.mjs +0 -148
- package/dist/stop-cause-rhmGfwvt.mjs +0 -97
- package/dist/trigger-CXts6qt1.mjs +0 -2
- package/dist/watchman-APYjXSQa.mjs +0 -48
- package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
- package/dist/workspaces-Bcib97-6.mjs +0 -306
|
@@ -1,30 +1,52 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import { s as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { a as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
1
|
+
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
|
|
3
|
+
import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-CBtzyIgF.mjs";
|
|
5
|
+
import { E as upsertProject, u as getConcurrencyLimits } from "./config-CgYMahz7.mjs";
|
|
6
|
+
import { s as gitCommonDir, y as repoRoot } from "./worktree-CsKYexJM.mjs";
|
|
7
|
+
import { s as findProjectRoot$1, u as ownedDeviceLabel } from "./project-C3ChRLZy.mjs";
|
|
8
|
+
import { c as writeWorkspaceState, g as workspaceAgentDeviceDir, i as recordWorkspaceUse, u as ensureWorkspaceStorage, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
|
|
9
|
+
import { F as recordFinishedBuild, I as startBuildProgress, L as tapBuildLog, O as NO_BUILD_PROGRESS, P as recordBuildPhase } from "./budget-DIhL2BKx.mjs";
|
|
10
|
+
import { N as releaseBuildSlot, j as acquireBuildSlot } from "./workspaces-xXItD8Dj.mjs";
|
|
11
|
+
import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
|
|
12
|
+
import { E as sanitizeDeviceLabel } from "./ios-B3SbOWdw.mjs";
|
|
13
|
+
import { F as resolveSettings, i as SETTING_SHAPE_REMEDY, z as settingShapeErrors } from "./settings-CQyMElEP.mjs";
|
|
14
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-BFIz1Shz.mjs";
|
|
15
|
+
import { a as requiredMacosRecord, n as macosLogFile, r as macosProcess, t as macosDir } from "./state-xnqpx3AD.mjs";
|
|
16
|
+
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
17
|
+
import { _ as resolveBuildPlacement, a as offloadBuild, c as placementLoad, d as setRemoteLogSink, f as OffloadRefusal, h as parseBuildMachineOption, i as closeOffload, l as remotePhaseText, m as namedBuildMachine, n as buildPlacementCandidates, r as chooseBuildMachine, s as offloadPlacement } from "./client-DzhapoMB.mjs";
|
|
18
|
+
import { i as macosToolchain } from "./toolchain-Bnyd_K3A.mjs";
|
|
19
|
+
import { o as connectHost } from "./hosted-client-C-rMtppF.mjs";
|
|
20
|
+
import { t as buildPlacementRecord } from "./placement-log-BcPhRwR4.mjs";
|
|
21
|
+
import { f as withNativeBuildRun } from "./native-run-B06FkmZx.mjs";
|
|
22
|
+
import { t as placeHostedMacos } from "./hosted-macos-B-wEjlwG.mjs";
|
|
23
|
+
import { t as logLines } from "./run-vhtDgpHO.mjs";
|
|
24
|
+
import { i as validateInfoPlist, n as setBundleName, r as stageBundle, t as resolveBundleExtras } from "./stage-g_WqWeaE.mjs";
|
|
25
|
+
import { n as stopMacosAppHeld } from "./stop-BGhKMOuH.mjs";
|
|
24
26
|
import { closeSync, existsSync, mkdirSync, mkdtempSync, openSync, realpathSync, renameSync, rmSync } from "node:fs";
|
|
25
27
|
import { join, relative, resolve } from "node:path";
|
|
26
|
-
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
27
28
|
import { machineCapacity, readMacosRecord, validHostedAppArguments } from "@stim-cli/core/state";
|
|
29
|
+
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
30
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
31
|
+
//#region src/macos/app-name.ts
|
|
32
|
+
const DOT = String.fromCodePoint(183);
|
|
33
|
+
const ELLIPSIS = String.fromCodePoint(8230);
|
|
34
|
+
const LABEL_MAX = 24;
|
|
35
|
+
const PRODUCT_MAX = 40;
|
|
36
|
+
function clip(text, max) {
|
|
37
|
+
const chars = [...text];
|
|
38
|
+
return chars.length <= max ? text : `${chars.slice(0, max - 1).join("")}${ELLIPSIS}`;
|
|
39
|
+
}
|
|
40
|
+
/** The visible app name for a run: `<product> <dot> <label>`, or just the product when the label is empty. */
|
|
41
|
+
function macosAppName(product, label) {
|
|
42
|
+
const name = clip(product.replace(/[\p{Cc}/:\\]+/gu, " ").trim(), PRODUCT_MAX) || "App";
|
|
43
|
+
const suffix = clip(sanitizeDeviceLabel(label), LABEL_MAX);
|
|
44
|
+
return suffix ? `${name} ${DOT} ${suffix}` : name;
|
|
45
|
+
}
|
|
46
|
+
function workspaceAppName(root, product) {
|
|
47
|
+
return macosAppName(product, ownedDeviceLabel(root));
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
28
50
|
//#region src/macos/build.ts
|
|
29
51
|
async function tool(root, args, writer, note, capture = false) {
|
|
30
52
|
const child = spawnDeclared(() => getExecutor().spawn("swift", args, {
|
|
@@ -57,8 +79,12 @@ async function tool(root, args, writer, note, capture = false) {
|
|
|
57
79
|
});
|
|
58
80
|
return stdout.trim();
|
|
59
81
|
}
|
|
60
|
-
async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, scratch, writer, note, record, buildMachine, resources, assetCatalog, progress = NO_BUILD_PROGRESS }) {
|
|
82
|
+
async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, displayName, scratch, writer, note, record, buildMachine, resources, assetCatalog, progress = NO_BUILD_PROGRESS }) {
|
|
61
83
|
if (record) record.buildMachine = buildMachine;
|
|
84
|
+
setRemoteLogSink((entry) => writer.write({
|
|
85
|
+
...entry,
|
|
86
|
+
platform: "macos"
|
|
87
|
+
}));
|
|
62
88
|
validateInfoPlist(root, product, infoPlist);
|
|
63
89
|
const repository = realpathSync(repoRoot(root) ?? root);
|
|
64
90
|
const extras = resolveBundleExtras(root, repository, resources, assetCatalog);
|
|
@@ -72,7 +98,20 @@ async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, sc
|
|
|
72
98
|
note(msg);
|
|
73
99
|
};
|
|
74
100
|
let offloadFallback = null;
|
|
101
|
+
let asked = [];
|
|
102
|
+
let failedMachine;
|
|
75
103
|
const fallBack = (reason) => {
|
|
104
|
+
writer.write(buildPlacementRecord({
|
|
105
|
+
platform: "macos",
|
|
106
|
+
buildMachine,
|
|
107
|
+
candidates: asked,
|
|
108
|
+
event: "placement_fallback",
|
|
109
|
+
fallback: {
|
|
110
|
+
code: failedMachine ? "offload-failed" : "no-remote-mac-took-it",
|
|
111
|
+
reason,
|
|
112
|
+
machine: failedMachine
|
|
113
|
+
}
|
|
114
|
+
}));
|
|
76
115
|
if (namedBuildMachine(buildMachine)) throw new OffloadRefusal(buildMachine, reason);
|
|
77
116
|
offloadFallback = reason;
|
|
78
117
|
if (record) record.offloadFallback = reason;
|
|
@@ -122,10 +161,21 @@ async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, sc
|
|
|
122
161
|
here,
|
|
123
162
|
machines,
|
|
124
163
|
selected: buildMachine,
|
|
125
|
-
note: (line) => write(`offload: ${line}`)
|
|
164
|
+
note: (line) => write(`offload: ${line}`),
|
|
165
|
+
onCandidates: (each) => asked = each
|
|
126
166
|
});
|
|
127
167
|
if (typeof chosen === "string") throw new Error(chosen);
|
|
128
168
|
choice = chosen;
|
|
169
|
+
failedMachine = chosen.machine;
|
|
170
|
+
writer.write(buildPlacementRecord({
|
|
171
|
+
platform: "macos",
|
|
172
|
+
buildMachine,
|
|
173
|
+
candidates: asked,
|
|
174
|
+
chose: {
|
|
175
|
+
machine: chosen.machine,
|
|
176
|
+
reason: `${placement.reason}${placementLoad(chosen)}`
|
|
177
|
+
}
|
|
178
|
+
}));
|
|
129
179
|
write(`placement: ${choice.machine} (${placement.reason}${placementLoad(choice)})`);
|
|
130
180
|
const outcome = await offloadBuild({
|
|
131
181
|
choice,
|
|
@@ -171,6 +221,15 @@ async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, sc
|
|
|
171
221
|
]));
|
|
172
222
|
if (plist.CFBundleIdentifier !== bundleId || plist.CFBundleExecutable !== product || !existsSync(executable)) throw new Error("The fetched macOS bundle does not match the requested identity and executable.");
|
|
173
223
|
for (const destination of [...Object.keys(extras.resources), ...extras.assetCatalog ? ["Assets.car"] : []]) if (!existsSync(join(outcome.artifactPath, "Contents", "Resources", destination))) throw new Error(`The fetched macOS bundle lacks declared resource ${destination}.`);
|
|
224
|
+
if (displayName !== void 0) {
|
|
225
|
+
setBundleName(join(outcome.artifactPath, "Contents", "Info.plist"), displayName);
|
|
226
|
+
getExecutor().runFile("codesign", [
|
|
227
|
+
"--force",
|
|
228
|
+
"--sign",
|
|
229
|
+
"-",
|
|
230
|
+
outcome.artifactPath
|
|
231
|
+
]);
|
|
232
|
+
}
|
|
174
233
|
getExecutor().runFile("codesign", [
|
|
175
234
|
"--verify",
|
|
176
235
|
"--strict",
|
|
@@ -188,6 +247,14 @@ async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, sc
|
|
|
188
247
|
handoff: outcome.handoff ?? null
|
|
189
248
|
};
|
|
190
249
|
}
|
|
250
|
+
writer.write(buildPlacementRecord({
|
|
251
|
+
platform: "macos",
|
|
252
|
+
buildMachine,
|
|
253
|
+
stays: {
|
|
254
|
+
code: placement.code,
|
|
255
|
+
reason: placement.reason
|
|
256
|
+
}
|
|
257
|
+
}));
|
|
191
258
|
write(`placement: here (${placement.reason})`);
|
|
192
259
|
} catch (error) {
|
|
193
260
|
fallBack(error instanceof Error ? error.message : String(error));
|
|
@@ -226,7 +293,7 @@ async function buildMacosBundle({ root, product, infoPlist, bundle, bundleId, sc
|
|
|
226
293
|
], writer, () => {}, true);
|
|
227
294
|
progress.step("install");
|
|
228
295
|
const staged = join(staging, `${product}.app`);
|
|
229
|
-
stageBundle(root, product, infoPlist, bin, staged, bundleId, extras);
|
|
296
|
+
stageBundle(root, product, infoPlist, bin, staged, bundleId, extras, displayName);
|
|
230
297
|
promote(staged);
|
|
231
298
|
return {
|
|
232
299
|
bundleId,
|
|
@@ -312,7 +379,18 @@ async function runMacos(root, note = console.error, remote, buildMachineFlag) {
|
|
|
312
379
|
};
|
|
313
380
|
const handoff = await buildBundle(root, macos.infoPlist, record, remote !== void 0, note, macos, progress);
|
|
314
381
|
progress.step("launch");
|
|
315
|
-
|
|
382
|
+
const launched = () => {
|
|
383
|
+
try {
|
|
384
|
+
recordBuildPhase(root, "macos", record.build.startedAt, "launch", progress.durations().launch ?? 0);
|
|
385
|
+
} catch (error) {
|
|
386
|
+
note(`The launch time could not be recorded in the build history: ${error?.message || error}`);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
if (!remote) {
|
|
390
|
+
const here = await launchHere(root, record);
|
|
391
|
+
launched();
|
|
392
|
+
return here;
|
|
393
|
+
}
|
|
316
394
|
const connection = await connectHost(remote);
|
|
317
395
|
const write = (patch) => writeWorkspaceState(root, { macos: {
|
|
318
396
|
...record,
|
|
@@ -344,6 +422,7 @@ async function runMacos(root, note = console.error, remote, buildMachineFlag) {
|
|
|
344
422
|
hostLaunched: run.launched
|
|
345
423
|
};
|
|
346
424
|
writeWorkspaceState(root, { macos: placed });
|
|
425
|
+
launched();
|
|
347
426
|
return placed;
|
|
348
427
|
} catch (error) {
|
|
349
428
|
write({
|
|
@@ -372,12 +451,14 @@ async function buildBundle(root, infoPlist, record, hosted, note, extras, progre
|
|
|
372
451
|
try {
|
|
373
452
|
const { bundleId: base } = validateInfoPlist(root, record.product, infoPlist);
|
|
374
453
|
const bundleId = hosted ? base : `${base}.stim.${createHash("sha256").update(root).digest("hex").slice(0, 12)}`;
|
|
454
|
+
const displayName = workspaceAppName(root, record.product);
|
|
375
455
|
const built = await buildMacosBundle({
|
|
376
456
|
root,
|
|
377
457
|
product: record.product,
|
|
378
458
|
infoPlist,
|
|
379
459
|
bundle: record.bundle,
|
|
380
460
|
bundleId,
|
|
461
|
+
displayName,
|
|
381
462
|
scratch,
|
|
382
463
|
writer,
|
|
383
464
|
note,
|
|
@@ -388,6 +469,7 @@ async function buildBundle(root, infoPlist, record, hosted, note, extras, progre
|
|
|
388
469
|
assetCatalog: extras.assetCatalog
|
|
389
470
|
});
|
|
390
471
|
record.bundleId = built.bundleId;
|
|
472
|
+
record.displayName = displayName;
|
|
391
473
|
record.bundle = realpathSync(record.bundle);
|
|
392
474
|
record.executable = realpathSync(join(record.bundle, "Contents", "MacOS", record.product));
|
|
393
475
|
record.build = {
|
|
@@ -397,7 +479,7 @@ async function buildBundle(root, infoPlist, record, hosted, note, extras, progre
|
|
|
397
479
|
durationMs: Date.now() - started
|
|
398
480
|
};
|
|
399
481
|
writeWorkspaceState(root, { macos: record });
|
|
400
|
-
recordMacosBuild(root, record.build);
|
|
482
|
+
recordMacosBuild(root, record.build, progress.steps());
|
|
401
483
|
return built.handoff;
|
|
402
484
|
} catch (error) {
|
|
403
485
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -420,13 +502,13 @@ async function buildBundle(root, infoPlist, record, hosted, note, extras, progre
|
|
|
420
502
|
supervisor: void 0,
|
|
421
503
|
build
|
|
422
504
|
} });
|
|
423
|
-
recordMacosBuild(root, build);
|
|
505
|
+
recordMacosBuild(root, build, progress.steps());
|
|
424
506
|
throw error;
|
|
425
507
|
} finally {
|
|
426
508
|
writer.close();
|
|
427
509
|
}
|
|
428
510
|
}
|
|
429
|
-
function recordMacosBuild(root, build) {
|
|
511
|
+
function recordMacosBuild(root, build, compileSteps) {
|
|
430
512
|
recordFinishedBuild(root, {
|
|
431
513
|
platform: "macos",
|
|
432
514
|
status: build.state === "ok" ? "ok" : "failed",
|
|
@@ -441,7 +523,8 @@ function recordMacosBuild(root, build) {
|
|
|
441
523
|
buildMachine: build.buildMachine,
|
|
442
524
|
builtOn: build.builtOn,
|
|
443
525
|
offloadedTo: build.offloadedTo,
|
|
444
|
-
offloadFallback: build.offloadFallback
|
|
526
|
+
offloadFallback: build.offloadFallback,
|
|
527
|
+
...compileSteps === null ? {} : { compileSteps }
|
|
445
528
|
});
|
|
446
529
|
}
|
|
447
530
|
async function launchHere(root, record) {
|
|
@@ -485,11 +568,12 @@ function launchPayload(root, record) {
|
|
|
485
568
|
platform: "macos",
|
|
486
569
|
...record
|
|
487
570
|
};
|
|
488
|
-
const { product, launchId, build, host } = record;
|
|
571
|
+
const { product, displayName, launchId, build, host } = record;
|
|
489
572
|
return {
|
|
490
573
|
agentDevice,
|
|
491
574
|
platform: "macos",
|
|
492
575
|
product,
|
|
576
|
+
displayName,
|
|
493
577
|
launchId,
|
|
494
578
|
build,
|
|
495
579
|
host
|
|
@@ -511,4 +595,4 @@ function macosCommand(program) {
|
|
|
511
595
|
});
|
|
512
596
|
}
|
|
513
597
|
//#endregion
|
|
514
|
-
export {
|
|
598
|
+
export { runMacos as n, macosCommand as t };
|
package/dist/macos-run.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as runMacosSupervisor, t as logLines } from "./run-
|
|
1
|
+
import { n as runMacosSupervisor, t as logLines } from "./run-vhtDgpHO.mjs";
|
|
2
2
|
export { logLines, runMacosSupervisor };
|