stim 1.32.0 → 1.34.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.
Files changed (173) hide show
  1. package/dist/{acquire-artifact-CI9fIokp.mjs → acquire-artifact-B0SWoVNt.mjs} +2 -2
  2. package/dist/{act-BfChMxcU.mjs → act-7f7wIvCQ.mjs} +22 -22
  3. package/dist/{activity-yjH7Q3zn.mjs → activity-DkS-Ir6V.mjs} +6 -6
  4. package/dist/{agent-device-usage-output-DO412bsG.mjs → agent-device-usage-output-BVdgKbfz.mjs} +5 -5
  5. package/dist/{android-BeeC15Ve.mjs → android-B2DSKg-A.mjs} +2 -2
  6. package/dist/{android-D56S_GX3.mjs → android-BU4uBX8I.mjs} +5 -5
  7. package/dist/{android-BNm5A40S.mjs → android-D7qjT2fq.mjs} +87 -53
  8. package/dist/{android-DsEj2CCs.mjs → android-Iq0M2t2d.mjs} +27 -15
  9. package/dist/{android-cas-CbumHXIq.mjs → android-cas-Dhcjkys1.mjs} +4 -4
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/android-image-DFk26aY6.mjs +254 -0
  12. package/dist/{android-project-CCEQyYJK.d.mts → android-project-DhO6el8N.d.mts} +2 -2
  13. package/dist/api.d.mts +2 -1
  14. package/dist/api.mjs +28 -28
  15. package/dist/{apk-signed-tail-B9Usseps.mjs → apk-signed-tail-CPpA-3vu.mjs} +2 -2
  16. package/dist/{artifact-k1x9Jrn0.mjs → artifact-CNnTZs3R.mjs} +34 -21
  17. package/dist/{artifact-C8Nvp07y.mjs → artifact-DmRtKFXW.mjs} +13 -13
  18. package/dist/{artifact-platform-BO2Uvk_A.mjs → artifact-platform-DqCWUieN.mjs} +1 -1
  19. package/dist/{auto-placement--nfdQ9rp.mjs → auto-placement-DA65VQH7.mjs} +11 -9
  20. package/dist/{browser-web-6RDAeH0z.mjs → browser-web-Dn_hgKZC.mjs} +15 -15
  21. package/dist/{build-VXX_dtl5.mjs → build-D7SuVoRX.mjs} +23 -23
  22. package/dist/build-artifact-cache-D7B6seMj.mjs +174 -0
  23. package/dist/build-artifact-cache.d.mts +25 -0
  24. package/dist/build-artifact-cache.mjs +2 -0
  25. package/dist/{build-cache-BsKim4V7.mjs → build-cache-Cqj4FGnX.mjs} +20 -8
  26. package/dist/{build-plan-BK34X2iY.mjs → build-plan-Ct1FiA3E.mjs} +7 -7
  27. package/dist/{cache-manifest-CfiEny4T.mjs → cache-manifest-8JX9S1QJ.mjs} +1 -1
  28. package/dist/cache-manifest.mjs +1 -1
  29. package/dist/{ccache-BrwGIxmV.mjs → ccache-ChBMXlBq.mjs} +35 -67
  30. package/dist/{cdp-C3svvXiE.mjs → cdp-C216kOAn.mjs} +1 -1
  31. package/dist/{chrome-DyDWurWG.mjs → chrome-C8sC5tdl.mjs} +1 -1
  32. package/dist/{cli-Jc7obreB.mjs → cli-DjdvQG5U.mjs} +20 -20
  33. package/dist/cli.mjs +1 -1
  34. package/dist/{client-lDmA-5jx.mjs → client-kU37gURU.mjs} +70 -13
  35. package/dist/collector-run.mjs +7 -7
  36. package/dist/{command-output-CfPW1bKP.mjs → command-output-DjExb_tZ.mjs} +1 -1
  37. package/dist/{config-D5qNWJEP.mjs → config-BW0fAtoK.mjs} +256 -246
  38. package/dist/{dependencies-DkZ8681S.mjs → dependencies-CZ7c8XX_.mjs} +39 -39
  39. package/dist/{dependency-state-DZVln1P9.mjs → dependency-state-mL5g4H6K.mjs} +2 -2
  40. package/dist/{detached-entry-BPlSaCwC.mjs → detached-entry-tfrgGVWb.mjs} +1 -1
  41. package/dist/{dev-client-eDZy6RoX.mjs → dev-client-D3wOllNd.mjs} +2 -2
  42. package/dist/{device-CeIikWac.mjs → device-CWPFAqs0.mjs} +13 -13
  43. package/dist/{device-CTozKhU0.mjs → device-DH5yf6TU.mjs} +11 -11
  44. package/dist/{device-android-zgD9We85.mjs → device-android-ChfF5I9A.mjs} +10 -10
  45. package/dist/{device-capacity-Bki6B-7h.mjs → device-capacity-CHC3dKWg.mjs} +9 -9
  46. package/dist/device-host-worker.mjs +58 -17
  47. package/dist/{device-ios-TE5ejeXx.mjs → device-ios-B3-Ah--R.mjs} +9 -9
  48. package/dist/{device-lease-run-DeNGjJZM.mjs → device-lease-run-i3FNX4OE.mjs} +5 -5
  49. package/dist/{device-pool-mjyUYaau.mjs → device-pool-EZziQ0uS.mjs} +3 -3
  50. package/dist/{device-provision-j_B7G0e6.mjs → device-provision-CfpEy-Vm.mjs} +10 -10
  51. package/dist/{doctor-sSLtn-j1.mjs → doctor-B5uEZiKp.mjs} +30 -17
  52. package/dist/{doctor-CNZuvTSe.mjs → doctor-CGBsS_68.mjs} +1 -1
  53. package/dist/{doctor-BlrcoQ7B.mjs → doctor-dwRboaXx.mjs} +54 -25
  54. package/dist/{doctor-fingerprint-o7ZI9YLn.mjs → doctor-fingerprint-DqWvIhMb.mjs} +1 -1
  55. package/dist/doctor-fingerprint.mjs +1 -1
  56. package/dist/{doctor-watchman-CCuboyj1.mjs → doctor-watchman-r7M9UPi0.mjs} +5 -5
  57. package/dist/{eas-build-CaG-Sfs9.mjs → eas-build-BpHIt_M3.mjs} +4 -4
  58. package/dist/{eas-fallback-BpX1lpco.mjs → eas-fallback-CNPcjq3K.mjs} +6 -6
  59. package/dist/{eas-session-ledger-B-nTfdfk.mjs → eas-session-ledger-CXwagcQ7.mjs} +6 -6
  60. package/dist/{error-diagnostics-q56Im4D8.mjs → error-diagnostics-Ym2mjmJ0.mjs} +10 -10
  61. package/dist/{exec-aULwtNly.mjs → exec-CGuDzt40.mjs} +103 -103
  62. package/dist/{gc-By2Kc-Ek.mjs → gc-B464w_a5.mjs} +2 -2
  63. package/dist/{gc-Dv6nb9nf.mjs → gc-C7YxKNci.mjs} +25 -54
  64. package/dist/{guide-CwpsGWTJ.mjs → guide-BFW-cB7R.mjs} +141 -44
  65. package/dist/{hosted-android-c5nPJA6S.mjs → hosted-android-B7yfqXEy.mjs} +4 -4
  66. package/dist/{hosted-client-Hs-fD4L3.mjs → hosted-client-CQuzZwAu.mjs} +6 -5
  67. package/dist/{hosted-logs-BteXG8rm.mjs → hosted-logs-DfYCqrrR.mjs} +7 -7
  68. package/dist/{hosted-logs-sync-B8bjLEMs.mjs → hosted-logs-sync-Dlpa2mQF.mjs} +5 -5
  69. package/dist/{hosted-macos-B4byscei.mjs → hosted-macos-JKefapEm.mjs} +6 -6
  70. package/dist/{hosted-native-Bh9IJ_t5.mjs → hosted-native-B7OFt5gB.mjs} +14 -10
  71. package/dist/{idle-shutdown-BaeCo4ps.mjs → idle-shutdown-DPD8oV36.mjs} +6 -6
  72. package/dist/{ios-CdAV4-1E.mjs → ios-BdZdNsAj.mjs} +6 -6
  73. package/dist/{ios-D3oK9-O4.mjs → ios-DSBs9c6d.mjs} +28 -28
  74. package/dist/{ios-CsRVik64.mjs → ios-Qam0bT9n.mjs} +1 -1
  75. package/dist/{ios-device-CiBA-er9.mjs → ios-device-DLdEDWJj.mjs} +1 -1
  76. package/dist/{ios-device-D7Gi3e1I.mjs → ios-device-Drplrgzo.mjs} +3 -3
  77. package/dist/{ios-project-DDQlX_jX.mjs → ios-project-DoTQYghg.mjs} +7 -7
  78. package/dist/{ios-D1XKSITX.mjs → ios-sUPbWqEh.mjs} +8 -8
  79. package/dist/ios-signing-R34vbrNU.mjs +202 -0
  80. package/dist/{ios-state-BEIJRJ7P.mjs → ios-state-CWsBysyN.mjs} +1 -1
  81. package/dist/{js-swap-C8N5DXHl.mjs → js-swap-DrokhOfo.mjs} +6 -6
  82. package/dist/{launch-DxpvL6il.mjs → launch-Cy-MWEZc.mjs} +20 -20
  83. package/dist/{lightened-Df6II_XI.mjs → lightened-ALwQcQtV.mjs} +5 -5
  84. package/dist/{logs-zv3ge7c6.mjs → logs-DWT7jGpF.mjs} +6 -6
  85. package/dist/{logs-CuWJWF88.mjs → logs-DuED-01Z.mjs} +7 -7
  86. package/dist/{macos-C6U-4Iip.mjs → macos-CtBtA_hW.mjs} +22 -22
  87. package/dist/{macos-CbRZheLw.mjs → macos-kWGcfLzx.mjs} +1 -1
  88. package/dist/macos-run.mjs +1 -1
  89. package/dist/maintenance-run.mjs +6 -6
  90. package/dist/{metro-mKHEMO-a.mjs → metro-B5PVz0Wv.mjs} +4 -4
  91. package/dist/{metro-request-DODHNXCN.mjs → metro-request-2LmFpC1z.mjs} +2 -2
  92. package/dist/{named-ports-B0hCk2v-.mjs → named-ports-CA0nB9Yw.mjs} +3 -3
  93. package/dist/{native-android-9dVFqvTT.mjs → native-android-tISP2EVp.mjs} +29 -19
  94. package/dist/{native-gradle-artifact-inputs-BlY97pt8.mjs → native-gradle-artifact-inputs-DVoeZkrw.mjs} +5 -5
  95. package/dist/{native-runtime-DQfxW5Au.mjs → native-runtime-CNgxeOCG.mjs} +6 -6
  96. package/dist/{native-source-D1AzWiuP.mjs → native-source-ChAGj7R1.mjs} +1 -1
  97. package/dist/{native-xcode-inputs-tDuUvSU8.mjs → native-xcode-inputs-DGzkhpu4.mjs} +3 -3
  98. package/dist/{native-xcode-ios-CG-PD-7g.mjs → native-xcode-ios-B9nsfId2.mjs} +17 -17
  99. package/dist/offload-worker.d.mts +8 -1
  100. package/dist/offload-worker.mjs +62 -23
  101. package/dist/{operation-exec-Dp4FuIGR.mjs → operation-exec-DKlBcKAL.mjs} +1 -1
  102. package/dist/{ownership-CCfiBfOP.mjs → ownership-hC7xvvxF.mjs} +3 -3
  103. package/dist/{page-CQJlcj3x.mjs → page-Dj8IqvGM.mjs} +2 -2
  104. package/dist/{phone-reverses-CnNwdz9A.mjs → phone-reverses-Bo0EzJ-P.mjs} +4 -4
  105. package/dist/{placement-log-CRL0IY-k.mjs → placement-log-BsGvKLtU.mjs} +1 -1
  106. package/dist/{plan-placement-2imvnlWP.mjs → plan-placement-Am0IjuxB.mjs} +6 -6
  107. package/dist/{ports-CKktj5lV.mjs → ports-CNzg1LYD.mjs} +3 -3
  108. package/dist/{prebuild-CyNrUWgV.mjs → prebuild-BfJII57G.mjs} +12 -12
  109. package/dist/{project-Crtcbfl0.mjs → project-DU3jjnBE.mjs} +16 -16
  110. package/dist/{pull-request-BzLmzAIQ.mjs → pull-request-BpMTNkMB.mjs} +2 -2
  111. package/dist/pull-requests.mjs +1 -1
  112. package/dist/{react-native-android-Cabe2YER.mjs → react-native-android-3dZiJv-4.mjs} +37 -33
  113. package/dist/{react-native-build-DhWBUV_H.mjs → react-native-build-CuvNPt-q.mjs} +10 -10
  114. package/dist/{react-native-doctor-D-twmBon.mjs → react-native-doctor-a35BwMUO.mjs} +6 -6
  115. package/dist/{react-native-ios-u_ley41B.mjs → react-native-ios-CqnReM1t.mjs} +22 -17
  116. package/dist/{recordings-BWnIlhZH.mjs → recordings-AKZfsW2W.mjs} +1 -1
  117. package/dist/{registration-BwCe64PH.mjs → registration-DKjJGQ6p.mjs} +1 -1
  118. package/dist/{reload-D2TpUlns.mjs → reload-CC3sNo10.mjs} +17 -17
  119. package/dist/{reload-f9hvEHE9.mjs → reload-YPnvXGlB.mjs} +1 -1
  120. package/dist/{remote-BsBAjlD2.mjs → remote-BfaIHnhM.mjs} +9 -9
  121. package/dist/{result-EOsWV6sp.mjs → result-H-AxY7Ud.mjs} +24 -20
  122. package/dist/{run-2CHAJ9Oj.mjs → run-N-BbRxnC.mjs} +2 -2
  123. package/dist/{selection-C4ZQz_ER.mjs → selection-CH-MUVGD.mjs} +5 -4
  124. package/dist/{server-bare-CFyVFZXJ.mjs → server-bare-BTlICuaX.mjs} +2 -2
  125. package/dist/{server-command-BMyKtnjH.mjs → server-command-Bn_gOObU.mjs} +5 -5
  126. package/dist/server-expo-B59N16uT.mjs +2 -0
  127. package/dist/{server-expo-BLxcN2x2.mjs → server-expo-CUJ2fuv1.mjs} +3 -3
  128. package/dist/{settings-C6UTYW2K.mjs → settings-B5IBDfTx.mjs} +4 -4
  129. package/dist/{settings-jeS0WmUF.mjs → settings-DoWHJopy.mjs} +2 -2
  130. package/dist/{settings-payload-CrX933Xi.mjs → settings-payload-Bxw3hid5.mjs} +5 -5
  131. package/dist/{settings-write-DMcT23Kl.mjs → settings-write-C6d7EC54.mjs} +6 -6
  132. package/dist/settings.schema.json +38 -0
  133. package/dist/{simslim-93xmPh-d.mjs → simslim-DKdJx0LL.mjs} +2 -2
  134. package/dist/{slot-launch-CSpQcFZw.mjs → slot-launch-kq0-7w9C.mjs} +6 -6
  135. package/dist/{stage-Cf9uSM1a.mjs → stage-CBfMTUK3.mjs} +2 -2
  136. package/dist/{start-CquYgzVf.mjs → start-Diu8q6_U.mjs} +1 -1
  137. package/dist/{start-CLN_r9EG.mjs → start-WTMumMHi.mjs} +12 -12
  138. package/dist/{state-CM_HvvkS.mjs → state-CtmYTRWm.mjs} +4 -4
  139. package/dist/{state-CiflgxTP.mjs → state-DSOUqO-o.mjs} +2 -2
  140. package/dist/{stats-BVEZuSlg.mjs → stats-D4cW247z.mjs} +5 -5
  141. package/dist/{stats-report-B86Cv7Uc.mjs → stats-report-BVRCqwWA.mjs} +1 -1
  142. package/dist/{status-Bhdy07v0.mjs → status-B-oeWS0Z.mjs} +1 -1
  143. package/dist/{status-D0ruTmPl.mjs → status-CEwxo-PS.mjs} +37 -28
  144. package/dist/{status-GQ-JqvRi.mjs → status-DTFhDnd1.mjs} +1 -1
  145. package/dist/{status-watch-DSu_hhg6.mjs → status-watch-D63R5nSI.mjs} +5 -5
  146. package/dist/status-worker.mjs +1 -1
  147. package/dist/{stim-desktop-1XxET4S8.mjs → stim-desktop-_WTria-r.mjs} +2 -2
  148. package/dist/{stop-RZqER_Ww.mjs → stop-Dm9ON6Os.mjs} +2 -2
  149. package/dist/{stop-B616ZyTv.mjs → stop-HL2RvhrE.mjs} +5 -5
  150. package/dist/{stop-W4DK8qZq.mjs → stop-vX4w3_8V.mjs} +16 -16
  151. package/dist/supervisor-run.mjs +16 -16
  152. package/dist/{support-S_5nkkzs.mjs → support-BNe1_Hg7.mjs} +18 -8
  153. package/dist/{support-NxnD8QXd.mjs → support-ivsfDj0v.mjs} +9 -9
  154. package/dist/{swiftpm-artifact-inputs-yp8D5LE4.mjs → swiftpm-artifact-inputs-uq5oV7xR.mjs} +4 -4
  155. package/dist/{swiftpm-macos-Gtq9bNQb.mjs → swiftpm-macos-ClF203_2.mjs} +11 -11
  156. package/dist/{toolchain-B2bN8jEo.mjs → toolchain-CECahBDa.mjs} +1 -1
  157. package/dist/{toolchain-Bnm8vUCV.mjs → toolchain-CYonNjd_.mjs} +429 -20
  158. package/dist/{trigger-CfnOfpDd.mjs → trigger-BtB4kbe0.mjs} +2 -2
  159. package/dist/trigger-D8B7QR0q.mjs +2 -0
  160. package/dist/{warm-progress-_aTMvkIH.mjs → warm-progress-q11Vdvhh.mjs} +6 -6
  161. package/dist/{web-BdWG8b5_.mjs → web-BdaMBr2O.mjs} +9 -9
  162. package/dist/web-CIpHpGp8.mjs +2 -0
  163. package/dist/web-run.mjs +8 -8
  164. package/dist/windows-report.mjs +1 -1
  165. package/dist/{workspace-state-3bF4TB8P.mjs → workspace-state-BdZ-QgmB.mjs} +3 -3
  166. package/dist/{workspaces-C59v9bpD.mjs → workspaces-B9v5V7Es.mjs} +14 -14
  167. package/dist/{worktree-CinoSsGy.mjs → worktree-C3N86KpI.mjs} +77 -31
  168. package/dist/{worktree-K9F50fD_.mjs → worktree-C4MBOMz7.mjs} +1 -1
  169. package/package.json +12 -7
  170. package/dist/ios-signing-BJzvDPfU.mjs +0 -489
  171. package/dist/server-expo-DwR3eD-a.mjs +0 -2
  172. package/dist/trigger-DBZ-GBrl.mjs +0 -2
  173. package/dist/web-DwuluWJt.mjs +0 -2
@@ -1,489 +0,0 @@
1
- import { c as throwIfCancelled, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { a as killOnAbort, r as childEnvironment } from "./operation-exec-Dp4FuIGR.mjs";
3
- import { X509Certificate } from "node:crypto";
4
- import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
5
- import { tmpdir } from "node:os";
6
- import { join } from "node:path";
7
- //#region src/engine/ios-profile.ts
8
- const TAG = /<(\/?)\s*([A-Za-z0-9_]+)(?:\s[^>]*?)?(\/?)>/g;
9
- const ENTITIES = {
10
- amp: "&",
11
- lt: "<",
12
- gt: ">",
13
- quot: "\"",
14
- apos: "'"
15
- };
16
- var PlistError = class extends Error {};
17
- function codePoint(value) {
18
- if (!Number.isInteger(value) || value < 0 || value > 1114111 || value >= 55296 && value <= 57343) throw new PlistError(`character reference out of range: ${value}`);
19
- return String.fromCodePoint(value);
20
- }
21
- function decodeEntities(raw) {
22
- return raw.replace(/&(#x?[0-9A-Fa-f]+|[a-z]+);/g, (match, body) => {
23
- if (body.startsWith("#x") || body.startsWith("#X")) return codePoint(Number.parseInt(body.slice(2), 16));
24
- if (body.startsWith("#")) return codePoint(Number.parseInt(body.slice(1), 10));
25
- return ENTITIES[body] ?? match;
26
- });
27
- }
28
- function peekTag(cursor) {
29
- TAG.lastIndex = cursor.pos;
30
- const match = TAG.exec(cursor.xml);
31
- if (!match) return null;
32
- return {
33
- name: (match[2] ?? "").toLowerCase(),
34
- closing: match[1] === "/",
35
- selfClosing: match[3] === "/",
36
- end: TAG.lastIndex
37
- };
38
- }
39
- function takeTag(cursor) {
40
- const tag = peekTag(cursor);
41
- if (tag) cursor.pos = tag.end;
42
- return tag;
43
- }
44
- function takeText(cursor, name) {
45
- const close = cursor.xml.indexOf(`</${name}>`, cursor.pos);
46
- if (close < 0) {
47
- cursor.pos = cursor.xml.length;
48
- return "";
49
- }
50
- const raw = cursor.xml.slice(cursor.pos, close);
51
- cursor.pos = close + name.length + 3;
52
- return raw;
53
- }
54
- function parseValue(cursor) {
55
- const peeked = peekTag(cursor);
56
- if (!peeked || peeked.closing) return void 0;
57
- const tag = takeTag(cursor);
58
- if (tag.selfClosing) {
59
- if (tag.name === "true") return true;
60
- if (tag.name === "false") return false;
61
- if (tag.name === "array") return [];
62
- if (tag.name === "dict") return {};
63
- return "";
64
- }
65
- switch (tag.name) {
66
- case "plist": return parseValue(cursor);
67
- case "dict": {
68
- const out = {};
69
- for (;;) {
70
- const next = peekTag(cursor);
71
- if (!next) break;
72
- if (next.closing) {
73
- cursor.pos = next.end;
74
- break;
75
- }
76
- cursor.pos = next.end;
77
- if (next.name !== "key") continue;
78
- const key = decodeEntities(next.selfClosing ? "" : takeText(cursor, "key"));
79
- const value = parseValue(cursor);
80
- if (value !== void 0) out[key] = value;
81
- }
82
- return out;
83
- }
84
- case "array": {
85
- const out = [];
86
- for (;;) {
87
- const next = peekTag(cursor);
88
- if (!next) break;
89
- if (next.closing) {
90
- cursor.pos = next.end;
91
- break;
92
- }
93
- const value = parseValue(cursor);
94
- if (value === void 0) break;
95
- out.push(value);
96
- }
97
- return out;
98
- }
99
- case "string":
100
- case "key": return decodeEntities(takeText(cursor, tag.name));
101
- case "integer": return Number.parseInt(takeText(cursor, "integer").trim(), 10);
102
- case "real": return Number.parseFloat(takeText(cursor, "real").trim());
103
- case "date": return new Date(takeText(cursor, "date").trim());
104
- case "data": return Buffer.from(takeText(cursor, "data").replace(/\s+/g, ""), "base64");
105
- case "true":
106
- takeText(cursor, "true");
107
- return true;
108
- case "false":
109
- takeText(cursor, "false");
110
- return false;
111
- default:
112
- takeText(cursor, tag.name);
113
- return "";
114
- }
115
- }
116
- function parsePlist(xml) {
117
- if (typeof xml !== "string" || xml.trim() === "") return null;
118
- const stripped = xml.replace(/<!--[\s\S]*?-->/g, "");
119
- const start = stripped.indexOf("<plist");
120
- const cursor = {
121
- xml: stripped,
122
- pos: start < 0 ? 0 : start
123
- };
124
- try {
125
- const value = parseValue(cursor);
126
- return value === void 0 ? null : value;
127
- } catch {
128
- return null;
129
- }
130
- }
131
- function isDict(value) {
132
- return value !== null && typeof value === "object" && !Array.isArray(value) && !Buffer.isBuffer(value) && !(value instanceof Date);
133
- }
134
- function stringsOf(value) {
135
- if (!Array.isArray(value)) return null;
136
- return value.filter((v) => typeof v === "string");
137
- }
138
- function parseProvisioningProfilePlist(xml) {
139
- const root = parsePlist(xml);
140
- if (!isDict(root)) return null;
141
- const entitlements = isDict(root.Entitlements ?? null) ? root.Entitlements : {};
142
- const teamIdentifier = stringsOf(root.TeamIdentifier);
143
- const expiration = root.ExpirationDate;
144
- const certificates = Array.isArray(root.DeveloperCertificates) ? root.DeveloperCertificates.filter((v) => Buffer.isBuffer(v)) : [];
145
- return {
146
- name: typeof root.Name === "string" ? root.Name : null,
147
- uuid: typeof root.UUID === "string" ? root.UUID : null,
148
- teamIdentifier: teamIdentifier?.[0] ?? null,
149
- expirationDate: expiration instanceof Date && !Number.isNaN(expiration.getTime()) ? expiration : null,
150
- provisionedDevices: stringsOf(root.ProvisionedDevices),
151
- provisionsAllDevices: root.ProvisionsAllDevices === true,
152
- getTaskAllow: entitlements["get-task-allow"] === true,
153
- certificates
154
- };
155
- }
156
- function provisioningProfileKind(profile) {
157
- if (profile.provisionedDevices) return profile.getTaskAllow ? "development" : "ad hoc";
158
- return profile.provisionsAllDevices ? "enterprise" : "App Store";
159
- }
160
- function certificateCommonName(der) {
161
- if (!Buffer.isBuffer(der) || der.length === 0) return null;
162
- let subject;
163
- try {
164
- subject = new X509Certificate(der).subject;
165
- } catch {
166
- return null;
167
- }
168
- for (const part of String(subject).split(/\r?\n/)) {
169
- const trimmed = part.trim();
170
- if (trimmed.startsWith("CN=")) return trimmed.slice(3).trim() || null;
171
- }
172
- return /(?:^|,)\s*CN=([^,]+)/.exec(String(subject))?.[1]?.trim() || null;
173
- }
174
- const IDENTITY_LINE = /^\s*\d+\)\s+([0-9A-Fa-f]{40})\s+"(.+)"\s*$/;
175
- function parseSigningIdentities(text) {
176
- if (typeof text !== "string") return [];
177
- const out = [];
178
- for (const line of text.split(/\r?\n/)) {
179
- const match = IDENTITY_LINE.exec(line);
180
- if (!match) continue;
181
- out.push({
182
- sha1: match[1].toUpperCase(),
183
- name: match[2]
184
- });
185
- }
186
- return out;
187
- }
188
- const SIGNING_CODES = {
189
- noProfile: "STIM_NO_PROFILE",
190
- profileMismatch: "STIM_PROFILE_MISMATCH",
191
- noIdentity: "STIM_NO_SIGNING_IDENTITY",
192
- codesignFailed: "STIM_CODESIGN_FAILED"
193
- };
194
- const XCODE_STEP = "run `stim device provision ios`, which asks before it registers the device or creates the profile (agents run it only with the user's go-ahead), or build once from Xcode to install it. A build never does this, because registering a device or minting a profile changes your Apple Developer account.";
195
- const KEYCHAIN_REMEDY = "Open Xcode > Settings > Accounts and download your certificates, or unlock the login keychain with `security unlock-keychain`. `security find-identity -v -p codesigning` should list `Apple Development: ...`.";
196
- function signingConfiguration(input) {
197
- return input.configuration ?? "Debug";
198
- }
199
- function profileGate(input) {
200
- const now = input.now ?? Date.now();
201
- if (!input.profilePresent) return {
202
- ok: false,
203
- code: SIGNING_CODES.noProfile,
204
- reason: "The app bundle has no embedded.mobileprovision, so it was built unsigned or for the simulator.",
205
- remedy: `Set a team and profile for the target's ${signingConfiguration(input)} configuration in Xcode > Signing & Capabilities, then ${XCODE_STEP}`
206
- };
207
- if (!input.profile) return {
208
- ok: false,
209
- code: SIGNING_CODES.noProfile,
210
- reason: "`openssl smime` could not decode the app bundle's embedded.mobileprovision.",
211
- remedy: `The profile inside the app is corrupt. Delete the build cache entry with \`stim gc --delete\`, then ${XCODE_STEP}`
212
- };
213
- const profile = input.profile;
214
- const named = profile.name ? `"${profile.name}"` : "the embedded profile";
215
- if (!profile.expirationDate || profile.expirationDate.getTime() <= now) return {
216
- ok: false,
217
- code: SIGNING_CODES.profileMismatch,
218
- reason: profile.expirationDate ? `The ${provisioningProfileKind(profile)} profile ${named} expired on ${profile.expirationDate.toISOString()}.` : `The ${provisioningProfileKind(profile)} profile ${named} carries no ExpirationDate, so Stim cannot prove it is still valid.`,
219
- remedy: `Renew the profile under Signing & Capabilities, then ${XCODE_STEP}`
220
- };
221
- if (!profile.provisionedDevices) {
222
- const kind = provisioningProfileKind(profile);
223
- return {
224
- ok: false,
225
- code: SIGNING_CODES.profileMismatch,
226
- reason: `${named} is an ${kind} profile, which carries no ProvisionedDevices list, so Stim cannot prove ${input.udid ?? "the target device"} is admitted.`,
227
- remedy: `Local device runs need a development profile. Select one under Signing & Capabilities, then ${XCODE_STEP}`
228
- };
229
- }
230
- const udid = input.udid;
231
- if (!udid || !profile.provisionedDevices.some((d) => d.toLowerCase() === udid.toLowerCase())) return {
232
- ok: false,
233
- code: SIGNING_CODES.profileMismatch,
234
- reason: `The ${provisioningProfileKind(profile)} profile ${named} lists ${profile.provisionedDevices.length} device(s) and ${udid ?? "the target device"} is not one of them.`,
235
- remedy: `Run \`stim device provision ios${udid ? ` ${udid}` : ""}\`, which asks before it registers the device and refreshes the profile (agents run it only with the user's go-ahead), or register it at developer.apple.com, regenerate the profile and build once from Xcode. A build never does this, because registering a device or minting a profile changes your Apple Developer account.`
236
- };
237
- return {
238
- ok: true,
239
- profile
240
- };
241
- }
242
- function signingGate(input) {
243
- const gated = profileGate(input);
244
- if (!gated.ok) return gated;
245
- const profile = gated.profile;
246
- const named = profile.name ? `"${profile.name}"` : "the embedded profile";
247
- const identities = Array.isArray(input.identities) ? input.identities : [];
248
- if (identities.length === 0) return {
249
- ok: false,
250
- code: SIGNING_CODES.noIdentity,
251
- reason: "`security find-identity -v -p codesigning` lists no codesigning identity on this machine.",
252
- remedy: KEYCHAIN_REMEDY
253
- };
254
- if (input.pinnedSha1) {
255
- const wanted = input.pinnedSha1.trim().toUpperCase();
256
- const match = identities.find((i) => i.sha1 === wanted);
257
- if (match) return {
258
- ok: true,
259
- identity: match
260
- };
261
- return {
262
- ok: false,
263
- code: SIGNING_CODES.noIdentity,
264
- reason: `ios.signingIdentitySha1 is ${wanted}, which is not in the keychain. Available: ${identities.map((i) => `${i.sha1} "${i.name}"`).join(", ")}.`,
265
- remedy: KEYCHAIN_REMEDY
266
- };
267
- }
268
- const wantedName = input.pinnedName?.trim() || certificateCommonName(profile.certificates[0] ?? null);
269
- if (!wantedName) return {
270
- ok: false,
271
- code: SIGNING_CODES.noIdentity,
272
- reason: `Stim could not read a signing-identity name out of ${named}: its DeveloperCertificates entry has no readable subject CN.`,
273
- remedy: "Set ios.signingIdentity in .stim.json to the identity name to re-sign with, or ios.signingIdentitySha1 to its SHA-1 hash."
274
- };
275
- const matches = identities.filter((i) => i.name === wantedName);
276
- if (matches.length === 1) return {
277
- ok: true,
278
- identity: matches[0]
279
- };
280
- if (matches.length === 0) return {
281
- ok: false,
282
- code: SIGNING_CODES.noIdentity,
283
- reason: `The app was signed by "${wantedName}", which is not in this machine's keychain. Available: ${identities.map((i) => `"${i.name}"`).join(", ")}.`,
284
- remedy: `${KEYCHAIN_REMEDY} Or set ios.signingIdentity in .stim.json to one of the identities listed above.`
285
- };
286
- return {
287
- ok: false,
288
- code: SIGNING_CODES.noIdentity,
289
- reason: `${matches.length} keychain identities share the name "${wantedName}", so Stim cannot pick one: ${matches.map((i) => i.sha1).join(", ")}.`,
290
- remedy: "Set ios.signingIdentitySha1 in .stim.json to the SHA-1 hash of the certificate to sign with."
291
- };
292
- }
293
- //#endregion
294
- //#region src/engine/ios-signing.ts
295
- const EMBEDDED_PROFILE = "embedded.mobileprovision";
296
- const SIGNING_TIMEOUT_MS = 12e4;
297
- function lastLines(text, count = 5) {
298
- return String(text ?? "").split(/\r?\n/).map((line) => line.trimEnd()).filter((line) => line.trim() !== "").slice(-count);
299
- }
300
- function errorText(error) {
301
- const withOutput = error;
302
- const stderr = String(withOutput?.stderr ?? "").trim();
303
- const stdout = String(withOutput?.stdout ?? "").trim();
304
- return stderr || stdout || String(withOutput?.message ?? error);
305
- }
306
- async function signingCommand(file, args, { exec, env, signal }) {
307
- throwIfCancelled(signal, "iOS signing");
308
- try {
309
- const output = await (exec || getExecutor()).runFileAsync(file, args, {
310
- timeoutMs: SIGNING_TIMEOUT_MS,
311
- ...env ? childEnvironment(env) : {},
312
- onSpawn: killOnAbort(signal)
313
- });
314
- throwIfCancelled(signal, "iOS signing");
315
- return output;
316
- } catch (error) {
317
- throwIfCancelled(signal, "iOS signing");
318
- throw error;
319
- }
320
- }
321
- async function readEmbeddedProfile(appPath, options = {}) {
322
- throwIfCancelled(options.signal, "iOS signing");
323
- const path = join(appPath, EMBEDDED_PROFILE);
324
- if (!existsSync(path)) return {
325
- present: false,
326
- profile: null
327
- };
328
- const plist = await decodeProvisioningProfile(path, options);
329
- return {
330
- present: true,
331
- profile: plist === null ? null : parseProvisioningProfilePlist(plist)
332
- };
333
- }
334
- async function decodeProvisioningProfile(path, options = {}) {
335
- try {
336
- return await signingCommand("/usr/bin/openssl", [
337
- "smime",
338
- "-verify",
339
- "-noverify",
340
- "-inform",
341
- "DER",
342
- "-in",
343
- path
344
- ], options);
345
- } catch {
346
- throwIfCancelled(options.signal, "iOS signing");
347
- return null;
348
- }
349
- }
350
- async function findSigningIdentities(options = {}) {
351
- return await probeSigningIdentities(options) ?? [];
352
- }
353
- /** The keychain's code signing identities, or null when `security find-identity` itself failed. */
354
- async function probeSigningIdentities(options = {}) {
355
- try {
356
- return parseSigningIdentities(await signingCommand("security", [
357
- "find-identity",
358
- "-v",
359
- "-p",
360
- "codesigning"
361
- ], options));
362
- } catch {
363
- throwIfCancelled(options.signal, "iOS signing");
364
- return null;
365
- }
366
- }
367
- async function gateProfileForDevice(options) {
368
- const read = await readEmbeddedProfile(options.appPath, options);
369
- return profileGate({
370
- profilePresent: read.present,
371
- profile: read.profile,
372
- identities: [],
373
- udid: options.udid,
374
- configuration: options.configuration ?? null,
375
- ...options.now === void 0 ? {} : { now: options.now }
376
- });
377
- }
378
- async function gateAppForDevice(options) {
379
- const read = await readEmbeddedProfile(options.appPath, options);
380
- return signingGate({
381
- profilePresent: read.present,
382
- profile: read.profile,
383
- identities: read.present ? await findSigningIdentities(options) : [],
384
- udid: options.udid,
385
- configuration: options.configuration ?? null,
386
- pinnedName: options.pinnedName ?? null,
387
- pinnedSha1: options.pinnedSha1 ?? null,
388
- ...options.now === void 0 ? {} : { now: options.now }
389
- });
390
- }
391
- async function extractEntitlements(appPath, options) {
392
- try {
393
- return String(await signingCommand("codesign", [
394
- "-d",
395
- "--entitlements",
396
- "-",
397
- "--xml",
398
- appPath
399
- ], options)).trim();
400
- } catch {
401
- throwIfCancelled(options.signal, "iOS signing");
402
- return "";
403
- }
404
- }
405
- async function resealBundle({ appPath, identity, ...options }) {
406
- const signAs = identity.sha1 || identity.name;
407
- let mode = "preserve-metadata";
408
- let preserveError = null;
409
- try {
410
- await signingCommand("codesign", [
411
- "--force",
412
- "--sign",
413
- signAs,
414
- "--preserve-metadata=identifier,entitlements,flags,runtime",
415
- appPath
416
- ], options);
417
- } catch (error) {
418
- throwIfCancelled(options.signal, "iOS signing");
419
- preserveError = error;
420
- }
421
- let tempDir = null;
422
- if (preserveError) {
423
- const entitlements = await extractEntitlements(appPath, options);
424
- const args = [
425
- "--force",
426
- "--sign",
427
- signAs
428
- ];
429
- if (entitlements !== "") {
430
- tempDir = mkdtempSync(join(tmpdir(), "stim-entitlements-"));
431
- const plist = join(tempDir, "entitlements.plist");
432
- writeFileSync(plist, `${entitlements}\n`, "utf-8");
433
- args.push("--entitlements", plist);
434
- mode = "entitlements";
435
- } else mode = "no-entitlements";
436
- args.push(appPath);
437
- try {
438
- await signingCommand("codesign", args, options);
439
- } catch (error) {
440
- throwIfCancelled(options.signal, "iOS signing");
441
- return {
442
- ok: false,
443
- code: SIGNING_CODES.codesignFailed,
444
- reason: `codesign could not re-seal ${appPath} with "${identity.name}": ${errorText(error)}`,
445
- remedy: `Unlock the login keychain (\`security unlock-keychain\`) and confirm exactly one identity matches "${identity.name}".`,
446
- lastLines: [...lastLines(errorText(preserveError)), ...lastLines(errorText(error))]
447
- };
448
- } finally {
449
- if (tempDir) rmSync(tempDir, {
450
- recursive: true,
451
- force: true
452
- });
453
- }
454
- }
455
- try {
456
- await signingCommand("codesign", [
457
- "--verify",
458
- "--strict",
459
- appPath
460
- ], options);
461
- } catch (error) {
462
- throwIfCancelled(options.signal, "iOS signing");
463
- return {
464
- ok: false,
465
- code: SIGNING_CODES.codesignFailed,
466
- reason: `codesign --verify --strict rejected ${appPath} after re-sealing it with "${identity.name}": ${errorText(error)}`,
467
- remedy: "The bundle signed but did not seal. Delete the cached artifact with `stim gc --delete` and build fresh, then retry.",
468
- lastLines: lastLines(errorText(error))
469
- };
470
- }
471
- return {
472
- ok: true,
473
- identity,
474
- mode
475
- };
476
- }
477
- async function sealAppForDevice(options) {
478
- const gate = await gateAppForDevice(options);
479
- if (!gate.ok) return {
480
- ...gate,
481
- lastLines: []
482
- };
483
- return resealBundle({
484
- ...options,
485
- identity: gate.identity
486
- });
487
- }
488
- //#endregion
489
- export { sealAppForDevice as a, probeSigningIdentities as i, findSigningIdentities as n, parsePlist as o, gateProfileForDevice as r, parseProvisioningProfilePlist as s, decodeProvisioningProfile as t };
@@ -1,2 +0,0 @@
1
- import { m as startExpoServer } from "./server-expo-BLxcN2x2.mjs";
2
- export { startExpoServer };
@@ -1,2 +0,0 @@
1
- import { t as triggerMaintenance } from "./trigger-CfnOfpDd.mjs";
2
- export { triggerMaintenance };
@@ -1,2 +0,0 @@
1
- import { n as webCommand, t as runWeb } from "./web-BdWG8b5_.mjs";
2
- export { webCommand as default, runWeb };