react-native-update-cli 2.26.1 → 2.27.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 CHANGED
@@ -87,7 +87,7 @@ const publishResult = await provider.publish({
87
87
 
88
88
  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) and is composed with the packager map — `--sourcemap` is on by default since 2.23 (`--no-sourcemap` opts out). When `bundle` publishes, that final map is uploaded and archived with the version (`sourceMapKey`), so `pushy symbolicate` can map crash stacks — including Hermes `address at` frames — back to source later. `pushy publish <ppk> --sourcemap <file.map>` archives a map for a ppk built elsewhere; publishing without a map prints a warning.
89
89
 
90
- 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 — literal buffers by content, then function by function, with only representation differences (string ids, operand widths, jump distances, buffer offsets) folded away; on any mismatch or failure the CLI falls back to the plain compile, so the feature can never block a release. The log names the first difference (function, line, both sides) or, separately, a dump that could not be read; set `PUSHY_HERMES_BASE_DEBUG=1` to keep both disassemblies (`hermes-base-dump-base.txt` / `hermes-base-dump-plain.txt` next to the intermediate directory) for a bug report. What the check covers, what it does not yet, and how to triage a rejection: [docs/hermes-base-verification.md](docs/hermes-base-verification.md). The result is reported at publish (`hermesBaseOutcome`: `used` / `rejected` / `dump-failed` / `none`, plus the first difference) so the server can watch the rejection rate across apps. `HERMESC=<path> bun run fuzz:hermes-base --rounds 300` compiles random programs against random bases and reports any build the check would wrongly reject (differential fuzzing of the normalization rules). 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.
90
+ 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 checks both artifacts in two passes: readable disassembly followed by raw operands resolved against complete binary strings, constants, function references and control-flow targets. Quoted whitespace and branch destinations are preserved; unsupported or unreadable layouts fail closed. On a mismatch, verification failure or compiler timeout the CLI falls back to the plain compile; failures of the plain compiler or the final sourcemap still fail the build. The raw pass adds verification time and holds both HBC files in memory, but does not add another compile. The log names the first difference (function, line, both sides) or, separately, a dump that could not be read; set `PUSHY_HERMES_BASE_DEBUG=1` to keep both disassemblies (`hermes-base-dump-base.txt` / `hermes-base-dump-plain.txt` next to the intermediate directory) for a bug report. Probe, verification and compile/sourcemap process deadlines default to 30/120/300 seconds respectively, configurable in milliseconds via `PUSHY_HERMES_PROBE_TIMEOUT_MS`, `PUSHY_HERMES_VERIFY_TIMEOUT_MS` and `PUSHY_HERMES_COMPILE_TIMEOUT_MS`. What the check covers, what it does not yet, and how to triage a rejection: [docs/hermes-base-verification.md](docs/hermes-base-verification.md). The result is reported at publish (`hermesBaseOutcome`: `used` / `rejected` / `dump-failed` / `none`, plus the first difference) so the server can watch the rejection rate across apps. `HERMESC=<path> bun run fuzz:hermes-base --rounds 300` compiles random programs against random bases and reports any build the check would wrongly reject (differential fuzzing of the normalization rules). 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.
91
91
 
92
92
  ### Version
93
93
 
package/README.zh-CN.md CHANGED
@@ -78,7 +78,7 @@ const publishResult = await provider.publish({
78
78
 
79
79
  Hermes 工程:`bundle` 调用 hermesc 时始终带 `-output-source-map`,因此字节码不含 debug info 段(小 15%~40%,与 React Native 自身 release 构建一致)。Hermes sourcemap 保留在中间目录(`.pushy/intermedia/<platform>/<bundle>.map`,不会打进 ppk),并与 packager map 合成——自 2.23 起 `--sourcemap` 默认开启(`--no-sourcemap` 关闭)。`bundle` 发布时会把这份最终 map 上传并随版本归档(`sourceMapKey`),之后用 `pushy symbolicate` 即可把崩溃堆栈(含 Hermes 的 `address at` 帧)还原到源码。别处打好的 ppk 可用 `pushy publish <ppk> --sourcemap <file.map>` 归档;不带 map 发布会打印警告。
80
80
 
81
- 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`(默认开)会并行再做一次普通编译并比对两份反汇编——先按内容比对字面量缓冲区,再逐函数比对,只折叠纯表示层差异(字符串 id、操作数宽度、跳转距离、缓冲区偏移);任何不一致或失败都回退到普通编译,不会阻塞发版。日志会给出第一处差异(函数、行、两侧内容),dump 读取失败会单独说明;设置 `PUSHY_HERMES_BASE_DEBUG=1` 可把两份反汇编保留在中间目录旁(`hermes-base-dump-base.txt` / `hermes-base-dump-plain.txt`)用于提 issue。校验覆盖什么、还缺什么、如何排查一次拒绝:见 [docs/hermes-base-verification.md](docs/hermes-base-verification.md)。校验结果会随发布上报(`hermesBaseOutcome`:`used` / `rejected` / `dump-failed` / `none`,附第一处差异),服务端可据此观察全体应用的拒绝率。`HERMESC=<path> bun run fuzz:hermes-base --rounds 300` 会用随机程序配随机 base 编译并报告校验误杀的构建(对归一化规则做差分模糊测试)。只有包含上游 delta 模式修复的 hermesc 才会启用(经典 `react-native/sdks/hermesc`,或 `hermes-compiler` ≥ 250829098)。base 编译失败时,完整的 hermesc 输出会写到中间目录旁边的 `hermes-base-error.log`。`--resetCache false` 可跳过 Metro 的 `--reset-cache`,复用其转换缓存,重复打包会快很多。
81
+ 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`(默认开)会并行再做一次普通编译并进行两遍校验:先比较易读反汇编,再将 raw 操作数与二进制中的完整字符串、常量、函数引用和控制流目标核对。字符串内部空白和分支目的地不会被抹掉;不支持或无法解析的布局不能判为等价。发现差异、无法完成校验或 base 编译超时会回退到普通编译;真正的 plain 编译或最终 sourcemap 失败仍会使构建失败。raw 核对增加验证时间并在内存中持有两份 HBC,但不增加编译次数。日志会给出第一处差异(函数、行、两侧内容),dump 读取失败会单独说明;设置 `PUSHY_HERMES_BASE_DEBUG=1` 可把两份反汇编保留在中间目录旁(`hermes-base-dump-base.txt` / `hermes-base-dump-plain.txt`)用于提 issue。版本探测、完整验证、单个编译/sourcemap 子进程的期限默认分别为 30/120/300 秒,可用 `PUSHY_HERMES_PROBE_TIMEOUT_MS`、`PUSHY_HERMES_VERIFY_TIMEOUT_MS`、`PUSHY_HERMES_COMPILE_TIMEOUT_MS`(毫秒)调整。校验覆盖什么、还缺什么、如何排查一次拒绝:见 [docs/hermes-base-verification.md](docs/hermes-base-verification.md)。校验结果会随发布上报(`hermesBaseOutcome`:`used` / `rejected` / `dump-failed` / `none`,附第一处差异),服务端可据此观察全体应用的拒绝率。`HERMESC=<path> bun run fuzz:hermes-base --rounds 300` 会用随机程序配随机 base 编译并报告校验误杀的构建(对归一化规则做差分模糊测试)。只有包含上游 delta 模式修复的 hermesc 才会启用(经典 `react-native/sdks/hermesc`,或 `hermes-compiler` ≥ 250829098)。base 编译失败时,完整的 hermesc 输出会写到中间目录旁边的 `hermes-base-error.log`。`--resetCache false` 可跳过 Metro 的 `--reset-cache`,复用其转换缓存,重复打包会快很多。
82
82
 
83
83
  ### Version
84
84
 
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = __importDefault(require("fs"));
7
+ const path_1 = __importDefault(require("path"));
8
+ const api_1 = require("./api");
9
+ // Isolated from the command: even DNS, endpoint probing and slow sockets cannot
10
+ // keep the CLI alive. Bound the detached worker's lifetime as well.
11
+ if (require.main === module) {
12
+ const deadline = setTimeout(() => process.exit(0), 15000);
13
+ process.once('message', async (input) => {
14
+ try {
15
+ (0, api_1.replaceSession)({ token: input.token });
16
+ if (input.apiToken)
17
+ (0, api_1.setApiToken)(input.apiToken);
18
+ const result = await (0, api_1.get)('/user/me');
19
+ const account = {
20
+ name: result.name,
21
+ email: result.email,
22
+ tier: result.tier,
23
+ tierExpiresAt: result.tierExpiresAt,
24
+ serverTime: result.serverTime,
25
+ };
26
+ const entry = { account, fetchedAt: Date.now() };
27
+ fs_1.default.mkdirSync(path_1.default.dirname(input.cacheFile), {
28
+ recursive: true,
29
+ mode: 0o700,
30
+ });
31
+ const temporary = `${input.cacheFile}.${process.pid}.tmp`;
32
+ fs_1.default.writeFileSync(temporary, JSON.stringify(entry), { mode: 0o600 });
33
+ fs_1.default.renameSync(temporary, input.cacheFile);
34
+ if (process.connected) {
35
+ process.send?.(entry, () => process.exit(0));
36
+ return;
37
+ }
38
+ }
39
+ catch {
40
+ // Background refresh is best effort; retain the last successful cache.
41
+ }
42
+ clearTimeout(deadline);
43
+ process.exit(0);
44
+ });
45
+ }
@@ -0,0 +1,11 @@
1
+ export interface AccountInfo {
2
+ name?: string;
3
+ email?: string;
4
+ tier?: string;
5
+ tierExpiresAt?: string | null;
6
+ serverTime?: string;
7
+ }
8
+ export declare function printAccountInfo(account: AccountInfo, isCresc?: boolean, now?: number): void;
9
+ export declare function accountCacheFile(token: string, apiToken?: string): string;
10
+ /** Cache first; the detached refresh never keeps the command process alive. */
11
+ export declare function showCurrentAccount(): void;
package/lib/account.js ADDED
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.printAccountInfo = printAccountInfo;
7
+ exports.accountCacheFile = accountCacheFile;
8
+ exports.showCurrentAccount = showCurrentAccount;
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const child_process_1 = require("child_process");
11
+ const crypto_1 = require("crypto");
12
+ const fs_1 = __importDefault(require("fs"));
13
+ const os_1 = __importDefault(require("os"));
14
+ const path_1 = __importDefault(require("path"));
15
+ const api_1 = require("./api");
16
+ const constants_1 = require("./utils/constants");
17
+ const i18n_1 = require("./utils/i18n");
18
+ const DAY_MS = 24 * 60 * 60 * 1000;
19
+ function printAccountInfo(account, isCresc = constants_1.IS_CRESC, now = Date.now()) {
20
+ const expiresAt = account.tierExpiresAt
21
+ ? Date.parse(account.tierExpiresAt)
22
+ : NaN;
23
+ const serverTime = account.serverTime ? Date.parse(account.serverTime) : NaN;
24
+ const remaining = expiresAt - (Number.isFinite(serverTime) ? serverTime : now);
25
+ console.log((0, i18n_1.t)('accountSummary', {
26
+ account: account.email || account.name || (0, i18n_1.t)('accountUnknown'),
27
+ tier: account.tier || (0, i18n_1.t)('accountUnknown'),
28
+ expiry: Number.isFinite(expiresAt)
29
+ ? new Date(expiresAt).toISOString()
30
+ : (0, i18n_1.t)('accountNoExpiry'),
31
+ }));
32
+ if (!isCresc &&
33
+ account.tier &&
34
+ account.tier !== 'free' &&
35
+ remaining >= 0 &&
36
+ remaining < 30 * DAY_MS) {
37
+ console.warn(chalk_1.default.yellow.bold((0, i18n_1.t)('accountRenewalWarning', {
38
+ days: Math.ceil(remaining / DAY_MS),
39
+ url: constants_1.pricingPageUrl,
40
+ })));
41
+ }
42
+ }
43
+ function accountCacheFile(token, apiToken = '') {
44
+ const key = (0, crypto_1.createHash)('sha256')
45
+ .update(JSON.stringify([constants_1.IS_CRESC, process.cwd(), token, apiToken]))
46
+ .digest('hex');
47
+ return path_1.default.join(os_1.default.homedir(), '.cache', 'react-native-update-cli', 'accounts', `${key}.json`);
48
+ }
49
+ function printCachedAccount(entry) {
50
+ const serverTime = Date.parse(entry.account.serverTime || '');
51
+ // Advance cached server time by elapsed local time, instead of freezing the
52
+ // remaining subscription duration at the moment the cache was written.
53
+ printAccountInfo({
54
+ ...entry.account,
55
+ serverTime: Number.isFinite(serverTime)
56
+ ? new Date(serverTime + Math.max(0, Date.now() - entry.fetchedAt)).toISOString()
57
+ : undefined,
58
+ });
59
+ }
60
+ /** Cache first; the detached refresh never keeps the command process alive. */
61
+ function showCurrentAccount() {
62
+ const token = (0, api_1.getSession)()?.token;
63
+ if (!token)
64
+ return;
65
+ const apiToken = (0, api_1.getApiToken)();
66
+ const cacheFile = accountCacheFile(token, apiToken);
67
+ let cached = false;
68
+ try {
69
+ const entry = JSON.parse(fs_1.default.readFileSync(cacheFile, 'utf8'));
70
+ if (entry.account &&
71
+ typeof entry.account === 'object' &&
72
+ Number.isFinite(entry.fetchedAt)) {
73
+ printCachedAccount(entry);
74
+ cached = true;
75
+ }
76
+ }
77
+ catch {
78
+ // Missing or corrupt cache is a cache miss.
79
+ }
80
+ try {
81
+ const worker = (0, child_process_1.fork)(path_1.default.join(__dirname, `account-worker${path_1.default.extname(__filename)}`), [], {
82
+ detached: true,
83
+ stdio: ['ignore', 'ignore', 'ignore', 'ipc'],
84
+ execArgv: [],
85
+ });
86
+ worker.on('error', () => { });
87
+ worker.on('message', (entry) => {
88
+ if (!cached) {
89
+ printCachedAccount(entry);
90
+ cached = true;
91
+ }
92
+ });
93
+ worker.send({ token, apiToken, cacheFile }, () => { });
94
+ worker.unref();
95
+ worker.channel?.unref();
96
+ }
97
+ catch {
98
+ // Starting a background worker is also best effort.
99
+ }
100
+ }
package/lib/bin.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ const account_1 = require("./account");
4
5
  const api_1 = require("./api");
5
6
  const commands_1 = require("./commands");
6
7
  const utils_1 = require("./utils");
@@ -74,6 +75,9 @@ async function run() {
74
75
  if (!handler) {
75
76
  throw new Error((0, i18n_1.t)('unknownCommand', { command: argv.command }));
76
77
  }
78
+ if (argv.command !== 'me') {
79
+ (0, account_1.showCurrentAccount)();
80
+ }
77
81
  await handler(argv);
78
82
  // a check still in flight (cold cache) gets a short grace period; the
79
83
  // registry request itself is unref'd, so exiting never waits on it
@@ -63,6 +63,7 @@ const path_1 = __importDefault(require("path"));
63
63
  const api_1 = require("./api");
64
64
  const dep_versions_1 = require("./utils/dep-versions");
65
65
  const hermes_base_1 = require("./utils/hermes-base");
66
+ const hermes_timeout_1 = require("./utils/hermes-timeout");
66
67
  const i18n_1 = require("./utils/i18n");
67
68
  const runtime_1 = require("./utils/runtime");
68
69
  const g2js = require('gradle-to-js/lib/parser');
@@ -678,6 +679,8 @@ function runProcess(command, args, captureStderr) {
678
679
  return new Promise((resolve) => {
679
680
  const child = (0, child_process_1.spawn)(command, args, {
680
681
  stdio: ['ignore', 'ignore', captureStderr ? 'pipe' : 'ignore'],
682
+ timeout: (0, hermes_timeout_1.hermesTimeout)(process.env.PUSHY_HERMES_COMPILE_TIMEOUT_MS, 300_000),
683
+ killSignal: 'SIGKILL',
681
684
  });
682
685
  // hermesc echoes whole (minified) source lines per diagnostic: keep the
683
686
  // head and the tail, never an unbounded transcript
@@ -723,7 +726,7 @@ const HERMES_BASE_WAIT_MS = 60_000;
723
726
  * bounded time for it — a stalled download must never hold up the compile.
724
727
  */
725
728
  async function awaitPendingBase(pending) {
726
- const waitMs = Number(process.env.PUSHY_HERMES_BASE_WAIT_MS) || HERMES_BASE_WAIT_MS;
729
+ const waitMs = (0, hermes_timeout_1.hermesTimeout)(process.env.PUSHY_HERMES_BASE_WAIT_MS, HERMES_BASE_WAIT_MS);
727
730
  let timer;
728
731
  const gaveUp = new Promise((resolve) => {
729
732
  timer = setTimeout(() => resolve({
@@ -842,7 +845,10 @@ async function compileHermesByteCode({ bundleName, outputFolder, sourcemapOutput
842
845
  const fullStderr = attempt.error
843
846
  ? String(attempt.error.message ?? attempt.error)
844
847
  : attempt.stderr;
845
- const reason = summarizeHermescStderr(fullStderr);
848
+ const reason = summarizeHermescStderr(fullStderr) ||
849
+ (attempt.signal
850
+ ? `signal ${attempt.signal} (compiler deadline or external termination)`
851
+ : '');
846
852
  console.warn((0, i18n_1.t)('hermesBaseCompileFailed', {
847
853
  reason: reason || `exit ${attempt.status}`,
848
854
  }));
@@ -862,7 +868,7 @@ async function compileHermesByteCode({ bundleName, outputFolder, sourcemapOutput
862
868
  // compose the base output's map while the disassembly compare runs; it is
863
869
  // redone from the plain map in the rare case the base is rejected
864
870
  const speculativeCompose = usedBase && sourcemapOutput
865
- ? composeSourceMaps(packagerMap, hermesMap, sourcemapOutput)
871
+ ? composeSourceMaps(packagerMap, hermesMap, sourcemapOutput).then((value) => ({ ok: true, value }), (error) => ({ ok: false, error }))
866
872
  : null;
867
873
  if (usedBase && wantPlain) {
868
874
  if (!plainOk) {
@@ -921,12 +927,10 @@ async function compileHermesByteCode({ bundleName, outputFolder, sourcemapOutput
921
927
  }
922
928
  }
923
929
  if (speculativeCompose) {
924
- const done = await speculativeCompose.catch((error) => {
925
- if (usedBase)
926
- throw error;
927
- return false;
928
- });
929
- composed = usedBase && done;
930
+ const done = await speculativeCompose;
931
+ if (!done.ok && usedBase)
932
+ throw done.error;
933
+ composed = usedBase && done.ok && done.value;
930
934
  }
931
935
  if (!usedBase) {
932
936
  if (plainOk) {
@@ -1,4 +1,9 @@
1
1
  declare const _default: {
2
+ accountSummary: string;
3
+ accountUnknown: string;
4
+ accountNoExpiry: string;
5
+ accountRenewalWarning: string;
6
+ accountLookupFailed: string;
2
7
  addedToGitignore: string;
3
8
  androidCrunchPngsWarning: string;
4
9
  aabOpenApksFailed: string;
package/lib/locales/en.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
+ accountSummary: 'Account: {{account}} | Plan: {{tier}} | Expires at: {{expiry}}',
5
+ accountUnknown: 'Unknown',
6
+ accountNoExpiry: 'No expiry specified',
7
+ accountRenewalWarning: '[Warning] Your Pushy paid plan expires in {{days}} days. Renew soon to avoid service disruption: {{url}}',
8
+ accountLookupFailed: '[Warning] Unable to retrieve account information. Continuing with the command.',
4
9
  addedToGitignore: 'Added {{line}} to .gitignore',
5
10
  androidCrunchPngsWarning: 'The crunchPngs option of android seems not disabled (Please ignore this warning if already disabled), which may cause abnormal consumption of mobile network traffic. Please refer to https://cresc.dev/docs/getting-started#disable-crunchpngs-on-android \n',
6
11
  aabOpenApksFailed: 'Failed to open generated .apks file',
@@ -1,4 +1,9 @@
1
1
  declare const _default: {
2
+ accountSummary: string;
3
+ accountUnknown: string;
4
+ accountNoExpiry: string;
5
+ accountRenewalWarning: string;
6
+ accountLookupFailed: string;
2
7
  addedToGitignore: string;
3
8
  androidCrunchPngsWarning: string;
4
9
  aabOpenApksFailed: string;
package/lib/locales/zh.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
+ accountSummary: '当前账号:{{account}} | 等级:{{tier}} | 有效期至:{{expiry}}',
5
+ accountUnknown: '未知',
6
+ accountNoExpiry: '未设置有效期',
7
+ accountRenewalWarning: '[警告] 您的 Pushy 付费套餐将在 {{days}} 天内到期,请及时续费,以免影响服务:{{url}}',
8
+ accountLookupFailed: '[警告] 暂时无法获取账号信息,将继续执行命令。',
4
9
  addedToGitignore: '已将 {{line}} 添加到 .gitignore',
5
10
  androidCrunchPngsWarning: 'android 的 crunchPngs 选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
6
11
  aabOpenApksFailed: '无法打开生成的 .apks 文件',
package/lib/user.js CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.userCommands = void 0;
7
7
  const crypto_1 = __importDefault(require("crypto"));
8
+ const account_1 = require("./account");
8
9
  const api_1 = require("./api");
9
10
  const utils_1 = require("./utils");
10
11
  const add_gitignore_1 = require("./utils/add-gitignore");
@@ -39,6 +40,7 @@ exports.userCommands = {
39
40
  },
40
41
  me: async () => {
41
42
  const me = await (0, api_1.get)('/user/me');
43
+ (0, account_1.printAccountInfo)(me);
42
44
  for (const k in me) {
43
45
  if (k !== 'ok') {
44
46
  console.log(`${k}: ${me[k]}`);
@@ -23,4 +23,11 @@ exports.pricingPageUrl = exports.IS_CRESC
23
23
  : 'https://pushy.reactnative.cn/pricing.html';
24
24
  exports.defaultEndpoints = exports.IS_CRESC
25
25
  ? ['https://api.cresc.dev', 'https://api.cresc.app']
26
- : ['https://update.reactnative.cn/api', 'https://update.react-native.cn/api'];
26
+ : [
27
+ 'https://1.rnupdate.online/api',
28
+ 'https://2.rnupdate.online/api',
29
+ 'https://3.rnupdate.online/api',
30
+ 'https://4.rnupdate.online/api',
31
+ 'https://update.reactnative.cn/api',
32
+ 'https://update.react-native.cn/api',
33
+ ];
@@ -205,10 +205,13 @@ export interface HermesEquivalenceOptions {
205
205
  withBase: string;
206
206
  plain: string;
207
207
  };
208
+ /** Total deadline for both verification passes. */
209
+ timeoutMs?: number;
210
+ signal?: AbortSignal;
208
211
  }
209
212
  /**
210
- * Compare two HBC files by disassembly (see normalizeDisassemblyLine): the
211
- * literal buffers by content, then function by function. `-b` forces hermesc
213
+ * Compare two HBC files by pretty disassembly, then audit the raw operands
214
+ * against full binary strings, literals, function identities and addresses. `-b` forces hermesc
212
215
  * to treat inputs as bytecode whatever their extension. Both dumps are
213
216
  * consumed as streams so the ~100 MB of text never touches the disk (unless
214
217
  * `dumpTo` asks for it). A dump process that fails or ends early is reported