@funnycode/myclaude 0.1.109 → 0.1.111
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/dist/myclaude.js +40 -31
- package/dist/myclaude.mjs +40 -31
- package/package.json +1 -1
package/dist/myclaude.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.111",
|
|
8
|
+
BUILD_TIME: "2026-07-20T14:57:42.003Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117491,7 +117491,7 @@ var package_default;
|
|
|
117491
117491
|
var init_package = __esm(() => {
|
|
117492
117492
|
package_default = {
|
|
117493
117493
|
name: "@funnycode/myclaude",
|
|
117494
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.111",
|
|
117495
117495
|
private: false,
|
|
117496
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117497
117497
|
license: "MIT",
|
|
@@ -301206,50 +301206,59 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301206
301206
|
const memoized = memoize_default(fn);
|
|
301207
301207
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301208
301208
|
const pendingRefreshes = new Map;
|
|
301209
|
+
const keyMutexes = new Map;
|
|
301209
301210
|
const wrapped = async (...args) => {
|
|
301210
301211
|
const now2 = Date.now();
|
|
301211
301212
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301212
301213
|
if (cacheExpired) {
|
|
301213
301214
|
const key2 = String(args[0] ?? "_default");
|
|
301214
|
-
|
|
301215
|
-
if (
|
|
301216
|
-
|
|
301215
|
+
let keyMutex = keyMutexes.get(key2);
|
|
301216
|
+
if (!keyMutex) {
|
|
301217
|
+
keyMutex = new Mutex;
|
|
301218
|
+
keyMutexes.set(key2, keyMutex);
|
|
301217
301219
|
}
|
|
301218
|
-
const
|
|
301219
|
-
|
|
301220
|
-
|
|
301221
|
-
|
|
301222
|
-
|
|
301223
|
-
|
|
301220
|
+
const release = await keyMutex.acquire();
|
|
301221
|
+
try {
|
|
301222
|
+
const existing = pendingRefreshes.get(key2);
|
|
301223
|
+
if (existing) {
|
|
301224
|
+
return existing;
|
|
301225
|
+
}
|
|
301226
|
+
const refreshPromise = (async () => {
|
|
301224
301227
|
try {
|
|
301225
|
-
const
|
|
301226
|
-
if (
|
|
301227
|
-
|
|
301228
|
-
memoized.cache.set(args[0], freshResult);
|
|
301229
|
-
lastCachedAt = Date.now();
|
|
301230
|
-
return freshResult;
|
|
301228
|
+
const now22 = Date.now();
|
|
301229
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301230
|
+
return memoized(...args);
|
|
301231
301231
|
}
|
|
301232
|
-
|
|
301233
|
-
|
|
301234
|
-
|
|
301232
|
+
try {
|
|
301233
|
+
const freshResult = await fn(...args);
|
|
301234
|
+
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301235
|
+
originalClear();
|
|
301236
|
+
memoized.cache.set(args[0], freshResult);
|
|
301237
|
+
lastCachedAt = Date.now();
|
|
301238
|
+
return freshResult;
|
|
301239
|
+
}
|
|
301240
|
+
return memoized(...args);
|
|
301241
|
+
} catch (error49) {
|
|
301242
|
+
return memoized(...args);
|
|
301243
|
+
}
|
|
301244
|
+
} finally {
|
|
301245
|
+
pendingRefreshes.delete(key2);
|
|
301235
301246
|
}
|
|
301236
|
-
}
|
|
301237
|
-
|
|
301238
|
-
|
|
301239
|
-
}
|
|
301240
|
-
|
|
301241
|
-
|
|
301247
|
+
})();
|
|
301248
|
+
pendingRefreshes.set(key2, refreshPromise);
|
|
301249
|
+
return refreshPromise;
|
|
301250
|
+
} finally {
|
|
301251
|
+
release();
|
|
301252
|
+
}
|
|
301242
301253
|
}
|
|
301243
301254
|
try {
|
|
301244
301255
|
const result = await memoized(...args);
|
|
301245
301256
|
if (result && typeof result === "object" && "success" in result && result.success === true) {
|
|
301246
301257
|
lastCachedAt = Date.now();
|
|
301247
|
-
} else if (result && typeof result === "object" && "success" in result && result.success === false) {
|
|
301248
|
-
lastCachedAt = Date.now();
|
|
301249
|
-
}
|
|
301258
|
+
} else if (result && typeof result === "object" && "success" in result && result.success === false) {}
|
|
301250
301259
|
return result;
|
|
301251
301260
|
} catch (error49) {
|
|
301252
|
-
|
|
301261
|
+
logError2(error49);
|
|
301253
301262
|
return { success: false };
|
|
301254
301263
|
}
|
|
301255
301264
|
};
|
package/dist/myclaude.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-07-
|
|
7
|
+
VERSION: "0.1.111",
|
|
8
|
+
BUILD_TIME: "2026-07-20T14:57:42.003Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117491,7 +117491,7 @@ var package_default;
|
|
|
117491
117491
|
var init_package = __esm(() => {
|
|
117492
117492
|
package_default = {
|
|
117493
117493
|
name: "@funnycode/myclaude",
|
|
117494
|
-
version: "0.1.
|
|
117494
|
+
version: "0.1.111",
|
|
117495
117495
|
private: false,
|
|
117496
117496
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117497
117497
|
license: "MIT",
|
|
@@ -301206,50 +301206,59 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301206
301206
|
const memoized = memoize_default(fn);
|
|
301207
301207
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301208
301208
|
const pendingRefreshes = new Map;
|
|
301209
|
+
const keyMutexes = new Map;
|
|
301209
301210
|
const wrapped = async (...args) => {
|
|
301210
301211
|
const now2 = Date.now();
|
|
301211
301212
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301212
301213
|
if (cacheExpired) {
|
|
301213
301214
|
const key2 = String(args[0] ?? "_default");
|
|
301214
|
-
|
|
301215
|
-
if (
|
|
301216
|
-
|
|
301215
|
+
let keyMutex = keyMutexes.get(key2);
|
|
301216
|
+
if (!keyMutex) {
|
|
301217
|
+
keyMutex = new Mutex;
|
|
301218
|
+
keyMutexes.set(key2, keyMutex);
|
|
301217
301219
|
}
|
|
301218
|
-
const
|
|
301219
|
-
|
|
301220
|
-
|
|
301221
|
-
|
|
301222
|
-
|
|
301223
|
-
|
|
301220
|
+
const release = await keyMutex.acquire();
|
|
301221
|
+
try {
|
|
301222
|
+
const existing = pendingRefreshes.get(key2);
|
|
301223
|
+
if (existing) {
|
|
301224
|
+
return existing;
|
|
301225
|
+
}
|
|
301226
|
+
const refreshPromise = (async () => {
|
|
301224
301227
|
try {
|
|
301225
|
-
const
|
|
301226
|
-
if (
|
|
301227
|
-
|
|
301228
|
-
memoized.cache.set(args[0], freshResult);
|
|
301229
|
-
lastCachedAt = Date.now();
|
|
301230
|
-
return freshResult;
|
|
301228
|
+
const now22 = Date.now();
|
|
301229
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301230
|
+
return memoized(...args);
|
|
301231
301231
|
}
|
|
301232
|
-
|
|
301233
|
-
|
|
301234
|
-
|
|
301232
|
+
try {
|
|
301233
|
+
const freshResult = await fn(...args);
|
|
301234
|
+
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301235
|
+
originalClear();
|
|
301236
|
+
memoized.cache.set(args[0], freshResult);
|
|
301237
|
+
lastCachedAt = Date.now();
|
|
301238
|
+
return freshResult;
|
|
301239
|
+
}
|
|
301240
|
+
return memoized(...args);
|
|
301241
|
+
} catch (error49) {
|
|
301242
|
+
return memoized(...args);
|
|
301243
|
+
}
|
|
301244
|
+
} finally {
|
|
301245
|
+
pendingRefreshes.delete(key2);
|
|
301235
301246
|
}
|
|
301236
|
-
}
|
|
301237
|
-
|
|
301238
|
-
|
|
301239
|
-
}
|
|
301240
|
-
|
|
301241
|
-
|
|
301247
|
+
})();
|
|
301248
|
+
pendingRefreshes.set(key2, refreshPromise);
|
|
301249
|
+
return refreshPromise;
|
|
301250
|
+
} finally {
|
|
301251
|
+
release();
|
|
301252
|
+
}
|
|
301242
301253
|
}
|
|
301243
301254
|
try {
|
|
301244
301255
|
const result = await memoized(...args);
|
|
301245
301256
|
if (result && typeof result === "object" && "success" in result && result.success === true) {
|
|
301246
301257
|
lastCachedAt = Date.now();
|
|
301247
|
-
} else if (result && typeof result === "object" && "success" in result && result.success === false) {
|
|
301248
|
-
lastCachedAt = Date.now();
|
|
301249
|
-
}
|
|
301258
|
+
} else if (result && typeof result === "object" && "success" in result && result.success === false) {}
|
|
301250
301259
|
return result;
|
|
301251
301260
|
} catch (error49) {
|
|
301252
|
-
|
|
301261
|
+
logError2(error49);
|
|
301253
301262
|
return { success: false };
|
|
301254
301263
|
}
|
|
301255
301264
|
};
|