@bash0816/claude-code 2.1.153 → 2.1.154-1
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.
|
@@ -146,6 +146,41 @@
|
|
|
146
146
|
"entry_js_offset": 222525028,
|
|
147
147
|
"entry_end_offset": 237958345,
|
|
148
148
|
"status": "termux_verified"
|
|
149
|
+
},
|
|
150
|
+
"2.1.153-1": {
|
|
151
|
+
"wrapper_spec": "@anthropic-ai/claude-code@2.1.153",
|
|
152
|
+
"native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.153",
|
|
153
|
+
"entry_js_offset": 222525028,
|
|
154
|
+
"entry_end_offset": 237958345,
|
|
155
|
+
"status": "termux_verified"
|
|
156
|
+
},
|
|
157
|
+
"2.1.153-2": {
|
|
158
|
+
"wrapper_spec": "@anthropic-ai/claude-code@2.1.153",
|
|
159
|
+
"native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.153",
|
|
160
|
+
"entry_js_offset": 222525028,
|
|
161
|
+
"entry_end_offset": 237958345,
|
|
162
|
+
"status": "termux_verified"
|
|
163
|
+
},
|
|
164
|
+
"2.1.153-3": {
|
|
165
|
+
"wrapper_spec": "@anthropic-ai/claude-code@2.1.153",
|
|
166
|
+
"native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.153",
|
|
167
|
+
"entry_js_offset": 222525028,
|
|
168
|
+
"entry_end_offset": 237958345,
|
|
169
|
+
"status": "termux_verified"
|
|
170
|
+
},
|
|
171
|
+
"2.1.153-4": {
|
|
172
|
+
"wrapper_spec": "@anthropic-ai/claude-code@2.1.153",
|
|
173
|
+
"native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.153",
|
|
174
|
+
"entry_js_offset": 222525028,
|
|
175
|
+
"entry_end_offset": 237958345,
|
|
176
|
+
"status": "termux_verified"
|
|
177
|
+
},
|
|
178
|
+
"2.1.154": {
|
|
179
|
+
"wrapper_spec": "@anthropic-ai/claude-code@2.1.154",
|
|
180
|
+
"native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.154",
|
|
181
|
+
"entry_js_offset": 222957396,
|
|
182
|
+
"entry_end_offset": 238482842,
|
|
183
|
+
"status": "termux_verified"
|
|
149
184
|
}
|
|
150
185
|
}
|
|
151
186
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"canonical_package_name": "@bash0816/claude-code",
|
|
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
|
-
"bridge_package_version": "2.1.
|
|
8
|
-
"default_native_version": "2.1.
|
|
9
|
-
"latest_audited_version": "2.1.
|
|
10
|
-
"latest_candidate_version": "2.1.
|
|
11
|
-
"previous_stable_version": "2.1.
|
|
12
|
-
"manifest_url": "https://raw.githubusercontent.com/bash0816/
|
|
7
|
+
"bridge_package_version": "2.1.154-1",
|
|
8
|
+
"default_native_version": "2.1.154",
|
|
9
|
+
"latest_audited_version": "2.1.154",
|
|
10
|
+
"latest_candidate_version": "2.1.154",
|
|
11
|
+
"previous_stable_version": "2.1.126",
|
|
12
|
+
"manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json"
|
|
13
13
|
}
|
package/lib/check-updates.js
CHANGED
|
@@ -24,8 +24,14 @@ const canonicalPackageName = process.env.CLAUDE_TERMUX_CANONICAL_PACKAGE_NAME ||
|
|
|
24
24
|
const canonicalRepositoryUrl = process.env.CLAUDE_TERMUX_CANONICAL_REPOSITORY_URL || localManifest.canonical_repository_url || '';
|
|
25
25
|
|
|
26
26
|
function compareVersions(a, b) {
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const parse = v => {
|
|
28
|
+
const [main, patch] = String(v).split('-');
|
|
29
|
+
const parts = main.split('.').map(Number);
|
|
30
|
+
parts.push(patch !== undefined ? Number(patch) : 0);
|
|
31
|
+
return parts;
|
|
32
|
+
};
|
|
33
|
+
const aParts = parse(a);
|
|
34
|
+
const bParts = parse(b);
|
|
29
35
|
const len = Math.max(aParts.length, bParts.length);
|
|
30
36
|
for (let index = 0; index < len; index += 1) {
|
|
31
37
|
const diff = (aParts[index] || 0) - (bParts[index] || 0);
|
|
@@ -119,315 +119,236 @@ function createFakeRequire(realRequire) {
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (typeof value !== 'string' || value.length === 0) return '';
|
|
132
|
-
return value.replace(ansiPattern, '');
|
|
133
|
-
}
|
|
122
|
+
const ansiPattern =
|
|
123
|
+
/[\u001B\u009B][[\]()#;?]*(?:(?:(?:;[-a-zA-Z\d\/\#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/\#&.:=?%@~_]*)*)?(?:\u0007|\u001B\u005C|\u009C)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g;
|
|
124
|
+
const ansiPatternSingle = new RegExp(ansiPattern.source);
|
|
125
|
+
const debugBunShim = process.env.CLAUDE_TERMUX_DEBUG_BUN_SHIM === '1';
|
|
126
|
+
|
|
127
|
+
function stripANSI(text) {
|
|
128
|
+
if (typeof text !== 'string' || text.length === 0) return '';
|
|
129
|
+
return text.replace(ansiPattern, '');
|
|
130
|
+
}
|
|
134
131
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
function codePointWidth(codePoint) {
|
|
133
|
+
if (
|
|
134
|
+
codePoint <= 0x1f ||
|
|
135
|
+
(codePoint >= 0x7f && codePoint <= 0x9f) ||
|
|
136
|
+
(codePoint >= 0x300 && codePoint <= 0x36f) ||
|
|
137
|
+
(codePoint >= 0x200b && codePoint <= 0x200f) ||
|
|
138
|
+
codePoint === 0xfeff ||
|
|
139
|
+
(codePoint >= 0xfe00 && codePoint <= 0xfe0f)
|
|
140
|
+
) {
|
|
141
|
+
return 0;
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
144
|
+
if (
|
|
145
|
+
(codePoint >= 0x1100 && codePoint <= 0x115f) ||
|
|
146
|
+
(codePoint >= 0x2329 && codePoint <= 0x232a) ||
|
|
147
|
+
(codePoint >= 0x2e80 && codePoint <= 0xa4cf && codePoint !== 0x303f) ||
|
|
148
|
+
(codePoint >= 0xac00 && codePoint <= 0xd7a3) ||
|
|
149
|
+
(codePoint >= 0xf900 && codePoint <= 0xfaff) ||
|
|
150
|
+
(codePoint >= 0xfe10 && codePoint <= 0xfe19) ||
|
|
151
|
+
(codePoint >= 0xfe30 && codePoint <= 0xfe6f) ||
|
|
152
|
+
(codePoint >= 0xff00 && codePoint <= 0xff60) ||
|
|
153
|
+
(codePoint >= 0xffe0 && codePoint <= 0xffe6) ||
|
|
154
|
+
(codePoint >= 0x1f300 && codePoint <= 0x1faf8) ||
|
|
155
|
+
(codePoint >= 0x20000 && codePoint <= 0x3fffd)
|
|
156
|
+
) {
|
|
157
|
+
return 2;
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
160
|
+
return 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function stringWidth(value) {
|
|
164
|
+
const text = stripANSI(typeof value === 'string' ? value : String(value ?? ''));
|
|
165
|
+
let width = 0;
|
|
166
|
+
for (const char of text) {
|
|
167
|
+
const codePoint = char.codePointAt(0);
|
|
168
|
+
width += codePointWidth(codePoint);
|
|
171
169
|
}
|
|
170
|
+
return width;
|
|
171
|
+
}
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
function toHashBytes(value) {
|
|
174
|
+
if (Buffer.isBuffer(value)) return Buffer.from(value);
|
|
175
|
+
if (value instanceof Uint8Array) return Buffer.from(value.buffer, value.byteOffset, value.byteLength);
|
|
176
|
+
if (value instanceof ArrayBuffer) return Buffer.from(value);
|
|
177
|
+
if (ArrayBuffer.isView(value)) {
|
|
178
|
+
return Buffer.from(value.buffer, value.byteOffset, value.byteLength);
|
|
177
179
|
}
|
|
180
|
+
return Buffer.from(String(value ?? ''));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function hashValue(value, seed = 0) {
|
|
184
|
+
const FNV_OFFSET_BASIS_64 = 0xcbf29ce484222325n;
|
|
185
|
+
const FNV_PRIME_64 = 0x100000001b3n;
|
|
186
|
+
const MASK_64 = 0xffffffffffffffffn;
|
|
178
187
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
188
|
+
const seedNumber = typeof seed === 'bigint' ? Number(seed) : Number(seed);
|
|
189
|
+
const seedValue = Number.isFinite(seedNumber) ? Math.trunc(seedNumber) : 0;
|
|
190
|
+
let result = BigInt.asUintN(64, FNV_OFFSET_BASIS_64 ^ BigInt(seedValue));
|
|
191
|
+
|
|
192
|
+
const bytes = toHashBytes(value);
|
|
193
|
+
for (const byte of bytes) {
|
|
194
|
+
result ^= BigInt(byte);
|
|
195
|
+
result = (result * FNV_PRIME_64) & MASK_64;
|
|
182
196
|
}
|
|
183
197
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
return BigInt(result);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function which(cmd) {
|
|
202
|
+
const fs = require('fs');
|
|
203
|
+
const path = require('path');
|
|
204
|
+
|
|
205
|
+
if (typeof cmd !== 'string' || cmd.length === 0) return null;
|
|
206
|
+
|
|
207
|
+
const isExecutable = candidate => {
|
|
208
|
+
try {
|
|
209
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
210
|
+
const stat = fs.statSync(candidate);
|
|
211
|
+
return stat.isFile();
|
|
212
|
+
} catch {
|
|
213
|
+
return false;
|
|
195
214
|
}
|
|
196
|
-
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
if (cmd.includes(path.sep)) {
|
|
218
|
+
return isExecutable(cmd) ? path.resolve(cmd) : null;
|
|
197
219
|
}
|
|
198
220
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
221
|
+
const searchPath = process.env.PATH || '';
|
|
222
|
+
for (const entry of searchPath.split(path.delimiter)) {
|
|
223
|
+
if (!entry) continue;
|
|
224
|
+
const candidate = path.join(entry, cmd);
|
|
225
|
+
if (isExecutable(candidate)) return candidate;
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
205
229
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
230
|
+
function wrapAnsi(str, columns, options) {
|
|
231
|
+
const input = typeof str === 'string' ? str : String(str ?? '');
|
|
232
|
+
const widthLimit = Number(columns);
|
|
233
|
+
if (!Number.isFinite(widthLimit) || widthLimit <= 0) return input;
|
|
210
234
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
stdioSpec = ['pipe', 'pipe', 'pipe'];
|
|
214
|
-
} else if (Array.isArray(options.stdio)) {
|
|
215
|
-
stdioSpec = options.stdio.map(s => resolveStdio(s, 'pipe'));
|
|
216
|
-
} else {
|
|
217
|
-
stdioSpec = [
|
|
218
|
-
resolveStdio(options.stdin, 'pipe'),
|
|
219
|
-
resolveStdio(options.stdout, 'pipe'),
|
|
220
|
-
resolveStdio(options.stderr, 'pipe'),
|
|
221
|
-
];
|
|
222
|
-
}
|
|
235
|
+
const wordWrap = !options || options.wordWrap !== false;
|
|
236
|
+
const hard = !!(options && options.hard);
|
|
223
237
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
detached: options.detached,
|
|
228
|
-
windowsHide: options.windowsHide,
|
|
229
|
-
stdio: stdioSpec,
|
|
230
|
-
});
|
|
238
|
+
if (!wordWrap || hard) {
|
|
239
|
+
const result = [];
|
|
240
|
+
let width = 0;
|
|
231
241
|
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
terminal.write = data => {
|
|
242
|
-
if (nodeChild.stdin && !nodeChild.stdin.destroyed) {
|
|
243
|
-
nodeChild.stdin.write(Buffer.isBuffer(data) ? data : Buffer.from(data));
|
|
242
|
+
for (let i = 0; i < input.length; ) {
|
|
243
|
+
const char = input[i];
|
|
244
|
+
|
|
245
|
+
if (char === '\u001b' || char === '\u009b') {
|
|
246
|
+
const match = input.slice(i).match(ansiPatternSingle);
|
|
247
|
+
if (match && match.index === 0) {
|
|
248
|
+
result.push(match[0]);
|
|
249
|
+
i += match[0].length;
|
|
250
|
+
continue;
|
|
244
251
|
}
|
|
245
|
-
|
|
246
|
-
};
|
|
247
|
-
}
|
|
252
|
+
}
|
|
248
253
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
254
|
+
if (char === '\n') {
|
|
255
|
+
result.push(char);
|
|
256
|
+
width = 0;
|
|
257
|
+
i += 1;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
252
260
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
const codePoint = input.codePointAt(i);
|
|
262
|
+
const charText = String.fromCodePoint(codePoint);
|
|
263
|
+
const charWidth = codePointWidth(codePoint);
|
|
264
|
+
|
|
265
|
+
if (width > 0 && width + charWidth > widthLimit) {
|
|
266
|
+
result.push('\n');
|
|
267
|
+
width = 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
result.push(charText);
|
|
271
|
+
width += charWidth;
|
|
272
|
+
i += charText.length;
|
|
265
273
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return nodeChild;
|
|
274
|
+
|
|
275
|
+
return result.join('');
|
|
269
276
|
}
|
|
270
277
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
const result = [];
|
|
279
|
+
let line = '';
|
|
280
|
+
let lineWidth = 0;
|
|
281
|
+
let pendingSpaces = '';
|
|
282
|
+
|
|
283
|
+
for (let i = 0; i < input.length; ) {
|
|
284
|
+
const char = input[i];
|
|
285
|
+
|
|
286
|
+
if (char === '\u001b' || char === '\u009b') {
|
|
287
|
+
const match = input.slice(i).match(ansiPatternSingle);
|
|
288
|
+
if (match && match.index === 0) {
|
|
289
|
+
line += match[0];
|
|
290
|
+
i += match[0].length;
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
280
293
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
294
|
+
|
|
295
|
+
if (char === '\n') {
|
|
296
|
+
if (line.length > 0) result.push(line);
|
|
297
|
+
result.push('\n');
|
|
298
|
+
line = '';
|
|
299
|
+
lineWidth = 0;
|
|
300
|
+
pendingSpaces = '';
|
|
301
|
+
i += 1;
|
|
302
|
+
continue;
|
|
284
303
|
}
|
|
285
|
-
|
|
286
|
-
|
|
304
|
+
|
|
305
|
+
const codePoint = input.codePointAt(i);
|
|
306
|
+
const charText = String.fromCodePoint(codePoint);
|
|
307
|
+
if (charText === ' ' || charText === '\t') {
|
|
308
|
+
pendingSpaces += charText;
|
|
309
|
+
i += charText.length;
|
|
310
|
+
continue;
|
|
287
311
|
}
|
|
288
|
-
}
|
|
289
312
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
data: undefined,
|
|
296
|
-
write(chunk) {
|
|
297
|
-
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
298
|
-
const ok = socket.write(buffer);
|
|
299
|
-
return ok ? buffer.length : 0;
|
|
300
|
-
},
|
|
301
|
-
end(chunk) {
|
|
302
|
-
socket.end(chunk);
|
|
303
|
-
},
|
|
304
|
-
destroy(error) {
|
|
305
|
-
socket.destroy(error);
|
|
306
|
-
},
|
|
307
|
-
};
|
|
308
|
-
socket.on('data', chunk => {
|
|
309
|
-
if (options.socket && typeof options.socket.data === 'function') {
|
|
310
|
-
options.socket.data(connection, chunk);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
socket.on('drain', () => {
|
|
314
|
-
if (options.socket && typeof options.socket.drain === 'function') {
|
|
315
|
-
options.socket.drain(connection);
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
socket.on('close', () => {
|
|
319
|
-
sockets.delete(socket);
|
|
320
|
-
if (options.socket && typeof options.socket.close === 'function') {
|
|
321
|
-
options.socket.close(connection);
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
socket.on('error', error => {
|
|
325
|
-
if (options.socket && typeof options.socket.error === 'function') {
|
|
326
|
-
options.socket.error(connection, error);
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
if (options.socket && typeof options.socket.open === 'function') {
|
|
330
|
-
options.socket.open(connection);
|
|
313
|
+
let end = i + charText.length;
|
|
314
|
+
while (end < input.length) {
|
|
315
|
+
const nextChar = input[end];
|
|
316
|
+
if (nextChar === '\n' || nextChar === ' ' || nextChar === '\t' || nextChar === '\u001b' || nextChar === '\u009b') {
|
|
317
|
+
break;
|
|
331
318
|
}
|
|
332
|
-
|
|
319
|
+
const nextCodePoint = input.codePointAt(end);
|
|
320
|
+
end += String.fromCodePoint(nextCodePoint).length;
|
|
321
|
+
}
|
|
333
322
|
|
|
334
|
-
|
|
323
|
+
const text = input.slice(i, end);
|
|
324
|
+
const textWidth = stringWidth(text);
|
|
325
|
+
const pendingWidth = pendingSpaces ? stringWidth(pendingSpaces) : 0;
|
|
335
326
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
if (closeConnections) {
|
|
344
|
-
for (const socket of sockets) socket.destroy();
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
};
|
|
348
|
-
}
|
|
327
|
+
if (lineWidth > 0 && lineWidth + pendingWidth + textWidth > widthLimit) {
|
|
328
|
+
result.push(line);
|
|
329
|
+
result.push('\n');
|
|
330
|
+
line = '';
|
|
331
|
+
lineWidth = 0;
|
|
332
|
+
pendingSpaces = '';
|
|
333
|
+
}
|
|
349
334
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
for (let index = 0; index < size; index += 1) {
|
|
356
|
-
const diff = (leftParts[index] || 0) - (rightParts[index] || 0);
|
|
357
|
-
if (diff !== 0) return diff > 0 ? 1 : -1;
|
|
358
|
-
}
|
|
359
|
-
return 0;
|
|
360
|
-
},
|
|
361
|
-
satisfies(version, range) {
|
|
362
|
-
const v = String(version).replace(/^[^0-9]*/, '');
|
|
363
|
-
const clean = String(range).trim();
|
|
364
|
-
const match = clean.match(/^([><=!^~]+)\s*([0-9][^\s]*)/);
|
|
365
|
-
if (!match) return true;
|
|
366
|
-
const [, op, rv] = match;
|
|
367
|
-
const cmp = semver.order(v, rv);
|
|
368
|
-
if (op === '>=' || op === '=>') return cmp >= 0;
|
|
369
|
-
if (op === '>') return cmp > 0;
|
|
370
|
-
if (op === '<=' || op === '=<') return cmp <= 0;
|
|
371
|
-
if (op === '<') return cmp < 0;
|
|
372
|
-
if (op === '==' || op === '=') return cmp === 0;
|
|
373
|
-
if (op === '!=') return cmp !== 0;
|
|
374
|
-
return true;
|
|
375
|
-
},
|
|
376
|
-
};
|
|
335
|
+
if (lineWidth > 0 && pendingSpaces) {
|
|
336
|
+
line += pendingSpaces;
|
|
337
|
+
lineWidth += pendingWidth;
|
|
338
|
+
}
|
|
339
|
+
pendingSpaces = '';
|
|
377
340
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
const result = {};
|
|
383
|
-
for (const line of lines) {
|
|
384
|
-
const m = line.match(/^([^:#]+):\s*(.*)$/);
|
|
385
|
-
if (m) result[m[1].trim()] = m[2].trim().replace(/^["']|["']$/g, '');
|
|
386
|
-
}
|
|
387
|
-
return result;
|
|
388
|
-
} catch { return {}; }
|
|
389
|
-
},
|
|
390
|
-
stringify(obj) {
|
|
391
|
-
try {
|
|
392
|
-
return Object.entries(obj || {}).map(([k, v]) => `${k}: ${v}`).join('\n') + '\n';
|
|
393
|
-
} catch { return ''; }
|
|
394
|
-
},
|
|
395
|
-
};
|
|
341
|
+
line += text;
|
|
342
|
+
lineWidth += textWidth;
|
|
343
|
+
i = end;
|
|
344
|
+
}
|
|
396
345
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
transformSync(code) { return typeof code === 'string' ? code : ''; }
|
|
400
|
-
scanImports(code) {
|
|
401
|
-
const imports = [];
|
|
402
|
-
const reStatic = /(?:^|[^.])import\s+(?:[^'"]+\s+from\s+)?['"]([^'"]+)['"]/gm;
|
|
403
|
-
const reDynamic = /import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
404
|
-
const reRequire = /require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
405
|
-
let m;
|
|
406
|
-
while ((m = reStatic.exec(String(code))) !== null) imports.push({ path: m[1], kind: 'import-statement' });
|
|
407
|
-
while ((m = reDynamic.exec(String(code))) !== null) imports.push({ path: m[1], kind: 'dynamic-import' });
|
|
408
|
-
while ((m = reRequire.exec(String(code))) !== null) imports.push({ path: m[1], kind: 'require-call' });
|
|
409
|
-
return imports;
|
|
410
|
-
}
|
|
346
|
+
if (pendingSpaces && lineWidth > 0) {
|
|
347
|
+
line += pendingSpaces;
|
|
411
348
|
}
|
|
349
|
+
if (line.length > 0) result.push(line);
|
|
412
350
|
|
|
413
|
-
return
|
|
414
|
-
version: '1.1.8',
|
|
415
|
-
embeddedFiles: [],
|
|
416
|
-
gc: typeof global.gc === 'function' ? () => global.gc() : () => {},
|
|
417
|
-
generateHeapSnapshot: () => Buffer.alloc(0),
|
|
418
|
-
hash,
|
|
419
|
-
listen,
|
|
420
|
-
semver,
|
|
421
|
-
spawn,
|
|
422
|
-
stdin: process.stdin,
|
|
423
|
-
stripANSI,
|
|
424
|
-
stringWidth,
|
|
425
|
-
Terminal: TerminalShim,
|
|
426
|
-
Transpiler,
|
|
427
|
-
which,
|
|
428
|
-
wrapAnsi: value => String(value ?? ''),
|
|
429
|
-
YAML,
|
|
430
|
-
};
|
|
351
|
+
return result.join('');
|
|
431
352
|
}
|
|
432
353
|
|
|
433
354
|
async function main() {
|
|
@@ -451,7 +372,24 @@ async function main() {
|
|
|
451
372
|
process.once('uncaughtException', onAsyncError);
|
|
452
373
|
process.once('unhandledRejection', onAsyncError);
|
|
453
374
|
Object.defineProperty(process.versions, 'bun', { value: '1.1.8', configurable: true });
|
|
454
|
-
|
|
375
|
+
const BunShim = {
|
|
376
|
+
version: '1.1.8',
|
|
377
|
+
stringWidth,
|
|
378
|
+
hash: hashValue,
|
|
379
|
+
which,
|
|
380
|
+
wrapAnsi,
|
|
381
|
+
stripANSI,
|
|
382
|
+
};
|
|
383
|
+
const BunProxy = new Proxy(BunShim, {
|
|
384
|
+
get(target, key, receiver) {
|
|
385
|
+
if (!(key in target) && typeof key !== 'symbol' && debugBunShim) {
|
|
386
|
+
console.error('[BunShim missing]', key);
|
|
387
|
+
}
|
|
388
|
+
return Reflect.get(target, key, receiver);
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
globalThis.Bun = BunProxy;
|
|
392
|
+
|
|
455
393
|
process.argv = ['node', extractedFile, ...argv];
|
|
456
394
|
process.exit = code => {
|
|
457
395
|
throw new RequestedExit(code);
|
|
@@ -480,8 +418,6 @@ async function main() {
|
|
|
480
418
|
Object.defineProperty(process.versions, 'bun', { value: originalBun, configurable: true });
|
|
481
419
|
}
|
|
482
420
|
} catch {}
|
|
483
|
-
if (hadGlobalBun) globalThis.Bun = originalGlobalBun;
|
|
484
|
-
else delete globalThis.Bun;
|
|
485
421
|
}
|
|
486
422
|
}
|
|
487
423
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash0816/claude-code",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.154-1",
|
|
4
4
|
"description": "Termux-native Claude Code wrapper with audited native replay",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=18"
|
|
21
21
|
}
|
|
22
22
|
}
|