@bash0816/claude-code 2.1.150-1 → 2.1.150-2

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.
@@ -125,6 +125,13 @@
125
125
  "entry_js_offset": 221278436,
126
126
  "entry_end_offset": 236586147,
127
127
  "status": "termux_verified"
128
+ },
129
+ "2.1.150-2": {
130
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.150",
131
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.150",
132
+ "entry_js_offset": 221278436,
133
+ "entry_end_offset": 236586147,
134
+ "status": "termux_verified"
128
135
  }
129
136
  }
130
137
  }
@@ -5,9 +5,9 @@
5
5
  "canonical_manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json",
6
6
  "canonical_repository_url": "https://github.com/bash0816/ClaudeCode-Termux",
7
7
  "bridge_package_version": "2.1.123",
8
- "default_native_version": "2.1.150-1",
9
- "latest_audited_version": "2.1.150-1",
10
- "latest_candidate_version": "2.1.150-1",
11
- "previous_stable_version": "2.1.150",
8
+ "default_native_version": "2.1.150-2",
9
+ "latest_audited_version": "2.1.150-2",
10
+ "latest_candidate_version": "2.1.150-2",
11
+ "previous_stable_version": "2.1.150-1",
12
12
  "manifest_url": "https://raw.githubusercontent.com/bash0816/CluadeCode-Termux/main/config/claude-termux-release-manifest.json"
13
13
  }
@@ -209,11 +209,46 @@ function createBunShim() {
209
209
  windowsHide: options.windowsHide,
210
210
  });
211
211
  child.exited = new Promise(resolve => {
212
- child.once('exit', (code, signal) => resolve({ code, signal }));
212
+ child.once('exit', (code) => resolve(code ?? 0));
213
213
  });
214
+ function makeTextReader(stream) {
215
+ return {
216
+ text() {
217
+ return new Promise((resolve, reject) => {
218
+ if (!stream) return resolve('');
219
+ const chunks = [];
220
+ stream.on('data', chunk => chunks.push(chunk));
221
+ stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
222
+ stream.on('error', reject);
223
+ });
224
+ },
225
+ };
226
+ }
227
+ if (child.stdout) Object.assign(child.stdout, makeTextReader(child.stdout));
228
+ if (child.stderr) Object.assign(child.stderr, makeTextReader(child.stderr));
214
229
  return child;
215
230
  }
216
231
 
232
+ class TerminalShim {
233
+ constructor(options = {}) {
234
+ this._options = options;
235
+ this._cols = options.cols || 80;
236
+ this._rows = options.rows || 24;
237
+ this._closed = false;
238
+ }
239
+ write(data) {
240
+ if (this._closed) return;
241
+ if (this._options.data) this._options.data(this, Buffer.isBuffer(data) ? data : Buffer.from(data));
242
+ }
243
+ resize(cols, rows) {
244
+ this._cols = cols;
245
+ this._rows = rows;
246
+ }
247
+ close() {
248
+ this._closed = true;
249
+ }
250
+ }
251
+
217
252
  function listen(options) {
218
253
  const sockets = new Set();
219
254
  const server = net.createServer(socket => {
@@ -276,20 +311,67 @@ function createBunShim() {
276
311
 
277
312
  const semver = {
278
313
  order(left, right) {
279
- const leftParts = String(left).split('.').map(Number);
280
- const rightParts = String(right).split('.').map(Number);
314
+ const leftParts = String(left).replace(/^[^0-9]*/, '').split('.').map(Number);
315
+ const rightParts = String(right).replace(/^[^0-9]*/, '').split('.').map(Number);
281
316
  const size = Math.max(leftParts.length, rightParts.length);
282
317
  for (let index = 0; index < size; index += 1) {
283
318
  const diff = (leftParts[index] || 0) - (rightParts[index] || 0);
284
- if (diff !== 0) return diff;
319
+ if (diff !== 0) return diff > 0 ? 1 : -1;
285
320
  }
286
321
  return 0;
287
322
  },
323
+ satisfies(version, range) {
324
+ const v = String(version).replace(/^[^0-9]*/, '');
325
+ const clean = String(range).trim();
326
+ const match = clean.match(/^([><=!^~]+)\s*([0-9][^\s]*)/);
327
+ if (!match) return true;
328
+ const [, op, rv] = match;
329
+ const cmp = semver.order(v, rv);
330
+ if (op === '>=' || op === '=>') return cmp >= 0;
331
+ if (op === '>') return cmp > 0;
332
+ if (op === '<=' || op === '=<') return cmp <= 0;
333
+ if (op === '<') return cmp < 0;
334
+ if (op === '==' || op === '=') return cmp === 0;
335
+ if (op === '!=') return cmp !== 0;
336
+ return true;
337
+ },
338
+ };
339
+
340
+ const YAML = {
341
+ parse(text) {
342
+ try {
343
+ const lines = String(text).split('\n');
344
+ const result = {};
345
+ for (const line of lines) {
346
+ const m = line.match(/^([^:#]+):\s*(.*)$/);
347
+ if (m) result[m[1].trim()] = m[2].trim().replace(/^["']|["']$/g, '');
348
+ }
349
+ return result;
350
+ } catch { return {}; }
351
+ },
352
+ stringify(obj) {
353
+ try {
354
+ return Object.entries(obj || {}).map(([k, v]) => `${k}: ${v}`).join('\n') + '\n';
355
+ } catch { return ''; }
356
+ },
357
+ };
358
+
359
+ const Transpiler = {
360
+ transformSync(code) { return typeof code === 'string' ? code : ''; },
361
+ scanImports(code) {
362
+ const imports = [];
363
+ const re = /(?:import|require)\s*\(?['"]([^'"]+)['"]\)?/g;
364
+ let m;
365
+ while ((m = re.exec(String(code))) !== null) imports.push({ path: m[1] });
366
+ return imports;
367
+ },
288
368
  };
289
369
 
290
370
  return {
291
371
  version: '1.1.8',
372
+ embeddedFiles: [],
292
373
  gc: typeof global.gc === 'function' ? () => global.gc() : () => {},
374
+ generateHeapSnapshot: () => Buffer.alloc(0),
293
375
  hash,
294
376
  listen,
295
377
  semver,
@@ -297,8 +379,11 @@ function createBunShim() {
297
379
  stdin: process.stdin,
298
380
  stripANSI,
299
381
  stringWidth,
382
+ Terminal: TerminalShim,
383
+ Transpiler,
300
384
  which,
301
385
  wrapAnsi: value => String(value ?? ''),
386
+ YAML,
302
387
  };
303
388
  }
304
389
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash0816/claude-code",
3
- "version": "2.1.150-1",
3
+ "version": "2.1.150-2",
4
4
  "description": "Termux-native Claude Code wrapper with audited native replay",
5
5
  "license": "MIT",
6
6
  "bin": {