@lmnr-ai/claude-code-proxy 0.1.3-alpha.2 → 0.1.4-alpha.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.
- package/dist/index.js +18 -14
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.setCurrentTrace = setCurrentTrace;
|
|
|
8
8
|
exports.runServer = runServer;
|
|
9
9
|
exports.stopServer = stopServer;
|
|
10
10
|
// Platform-specific package loading
|
|
11
|
-
//
|
|
11
|
+
// Uses explicit .node subpath exports for bundler compatibility=
|
|
12
12
|
const { join } = require('path');
|
|
13
13
|
const { platform, arch } = require('os');
|
|
14
14
|
function loadNative() {
|
|
@@ -22,24 +22,28 @@ function loadNative() {
|
|
|
22
22
|
};
|
|
23
23
|
const platformKey = `${platform()}-${arch()}`;
|
|
24
24
|
const platformName = platformMap[platformKey];
|
|
25
|
-
|
|
25
|
+
// Try multiple paths - the explicit .node extension tells bundlers
|
|
26
|
+
// this is a native module and should be left external
|
|
27
|
+
const paths = [
|
|
28
|
+
// Development build path (local .node file)
|
|
29
|
+
join(__dirname, 'lmnr-claude-code-proxy.node'),
|
|
30
|
+
// Platform package path with explicit .node subpath (bundler-friendly)
|
|
31
|
+
// The /lmnr-claude-code-proxy.node subpath is resolved via package.json exports
|
|
32
|
+
`@lmnr-ai/claude-code-proxy-${platformName}/lmnr-claude-code-proxy.node`,
|
|
33
|
+
];
|
|
34
|
+
const errors = [];
|
|
35
|
+
for (const path of paths) {
|
|
26
36
|
try {
|
|
27
|
-
|
|
28
|
-
return require(`@lmnr-ai/claude-code-proxy-${platformName}`);
|
|
37
|
+
return require(path);
|
|
29
38
|
}
|
|
30
39
|
catch (e) {
|
|
31
|
-
|
|
40
|
+
errors.push(e);
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
catch (e) {
|
|
39
|
-
throw new Error(`Failed to load native module for ${platformKey}. ` +
|
|
40
|
-
`Platform package: @lmnr-ai/claude-code-proxy-${platformName || 'unknown'}. ` +
|
|
41
|
-
`Error: ${e}`);
|
|
42
|
-
}
|
|
43
|
+
throw new Error(`Failed to load native module for ${platformKey}. ` +
|
|
44
|
+
`Platform package: @lmnr-ai/claude-code-proxy-${platformName || 'unknown'}. ` +
|
|
45
|
+
`Tried paths: ${paths.join(', ')}. ` +
|
|
46
|
+
`Errors: ${errors.map(e => e.message).join('; ')}`);
|
|
43
47
|
}
|
|
44
48
|
const native = loadNative();
|
|
45
49
|
const HEALTH_CHECK_INTERVAL = 1000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmnr-ai/claude-code-proxy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-alpha.1",
|
|
4
4
|
"description": "HTTP proxy for Claude Desktop API requests with Laminar observability",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@lmnr-ai/claude-code-proxy-darwin-arm64": "0.1.
|
|
27
|
-
"@lmnr-ai/claude-code-proxy-darwin-x64": "0.1.
|
|
28
|
-
"@lmnr-ai/claude-code-proxy-win32-x64-msvc": "0.1.
|
|
29
|
-
"@lmnr-ai/claude-code-proxy-linux-x64-gnu": "0.1.
|
|
30
|
-
"@lmnr-ai/claude-code-proxy-linux-arm64-gnu": "0.1.
|
|
31
|
-
"@lmnr-ai/claude-code-proxy-linux-x64-musl": "0.1.
|
|
32
|
-
"@lmnr-ai/claude-code-proxy-linux-arm64-musl": "0.1.
|
|
26
|
+
"@lmnr-ai/claude-code-proxy-darwin-arm64": "0.1.4-alpha.1",
|
|
27
|
+
"@lmnr-ai/claude-code-proxy-darwin-x64": "0.1.4-alpha.1",
|
|
28
|
+
"@lmnr-ai/claude-code-proxy-win32-x64-msvc": "0.1.4-alpha.1",
|
|
29
|
+
"@lmnr-ai/claude-code-proxy-linux-x64-gnu": "0.1.4-alpha.1",
|
|
30
|
+
"@lmnr-ai/claude-code-proxy-linux-arm64-gnu": "0.1.4-alpha.1",
|
|
31
|
+
"@lmnr-ai/claude-code-proxy-linux-x64-musl": "0.1.4-alpha.1",
|
|
32
|
+
"@lmnr-ai/claude-code-proxy-linux-arm64-musl": "0.1.4-alpha.1"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"claude",
|