@funnycode/myclaude 0.1.99 → 0.1.100
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 +29 -13
- package/dist/myclaude.mjs +29 -13
- 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.100",
|
|
8
|
+
BUILD_TIME: "2026-07-18T19:30:33.653Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117484,7 +117484,7 @@ var package_default;
|
|
|
117484
117484
|
var init_package = __esm(() => {
|
|
117485
117485
|
package_default = {
|
|
117486
117486
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117487
|
+
version: "0.1.100",
|
|
117488
117488
|
private: false,
|
|
117489
117489
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117490
|
license: "MIT",
|
|
@@ -301136,21 +301136,37 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301136
301136
|
let lastCachedAt = 0;
|
|
301137
301137
|
const memoized = memoize_default(fn);
|
|
301138
301138
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301139
|
+
const refreshMutexes = new Map;
|
|
301139
301140
|
const wrapped = async (...args) => {
|
|
301140
301141
|
const now2 = Date.now();
|
|
301141
301142
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301142
301143
|
if (cacheExpired) {
|
|
301144
|
+
const key2 = String(args[0] ?? "_default");
|
|
301145
|
+
let mutex = refreshMutexes.get(key2);
|
|
301146
|
+
if (!mutex) {
|
|
301147
|
+
mutex = new Mutex;
|
|
301148
|
+
refreshMutexes.set(key2, mutex);
|
|
301149
|
+
}
|
|
301150
|
+
const release = await mutex.acquire();
|
|
301143
301151
|
try {
|
|
301144
|
-
const
|
|
301145
|
-
if (
|
|
301146
|
-
|
|
301147
|
-
|
|
301148
|
-
|
|
301149
|
-
|
|
301150
|
-
|
|
301151
|
-
|
|
301152
|
-
|
|
301153
|
-
|
|
301152
|
+
const now22 = Date.now();
|
|
301153
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301154
|
+
return memoized(...args);
|
|
301155
|
+
}
|
|
301156
|
+
try {
|
|
301157
|
+
const freshResult = await fn(...args);
|
|
301158
|
+
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301159
|
+
originalClear();
|
|
301160
|
+
memoized.cache.set(args[0], freshResult);
|
|
301161
|
+
lastCachedAt = Date.now();
|
|
301162
|
+
return freshResult;
|
|
301163
|
+
}
|
|
301164
|
+
return memoized(...args);
|
|
301165
|
+
} catch (error49) {
|
|
301166
|
+
return memoized(...args);
|
|
301167
|
+
}
|
|
301168
|
+
} finally {
|
|
301169
|
+
release();
|
|
301154
301170
|
}
|
|
301155
301171
|
}
|
|
301156
301172
|
try {
|
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.100",
|
|
8
|
+
BUILD_TIME: "2026-07-18T19:30:33.653Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
|
@@ -117484,7 +117484,7 @@ var package_default;
|
|
|
117484
117484
|
var init_package = __esm(() => {
|
|
117485
117485
|
package_default = {
|
|
117486
117486
|
name: "@funnycode/myclaude",
|
|
117487
|
-
version: "0.1.
|
|
117487
|
+
version: "0.1.100",
|
|
117488
117488
|
private: false,
|
|
117489
117489
|
description: "An open-source AI coding assistant in your terminal - powered by Claude",
|
|
117490
117490
|
license: "MIT",
|
|
@@ -301136,21 +301136,37 @@ function memoizeWithTTL(fn, ttlMs) {
|
|
|
301136
301136
|
let lastCachedAt = 0;
|
|
301137
301137
|
const memoized = memoize_default(fn);
|
|
301138
301138
|
const originalClear = memoized.cache.clear.bind(memoized.cache);
|
|
301139
|
+
const refreshMutexes = new Map;
|
|
301139
301140
|
const wrapped = async (...args) => {
|
|
301140
301141
|
const now2 = Date.now();
|
|
301141
301142
|
const cacheExpired = lastCachedAt !== 0 && now2 - lastCachedAt >= ttlMs;
|
|
301142
301143
|
if (cacheExpired) {
|
|
301144
|
+
const key2 = String(args[0] ?? "_default");
|
|
301145
|
+
let mutex = refreshMutexes.get(key2);
|
|
301146
|
+
if (!mutex) {
|
|
301147
|
+
mutex = new Mutex;
|
|
301148
|
+
refreshMutexes.set(key2, mutex);
|
|
301149
|
+
}
|
|
301150
|
+
const release = await mutex.acquire();
|
|
301143
301151
|
try {
|
|
301144
|
-
const
|
|
301145
|
-
if (
|
|
301146
|
-
|
|
301147
|
-
|
|
301148
|
-
|
|
301149
|
-
|
|
301150
|
-
|
|
301151
|
-
|
|
301152
|
-
|
|
301153
|
-
|
|
301152
|
+
const now22 = Date.now();
|
|
301153
|
+
if (lastCachedAt !== 0 && now22 - lastCachedAt < ttlMs) {
|
|
301154
|
+
return memoized(...args);
|
|
301155
|
+
}
|
|
301156
|
+
try {
|
|
301157
|
+
const freshResult = await fn(...args);
|
|
301158
|
+
if (freshResult && typeof freshResult === "object" && "success" in freshResult && freshResult.success === true) {
|
|
301159
|
+
originalClear();
|
|
301160
|
+
memoized.cache.set(args[0], freshResult);
|
|
301161
|
+
lastCachedAt = Date.now();
|
|
301162
|
+
return freshResult;
|
|
301163
|
+
}
|
|
301164
|
+
return memoized(...args);
|
|
301165
|
+
} catch (error49) {
|
|
301166
|
+
return memoized(...args);
|
|
301167
|
+
}
|
|
301168
|
+
} finally {
|
|
301169
|
+
release();
|
|
301154
301170
|
}
|
|
301155
301171
|
}
|
|
301156
301172
|
try {
|