react-native-update-cli 2.22.7 → 2.22.9

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 (65) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/cli.json +5 -0
  4. package/lib/api.d.ts +7 -0
  5. package/lib/api.js +106 -38
  6. package/lib/app.js +3 -2
  7. package/lib/bin.js +16 -2
  8. package/lib/bundle-runner.d.ts +11 -4
  9. package/lib/bundle-runner.js +176 -90
  10. package/lib/bundle.d.ts +1 -0
  11. package/lib/bundle.js +2 -0
  12. package/lib/diff.d.ts +9 -0
  13. package/lib/diff.js +162 -120
  14. package/lib/locales/en.d.ts +1 -0
  15. package/lib/locales/en.js +1 -0
  16. package/lib/locales/zh.d.ts +1 -0
  17. package/lib/locales/zh.js +1 -0
  18. package/lib/native-package.d.ts +5 -1
  19. package/lib/native-package.js +145 -84
  20. package/lib/package.d.ts +7 -3
  21. package/lib/package.js +22 -12
  22. package/lib/types.d.ts +2 -0
  23. package/lib/utils/dep-versions.d.ts +7 -0
  24. package/lib/utils/dep-versions.js +66 -31
  25. package/lib/utils/hbcTransform.d.ts +21 -0
  26. package/lib/utils/hbcTransform.js +146 -5
  27. package/lib/utils/hermes-base.d.ts +21 -4
  28. package/lib/utils/hermes-base.js +146 -37
  29. package/lib/utils/http-helper.d.ts +6 -1
  30. package/lib/utils/http-helper.js +23 -11
  31. package/lib/utils/index.d.ts +30 -1
  32. package/lib/utils/index.js +98 -24
  33. package/lib/utils/latest-version/index.d.ts +11 -8
  34. package/lib/utils/latest-version/index.js +91 -25
  35. package/lib/utils/zip-entries.js +20 -15
  36. package/lib/utils/zip-options.d.ts +2 -0
  37. package/lib/utils/zip-options.js +9 -4
  38. package/lib/utils/zip-range.d.ts +47 -15
  39. package/lib/utils/zip-range.js +192 -83
  40. package/lib/utils/zip-raw-writer.d.ts +47 -0
  41. package/lib/utils/zip-raw-writer.js +204 -0
  42. package/lib/versions.js +19 -9
  43. package/package.json +10 -12
  44. package/src/api.ts +126 -46
  45. package/src/app.ts +3 -2
  46. package/src/bin.ts +17 -2
  47. package/src/bundle-runner.ts +225 -113
  48. package/src/bundle.ts +3 -0
  49. package/src/diff.ts +210 -153
  50. package/src/locales/en.ts +2 -0
  51. package/src/locales/zh.ts +2 -0
  52. package/src/native-package.ts +186 -96
  53. package/src/package.ts +26 -13
  54. package/src/types.ts +2 -0
  55. package/src/utils/dep-versions.ts +76 -33
  56. package/src/utils/hbcTransform.ts +194 -5
  57. package/src/utils/hermes-base.ts +156 -45
  58. package/src/utils/http-helper.ts +24 -13
  59. package/src/utils/index.ts +136 -26
  60. package/src/utils/latest-version/index.ts +109 -33
  61. package/src/utils/zip-entries.ts +18 -16
  62. package/src/utils/zip-options.ts +8 -3
  63. package/src/utils/zip-range.ts +244 -88
  64. package/src/utils/zip-raw-writer.ts +247 -0
  65. package/src/versions.ts +17 -7
package/README.md CHANGED
@@ -70,7 +70,7 @@ const publishResult = await provider.publish({
70
70
 
71
71
  Hermes projects: `bundle` always runs hermesc with `-output-source-map`, so the debug info section is stripped from the bytecode (15–40% smaller, same as React Native's own release builds). The Hermes sourcemap stays in the intermediate directory (`.pushy/intermedia/<platform>/<bundle>.map`, never packed into the ppk); with `--sourcemap` it is composed with the packager map as before. Keep it if you want to symbolicate `address at` crash stacks later.
72
72
 
73
- Hermes delta mode (`-base-bytecode`): by default (`--hermesBase auto`) `bundle` compiles against the previous HBC of the same app, which keeps Hermes string IDs stable and makes hot-update patches 5–30× smaller. The base comes from the server (`GET /app/:id/hermesBase`), verified by sha256 and kept in a local cache (`.pushy/cache/<sha256>`, 500 MB / 20 files, `PUSHY_CACHE_DIR` / `--cacheMaxMb` to tune, `pushy cache [clean]` to inspect or clear). `--hermesBase none` disables it; `--hermesBase <file.hbc|.ppk|.apk|.ipa>` uses a local artifact (for example the store build). `--verifyHermesBase` (default on) additionally compiles without the base (concurrently with the base compile) and compares both disassemblies; on any mismatch or failure the CLI silently falls back to the plain compile, so the feature can never block a release. Only hermesc builds that include the upstream delta-mode fix are used (classic `react-native/sdks/hermesc`, or `hermes-compiler` ≥ 250829098).
73
+ Hermes delta mode (`-base-bytecode`): by default (`--hermesBase auto`) `bundle` compiles against the previous HBC of the same app, which keeps Hermes string IDs stable and makes hot-update patches 5–30× smaller. The base comes from the server (`GET /app/:id/hermesBase`), verified by sha256 and kept in a local cache (`.pushy/cache/<sha256>`, 500 MB / 20 files, `PUSHY_CACHE_DIR` / `--cacheMaxMb` to tune, `pushy cache [clean]` to inspect or clear). `--hermesBase none` disables it; `--hermesBase <file.hbc|.ppk|.apk|.ipa>` uses a local artifact (for example the store build). `--verifyHermesBase` (default on) additionally compiles without the base (concurrently with the base compile) and compares both disassemblies; on any mismatch or failure the CLI silently falls back to the plain compile, so the feature can never block a release. Only hermesc builds that include the upstream delta-mode fix are used (classic `react-native/sdks/hermesc`, or `hermes-compiler` ≥ 250829098). If a base compile fails, the full hermesc output is written to `hermes-base-error.log` next to the intermediate directory. `--resetCache false` skips Metro's `--reset-cache` and reuses its transform cache, which makes repeated bundles much faster.
74
74
 
75
75
  ### Version
76
76
 
package/README.zh-CN.md CHANGED
@@ -70,7 +70,7 @@ const publishResult = await provider.publish({
70
70
 
71
71
  Hermes 工程:`bundle` 调用 hermesc 时始终带 `-output-source-map`,因此字节码不含 debug info 段(小 15%~40%,与 React Native 自身 release 构建一致)。Hermes sourcemap 保留在中间目录(`.pushy/intermedia/<platform>/<bundle>.map`,不会打进 ppk);传 `--sourcemap` 时照旧与 packager map 合成。留着它可以事后符号化 `address at` 形式的崩溃堆栈。
72
72
 
73
- Hermes delta 模式(`-base-bytecode`):默认 `--hermesBase auto`,`bundle` 会以同一应用上一版的 HBC 为 base 编译,让 Hermes 字符串 ID 跨版本稳定,热更 patch 可缩小 5~30 倍。base 由服务端(`GET /app/:id/hermesBase`)给出、按 sha256 校验并存入本地缓存(`.pushy/cache/<sha256>`,默认 500 MB / 20 个,可用 `PUSHY_CACHE_DIR` / `--cacheMaxMb` 调整,`pushy cache [clean]` 查看或清空)。`--hermesBase none` 关闭;`--hermesBase <file.hbc|.ppk|.apk|.ipa>` 指定本地文件(比如商店包)作 base。`--verifyHermesBase`(默认开)会并行再做一次普通编译并比对两份反汇编;任何不一致或失败都静默回退到普通编译,不会阻塞发版。只有包含上游 delta 模式修复的 hermesc 才会启用(经典 `react-native/sdks/hermesc`,或 `hermes-compiler` ≥ 250829098)。
73
+ Hermes delta 模式(`-base-bytecode`):默认 `--hermesBase auto`,`bundle` 会以同一应用上一版的 HBC 为 base 编译,让 Hermes 字符串 ID 跨版本稳定,热更 patch 可缩小 5~30 倍。base 由服务端(`GET /app/:id/hermesBase`)给出、按 sha256 校验并存入本地缓存(`.pushy/cache/<sha256>`,默认 500 MB / 20 个,可用 `PUSHY_CACHE_DIR` / `--cacheMaxMb` 调整,`pushy cache [clean]` 查看或清空)。`--hermesBase none` 关闭;`--hermesBase <file.hbc|.ppk|.apk|.ipa>` 指定本地文件(比如商店包)作 base。`--verifyHermesBase`(默认开)会并行再做一次普通编译并比对两份反汇编;任何不一致或失败都静默回退到普通编译,不会阻塞发版。只有包含上游 delta 模式修复的 hermesc 才会启用(经典 `react-native/sdks/hermesc`,或 `hermes-compiler` ≥ 250829098)。base 编译失败时,完整的 hermesc 输出会写到中间目录旁边的 `hermes-base-error.log`。`--resetCache false` 可跳过 Metro 的 `--reset-cache`,复用其转换缓存,重复打包会快很多。
74
74
 
75
75
  ### Version
76
76
 
package/cli.json CHANGED
@@ -276,6 +276,11 @@
276
276
  "hasValue": true,
277
277
  "description": "Local bundle cache limit in MB (default 500)"
278
278
  },
279
+ "resetCache": {
280
+ "default": "true",
281
+ "hasValue": true,
282
+ "description": "Pass --reset-cache to Metro (default true). false reuses Metro's transform cache, much faster for repeated bundles"
283
+ },
279
284
  "name": {
280
285
  "hasValue": true,
281
286
  "description": "Version name for publishing"
package/lib/api.d.ts CHANGED
@@ -13,6 +13,13 @@ export declare const get: (api: string) => Promise<any>;
13
13
  export declare const post: (api: string, body?: Record<string, any>) => Promise<any>;
14
14
  export declare const put: (api: string, body?: Record<string, any>) => Promise<any>;
15
15
  export declare const doDelete: (api: string, body?: Record<string, any>) => Promise<any>;
16
+ export declare function uploadTimeoutMs(fileSize: number): number;
17
+ /**
18
+ * A network-level failure worth one more attempt: a reset/timed-out/broken
19
+ * pipe connection, or our own deadline abort. HTTP responses (4xx/5xx) never
20
+ * get here — they are surfaced as-is.
21
+ */
22
+ export declare function isTransientUploadError(error: unknown): boolean;
16
23
  export declare function uploadFile(fn: string, key?: string, appId?: string | number): Promise<{
17
24
  hash: any;
18
25
  }>;
package/lib/api.js CHANGED
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAllPackages = exports.doDelete = exports.put = exports.post = exports.get = exports.closeSession = exports.saveSession = exports.loadSession = exports.replaceSession = exports.setApiToken = exports.getApiToken = exports.getSession = void 0;
7
+ exports.uploadTimeoutMs = uploadTimeoutMs;
8
+ exports.isTransientUploadError = isTransientUploadError;
7
9
  exports.uploadFile = uploadFile;
8
10
  exports.getHermesBase = getHermesBase;
9
11
  const filesize_parser_1 = __importDefault(require("filesize-parser"));
10
- const form_data_1 = __importDefault(require("form-data"));
11
12
  const fs_1 = __importDefault(require("fs"));
12
13
  const node_fetch_1 = __importDefault(require("node-fetch"));
13
14
  const path_1 = __importDefault(require("path"));
14
- const progress_1 = __importDefault(require("progress"));
15
15
  const package_json_1 = __importDefault(require("../package.json"));
16
16
  const constants_1 = require("./utils/constants");
17
17
  const http_helper_1 = require("./utils/http-helper");
@@ -114,7 +114,7 @@ function isProxyRelatedError(error) {
114
114
  return PROXY_ERROR_PATTERNS.some((p) => lower.includes(p.toLowerCase()));
115
115
  }
116
116
  async function query(url, options) {
117
- const baseUrl = await http_helper_1.getBaseUrl;
117
+ const baseUrl = await (0, http_helper_1.getBaseUrl)();
118
118
  const fullUrl = `${baseUrl}${url}`;
119
119
  let resp;
120
120
  try {
@@ -188,6 +188,81 @@ exports.get = queryWithoutBody('GET');
188
188
  exports.post = queryWithBody('POST');
189
189
  exports.put = queryWithBody('PUT');
190
190
  exports.doDelete = queryWithBody('DELETE');
191
+ // Upload deadline: generous for a slow link (1 s/MB on top of a 30 s base,
192
+ // never below 60 s) but bounded, so a stalled connection cannot hang a CI job
193
+ // forever. The bar keeps ticking while bytes flow; the deadline is absolute.
194
+ const UPLOAD_TIMEOUT_BASE_MS = 30_000;
195
+ const UPLOAD_TIMEOUT_PER_MB_MS = 1_000;
196
+ const UPLOAD_TIMEOUT_MIN_MS = 60_000;
197
+ const UPLOAD_MAX_RETRIES = 1;
198
+ function uploadTimeoutMs(fileSize) {
199
+ const megabytes = Math.ceil(Math.max(0, fileSize) / 1048576);
200
+ return Math.max(UPLOAD_TIMEOUT_MIN_MS, UPLOAD_TIMEOUT_BASE_MS + megabytes * UPLOAD_TIMEOUT_PER_MB_MS);
201
+ }
202
+ const TRANSIENT_UPLOAD_ERROR_CODES = ['ECONNRESET', 'ETIMEDOUT', 'EPIPE'];
203
+ /**
204
+ * A network-level failure worth one more attempt: a reset/timed-out/broken
205
+ * pipe connection, or our own deadline abort. HTTP responses (4xx/5xx) never
206
+ * get here — they are surfaced as-is.
207
+ */
208
+ function isTransientUploadError(error) {
209
+ if (!error || typeof error !== 'object') {
210
+ return false;
211
+ }
212
+ const { name, code, type, message } = error;
213
+ if (name === 'AbortError' || type === 'aborted' || code === 'ABORT_ERR') {
214
+ return true;
215
+ }
216
+ const text = `${code ?? ''} ${message ?? ''}`;
217
+ return TRANSIENT_UPLOAD_ERROR_CODES.some((c) => text.includes(c));
218
+ }
219
+ class UploadTimeoutError extends Error {
220
+ constructor(timeoutMs) {
221
+ super(`Upload timed out after ${Math.round(timeoutMs / 1000)}s`);
222
+ this.name = 'UploadTimeoutError';
223
+ }
224
+ }
225
+ /**
226
+ * Send the file with a size-scaled deadline and one retry on a transient
227
+ * network error. `buildRequest` is invoked per attempt with a fresh file
228
+ * stream (a consumed stream/form cannot be replayed).
229
+ */
230
+ async function sendUpload(fn, realUrl, fileSize, bar, buildRequest) {
231
+ const timeoutMs = uploadTimeoutMs(fileSize);
232
+ for (let attempt = 0;; attempt++) {
233
+ const controller = new AbortController();
234
+ let timedOut = false;
235
+ const timer = setTimeout(() => {
236
+ timedOut = true;
237
+ controller.abort();
238
+ }, timeoutMs);
239
+ const fileStream = fs_1.default.createReadStream(fn);
240
+ fileStream.on('data', (data) => {
241
+ bar.tick(data.length);
242
+ });
243
+ try {
244
+ return await (0, node_fetch_1.default)(realUrl, {
245
+ ...buildRequest(fileStream),
246
+ signal: controller.signal,
247
+ });
248
+ }
249
+ catch (rawError) {
250
+ fileStream.destroy();
251
+ const error = timedOut ? new UploadTimeoutError(timeoutMs) : rawError;
252
+ if (attempt < UPLOAD_MAX_RETRIES && isTransientUploadError(error)) {
253
+ const reason = error instanceof Error ? error.message : String(error);
254
+ console.warn(`\nUpload interrupted (${reason}), retrying...`);
255
+ // restart the bar from zero for the second pass
256
+ bar.curr = 0;
257
+ continue;
258
+ }
259
+ throw error;
260
+ }
261
+ finally {
262
+ clearTimeout(timer);
263
+ }
264
+ }
265
+ }
191
266
  async function uploadFile(fn, key, appId) {
192
267
  // appId 用于服务端路由:绑定了自托管节点(rnu-node)的应用,
193
268
  // 上传指令会指向节点或其对象存储
@@ -221,20 +296,25 @@ async function uploadFile(fn, key, appId) {
221
296
  pricingPageUrl: constants_1.pricingPageUrl,
222
297
  }));
223
298
  }
224
- const bar = new progress_1.default(' Uploading [:bar] :percent :etas', {
299
+ // progress/form-data are only needed here; keep them off the startup path
300
+ const ProgressBarImpl = require('progress');
301
+ const bar = new ProgressBarImpl(' Uploading [:bar] :percent :etas', {
225
302
  complete: '=',
226
303
  incomplete: ' ',
227
304
  total: fileSize,
228
305
  });
306
+ const rethrowUploadError = (error) => {
307
+ if (isProxyRelatedError(error)) {
308
+ const rawMessage = error instanceof Error ? error.message : String(error);
309
+ throw new Error(`${rawMessage}\n\n${(0, i18n_1.t)('proxyNetworkError')}\n${(0, i18n_1.t)('proxyNetworkErrorTips')}`);
310
+ }
311
+ throw createRequestError(error, realUrl);
312
+ };
229
313
  // 自托管节点的 s3 直传:服务端下发预签名 PUT,字节直达用户的对象存储
230
314
  if (resp.method === 'PUT') {
231
- const fileStream = fs_1.default.createReadStream(fn);
232
- fileStream.on('data', (data) => {
233
- bar.tick(data.length);
234
- });
235
315
  let putRes;
236
316
  try {
237
- putRes = await (0, node_fetch_1.default)(realUrl, {
317
+ putRes = await sendUpload(fn, realUrl, fileSize, bar, (fileStream) => ({
238
318
  method: 'PUT',
239
319
  body: fileStream,
240
320
  // 预签名 PUT 不接受 chunked 传输,必须显式声明长度
@@ -242,48 +322,36 @@ async function uploadFile(fn, key, appId) {
242
322
  'content-length': String(fileSize),
243
323
  ...(resp.headers || {}),
244
324
  },
245
- });
325
+ }));
246
326
  }
247
327
  catch (error) {
248
- if (isProxyRelatedError(error)) {
249
- const rawMessage = error instanceof Error ? error.message : String(error);
250
- throw new Error(`${rawMessage}\n\n${(0, i18n_1.t)('proxyNetworkError')}\n${(0, i18n_1.t)('proxyNetworkErrorTips')}`);
251
- }
252
- throw createRequestError(error, realUrl);
328
+ return rethrowUploadError(error);
253
329
  }
254
330
  if (putRes.status > 299) {
255
331
  throw createRequestError(`${putRes.status}: ${putRes.statusText || 'Upload failed'}`, realUrl);
256
332
  }
257
333
  return { hash: resp.key };
258
334
  }
259
- const form = new form_data_1.default();
260
- for (const [k, v] of Object.entries(formData)) {
261
- form.append(k, v);
262
- }
263
- const fileStream = fs_1.default.createReadStream(fn);
264
- fileStream.on('data', (data) => {
265
- bar.tick(data.length);
266
- });
267
- if (key) {
268
- form.append('key', key);
269
- }
270
- form.append('file', fileStream);
271
- // form.append('file', fileStream, {
272
- // contentType: 'application/octet-stream',
273
- // });
335
+ const FormData = require('form-data');
274
336
  let res;
275
337
  try {
276
- res = await (0, node_fetch_1.default)(realUrl, {
277
- method: 'POST',
278
- body: form,
338
+ res = await sendUpload(fn, realUrl, fileSize, bar, (fileStream) => {
339
+ const form = new FormData();
340
+ for (const [k, v] of Object.entries(formData)) {
341
+ form.append(k, v);
342
+ }
343
+ if (key) {
344
+ form.append('key', key);
345
+ }
346
+ form.append('file', fileStream);
347
+ // form.append('file', fileStream, {
348
+ // contentType: 'application/octet-stream',
349
+ // });
350
+ return { method: 'POST', body: form };
279
351
  });
280
352
  }
281
353
  catch (error) {
282
- if (isProxyRelatedError(error)) {
283
- const rawMessage = error instanceof Error ? error.message : String(error);
284
- throw new Error(`${rawMessage}\n\n${(0, i18n_1.t)('proxyNetworkError')}\n${(0, i18n_1.t)('proxyNetworkErrorTips')}`);
285
- }
286
- throw createRequestError(error, realUrl);
354
+ return rethrowUploadError(error);
287
355
  }
288
356
  if (res.status > 299) {
289
357
  throw createRequestError(`${res.status}: ${res.statusText || 'Upload failed'}`, realUrl);
package/lib/app.js CHANGED
@@ -10,7 +10,6 @@ exports.listApp = listApp;
10
10
  exports.chooseApp = chooseApp;
11
11
  exports.getAppCommands = getAppCommands;
12
12
  const fs_1 = __importDefault(require("fs"));
13
- const tty_table_1 = __importDefault(require("tty-table"));
14
13
  const api_1 = require("./api");
15
14
  const utils_1 = require("./utils");
16
15
  const i18n_1 = require("./utils/i18n");
@@ -60,7 +59,9 @@ async function listApp(platform = '') {
60
59
  for (const app of list) {
61
60
  rows.push([app.id, app.name, app.platform]);
62
61
  }
63
- console.log((0, tty_table_1.default)(header, rows).render());
62
+ // tty-table is ~25 ms to load; only pay for it when a table is rendered
63
+ const Table = (0, utils_1.loadTtyTable)();
64
+ console.log(Table(header, rows).render());
64
65
  console.log(`\n${(0, i18n_1.t)('totalApps', { count: list.length, platform })}`);
65
66
  return list;
66
67
  }
package/lib/bin.js CHANGED
@@ -42,10 +42,20 @@ const commandHandlers = {
42
42
  help: printUsage,
43
43
  };
44
44
  async function run() {
45
- await (0, utils_1.printVersionCommand)();
46
- if (process.argv.indexOf('-v') >= 0 || process.argv[2] === 'version') {
45
+ const versionOnly = process.argv.indexOf('-v') >= 0 || process.argv[2] === 'version';
46
+ // The registry check for newer versions runs alongside the command (from a
47
+ // 1-day cache when possible) and only ever delays `-v`/`version` itself; its
48
+ // hint is printed once the command is done, or at exit for commands that
49
+ // exit on their own.
50
+ const versionCheck = await (0, utils_1.printVersionCommand)({ wait: versionOnly });
51
+ if (versionOnly) {
47
52
  process.exit();
48
53
  }
54
+ process.on('exit', (code) => {
55
+ if (code === 0) {
56
+ versionCheck.printHints();
57
+ }
58
+ });
49
59
  const argv = require('cli-arguments').parse(require('../cli.json'));
50
60
  global.NO_INTERACTIVE =
51
61
  Boolean(argv.options['no-interactive']) ||
@@ -63,6 +73,10 @@ async function run() {
63
73
  else if (commandHandlers[argv.command]) {
64
74
  const handler = commandHandlers[argv.command];
65
75
  await handler(argv);
76
+ // a check still in flight (cold cache) gets a short grace period; the
77
+ // registry request itself is unref'd, so exiting never waits on it
78
+ await versionCheck.settle(500);
79
+ versionCheck.printHints();
66
80
  }
67
81
  else {
68
82
  throw new Error((0, i18n_1.t)('unknownCommand', { command: argv.command }));
@@ -15,6 +15,8 @@ export interface RunBundleCommandOptions {
15
15
  forceHermes?: boolean;
16
16
  /** Hermes -base-bytecode settings; omitted → compile without a base */
17
17
  hermesBase?: HermesBaseRequest;
18
+ /** pass --reset-cache to Metro (default true); false reuses its transform cache */
19
+ resetCache?: boolean;
18
20
  cli: BundleCliOptions;
19
21
  isSentry: boolean;
20
22
  }
@@ -36,6 +38,8 @@ export interface HermesBaseSelectionResult {
36
38
  bytecodeVersion: number | null;
37
39
  /** messages to print when the compile phase starts (kept out of Metro's output) */
38
40
  logs: string[];
41
+ /** the hermesc the selection was made with (the compile reuses it) */
42
+ hermesCommand?: string;
39
43
  /** hermesc could not be resolved; the compile phase will report it */
40
44
  commandUnavailable?: boolean;
41
45
  }
@@ -71,7 +75,7 @@ type SentryUploadMode = {
71
75
  };
72
76
  export declare function hasProjectDependency(dependencyName: string, projectRoot?: string): boolean;
73
77
  export declare function resolveExpoCli(projectRoot?: string): ResolvedExpoCli;
74
- export declare function runReactNativeBundleCommand({ bundleName, dev, entryFile, outputFolder, platform, sourcemapOutput, config, forceHermes, hermesBase, cli, isSentry, }: RunBundleCommandOptions): Promise<HermesCompileResult | null>;
78
+ export declare function runReactNativeBundleCommand({ bundleName, dev, entryFile, outputFolder, platform, sourcemapOutput, config, forceHermes, hermesBase, resetCache, cli, isSentry, }: RunBundleCommandOptions): Promise<HermesCompileResult | null>;
75
79
  export declare function resolveHermesCommand(projectRoot?: string): string;
76
80
  /**
77
81
  * hermesc argument policy. `-output-source-map` is always passed: hermesc then
@@ -90,19 +94,22 @@ export declare function resolveHermesCommand(projectRoot?: string): string;
90
94
  * prefer errors over warnings, and cap the length of whatever survives.
91
95
  */
92
96
  export declare function summarizeHermescStderr(stderr: string): string;
93
- export declare function buildHermescArgs(bundlePath: string): string[];
97
+ /** hermesc arguments writing `bundlePath` from `input` (in place by default) */
98
+ export declare function buildHermescArgs(bundlePath: string, input?: string): string[];
94
99
  export interface CompileHermesOptions {
95
100
  bundleName: string;
96
101
  outputFolder: string;
97
102
  sourcemapOutput: string;
98
103
  shouldCleanSourcemap: boolean;
99
104
  baseRequest?: HermesBaseRequest;
100
- /** base selection started before Metro (see startHermesBaseSelection) */
105
+ /** base selection started alongside Metro (see startHermesBaseSelection) */
101
106
  pendingBase?: Promise<HermesBaseSelectionResult>;
102
- /** defaults to the project's hermesc */
107
+ /** defaults to the hermesc the selection used, else the project's */
103
108
  hermesCommand?: string;
104
109
  }
105
110
  export declare function compileHermesByteCode({ bundleName, outputFolder, sourcemapOutput, shouldCleanSourcemap, baseRequest, pendingBase, hermesCommand, }: CompileHermesOptions): Promise<HermesCompileResult>;
111
+ /** where a failed base attempt's full hermesc output goes (never packed) */
112
+ export declare function hermesBaseErrorLogPath(outputFolder: string): string;
106
113
  /**
107
114
  * Begin resolving the base right away (before Metro); the compile phase awaits
108
115
  * the result. Never rejects: any failure is reported there instead.