@bash0816/claude-code 2.1.198 → 2.1.201

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
@@ -37,7 +37,7 @@ npm が `claude` bin link を管理する状態になれば、通常の `npm ins
37
37
  Latest audited version / 最新監査済み版:
38
38
 
39
39
  ```sh
40
- npm install -g @bash0816/claude-code@2.1.197
40
+ npm install -g @bash0816/claude-code@2.1.200
41
41
  ```
42
42
 
43
43
  ## Update / 更新
@@ -400,6 +400,24 @@
400
400
  "entry_end_offset": 243892947,
401
401
  "tarball_integrity": "sha512-+7i3CtYtmrcnJQpxP0Jh98Tj6bo2EV98Ip3HViVPPPrf3ZRoseXvacafjlrw8IB0vOYGhp65wKuQ6li4iKLN3A==",
402
402
  "tarball_sha256": "83155e7b37846627c91118176996ee7e43bf6aa8a81df55745eb193c7929db62",
403
+ "status": "termux_verified"
404
+ },
405
+ "2.1.200": {
406
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.200",
407
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.200",
408
+ "entry_js_offset": 227601092,
409
+ "entry_end_offset": 246293109,
410
+ "tarball_integrity": "sha512-FG0hXbPLzsmmtpbWwc1t1mbZ2HsrBNmn/QLkVMvYXAzxf4vXrHgM7AIZU1cCBNycufXwPAnyzOwO886kkBle7Q==",
411
+ "tarball_sha256": "d7010d06bae10be2dca703633c730d52c5c1391165e8eccd49ff6e7c2571c244",
412
+ "status": "offset_discovered"
413
+ },
414
+ "2.1.201": {
415
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.201",
416
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.201",
417
+ "entry_js_offset": 227601156,
418
+ "entry_end_offset": 246293196,
419
+ "tarball_integrity": "sha512-3/5r/T5+zb8oxhkoO6nGNfaSpmRxCKfDxMx1oIEXVUhjXhqGCP1DAp+DgL5o76HaJgerL9euBKxSNuDiDAfrjg==",
420
+ "tarball_sha256": "f8e1966c35b1cd48445399eb17258d8619329ce2db48cfe4f335857d83e81c7d",
403
421
  "status": "offset_discovered"
404
422
  }
405
423
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "manifest_version": 1,
3
3
  "package_name": "@bash0816/claude-code",
4
- "latest_audited_version": "2.1.197",
5
- "latest_candidate_version": "2.1.198",
6
- "previous_stable_version": "2.1.195",
4
+ "latest_audited_version": "2.1.200",
5
+ "latest_candidate_version": "2.1.201",
6
+ "previous_stable_version": "2.1.198",
7
7
  "stable_pinned_version": "2.1.176",
8
8
  "manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json"
9
9
  }
@@ -553,12 +553,18 @@ function rewriteNativeChunkSource(source) {
553
553
  'module wrapper prefix',
554
554
  1,
555
555
  );
556
+ const _typeofBunExpected = (() => {
557
+ const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
558
+ const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
559
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 7;
560
+ return 6;
561
+ })();
556
562
  patched = replaceRequired(
557
563
  patched,
558
564
  /\btypeof Bun\b/g,
559
565
  'typeof __claudeBun',
560
566
  'typeof Bun',
561
- 6,
567
+ _typeofBunExpected,
562
568
  );
563
569
  patched = replaceRequired(
564
570
  patched,
@@ -574,12 +580,18 @@ function rewriteNativeChunkSource(source) {
574
580
  'globalThis.Bun',
575
581
  1,
576
582
  );
583
+ const _bunPropertyAccessExpected = (() => {
584
+ const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
585
+ const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
586
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 40;
587
+ return 37;
588
+ })();
577
589
  patched = replaceRequired(
578
590
  patched,
579
591
  /\bBun\./g,
580
592
  '__claudeBun.',
581
593
  'Bun property access',
582
- 37,
594
+ _bunPropertyAccessExpected,
583
595
  );
584
596
  patched = replaceRequired(
585
597
  patched,
@@ -1224,12 +1236,18 @@ function rewriteNativeChunkSource(source) {
1224
1236
  'module wrapper prefix',
1225
1237
  1,
1226
1238
  );
1239
+ const _typeofBunExpected = (() => {
1240
+ const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
1241
+ const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
1242
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 7;
1243
+ return 6;
1244
+ })();
1227
1245
  patched = replaceRequired(
1228
1246
  patched,
1229
1247
  /\btypeof Bun\b/g,
1230
1248
  'typeof __claudeBun',
1231
1249
  'typeof Bun',
1232
- 6,
1250
+ _typeofBunExpected,
1233
1251
  );
1234
1252
  patched = replaceRequired(
1235
1253
  patched,
@@ -1245,12 +1263,18 @@ function rewriteNativeChunkSource(source) {
1245
1263
  'globalThis.Bun',
1246
1264
  1,
1247
1265
  );
1266
+ const _bunPropertyAccessExpected = (() => {
1267
+ const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
1268
+ const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
1269
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 40;
1270
+ return 37;
1271
+ })();
1248
1272
  patched = replaceRequired(
1249
1273
  patched,
1250
1274
  /\bBun\./g,
1251
1275
  '__claudeBun.',
1252
1276
  'Bun property access',
1253
- 37,
1277
+ _bunPropertyAccessExpected,
1254
1278
  );
1255
1279
  patched = replaceRequired(
1256
1280
  patched,
@@ -78,7 +78,7 @@ function loadHelperApi() {
78
78
  '\n\nasync function main() {',
79
79
  );
80
80
 
81
- const context = vm.createContext({ module: { exports: {} }, exports: {}, fs, path });
81
+ const context = vm.createContext({ module: { exports: {} }, exports: {}, fs, path, process });
82
82
  vm.runInContext(
83
83
  `${replaceSource}\n${cleanupSource}\n${fullWidthSource}\n${graphemeWidthSource}\n${stripAnsiSource}\n${stringWidthSource}\n${wrapAnsiSource}\n${stableHashSource}\n${rewriteSource}\nmodule.exports = { replaceRequired, cleanupStaleEntryFiles, isFullWidthCodePoint, graphemeWidth, stripANSI, stringWidth, wrapAnsi, stableHash, rewriteNativeChunkSource };`,
84
84
  context,
@@ -283,18 +283,44 @@ function buildSyntheticBundleSource() {
283
283
  return `function(exports, require, module, __filename, __dirname) { ${typeofBun}; typeof globalThis.Bun; globalThis.Bun; ${bunProps}; npmInstallDeprecated:!0 }`;
284
284
  }
285
285
 
286
- test('rewriteNativeChunkSource rewrites the synthetic bundle slice', () => {
287
- const { rewriteNativeChunkSource } = loadHelperApi();
288
- const source = buildSyntheticBundleSource();
289
- const patched = rewriteNativeChunkSource(source);
290
-
291
- assert.match(patched, /var __claudeBun = globalThis\.__claudeBunShim;/);
292
- assert.match(patched, /typeof __claudeBun/);
293
- assert.match(patched, /typeof globalThis\.__claudeBun/);
294
- assert.match(patched, /globalThis\.__claudeBun/);
295
- assert.match(patched, /__claudeBun\./);
296
- assert.match(patched, /npmInstallDeprecated:!1/);
297
- assert.doesNotMatch(patched, /npmInstallDeprecated:!0/);
286
+ test('rewriteNativeChunkSource rewrites the synthetic bundle slice (version 2.1.198)', () => {
287
+ process.env.CURRENT_CLAUDE_VERSION = '2.1.198';
288
+ try {
289
+ const { rewriteNativeChunkSource } = loadHelperApi();
290
+ const source = buildSyntheticBundleSource();
291
+ const patched = rewriteNativeChunkSource(source);
292
+
293
+ assert.match(patched, /var __claudeBun = globalThis\.__claudeBunShim;/);
294
+ assert.match(patched, /typeof __claudeBun/);
295
+ assert.match(patched, /typeof globalThis\.__claudeBun/);
296
+ assert.match(patched, /globalThis\.__claudeBun/);
297
+ assert.match(patched, /__claudeBun\./);
298
+ assert.match(patched, /npmInstallDeprecated:!1/);
299
+ assert.doesNotMatch(patched, /npmInstallDeprecated:!0/);
300
+ } finally {
301
+ delete process.env.CURRENT_CLAUDE_VERSION;
302
+ }
303
+ });
304
+
305
+ test('rewriteNativeChunkSource rewrites the synthetic bundle slice (version 2.1.200)', () => {
306
+ process.env.CURRENT_CLAUDE_VERSION = '2.1.200';
307
+ try {
308
+ const { rewriteNativeChunkSource } = loadHelperApi();
309
+ const typeofBun = Array.from({ length: 7 }, () => 'typeof Bun').join('; ');
310
+ const bunProps = Array.from({ length: 40 }, (_, index) => `Bun.p${index}`).join('; ');
311
+ const source = `function(exports, require, module, __filename, __dirname) { ${typeofBun}; typeof globalThis.Bun; globalThis.Bun; ${bunProps}; npmInstallDeprecated:!0 }`;
312
+ const patched = rewriteNativeChunkSource(source);
313
+
314
+ assert.match(patched, /var __claudeBun = globalThis\.__claudeBunShim;/);
315
+ assert.match(patched, /typeof __claudeBun/);
316
+ assert.match(patched, /typeof globalThis\.__claudeBun/);
317
+ assert.match(patched, /globalThis\.__claudeBun/);
318
+ assert.match(patched, /__claudeBun\./);
319
+ assert.match(patched, /npmInstallDeprecated:!1/);
320
+ assert.doesNotMatch(patched, /npmInstallDeprecated:!0/);
321
+ } finally {
322
+ delete process.env.CURRENT_CLAUDE_VERSION;
323
+ }
298
324
  });
299
325
 
300
326
  test('rewriteNativeChunkSource rejects unexpected replacement counts', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash0816/claude-code",
3
- "version": "2.1.198",
3
+ "version": "2.1.201",
4
4
  "description": "Unofficial Termux-native Claude Code wrapper with audited native replay",
5
5
  "license": "GPL-3.0-only",
6
6
  "bin": {