@fudrouter/fsrouter 0.6.52 → 0.6.54
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/bin/copyJs.js +18 -0
- package/bin/rewriteSseImports.js +16 -0
- package/dist/open-sse/executors/default.js +1 -1
- package/dist/open-sse/mcp-server/catalog.js +1 -1
- package/dist/open-sse/mcp-server/server.js +2 -2
- package/dist/open-sse/services/comboConfig.js +1 -1
- package/open-sse/executors/default.js +1 -1
- package/open-sse/mcp-server/catalog.js +1 -1
- package/open-sse/mcp-server/server.js +2 -2
- package/open-sse/services/comboConfig.js +1 -1
- package/package.json +1 -1
package/bin/copyJs.js
CHANGED
|
@@ -58,6 +58,24 @@ function rewriteImports(content, filePath, isJsCopy = false) {
|
|
|
58
58
|
updated = updated.replace(/\.\.\/\.\.\/\.\.\/src\//g, '../../../');
|
|
59
59
|
updated = updated.replace(/\.\.\/\.\.\/src\//g, '../../');
|
|
60
60
|
|
|
61
|
+
// 4. Fix open-sse files referencing ../../../src/lib/* or ./src/lib/*
|
|
62
|
+
// (these are copied to dist/open-sse/, so they need to resolve to ../../dist/lib/*)
|
|
63
|
+
updated = updated.replace(/['"]\.\.\/\.\.\/\.\.\/src\/lib\/([^'"]+)['"]/g, (m, imp) => {
|
|
64
|
+
const resolved = imp.endsWith('.js') ? imp : imp + '.js';
|
|
65
|
+
return `'../../dist/lib/${resolved}'`;
|
|
66
|
+
});
|
|
67
|
+
updated = updated.replace(/import\(\s*['"]\.\.\/\.\.\/\.\.\/src\/lib\/([^'"]+)['"]\s*\)/g, (m, imp) => {
|
|
68
|
+
const resolved = imp.endsWith('.js') ? imp : imp + '.js';
|
|
69
|
+
return `import('../../dist/lib/${resolved}')`;
|
|
70
|
+
});
|
|
71
|
+
updated = updated.replace(/['"]\.\.\/\.\.\/src\/lib\/([^'"]+)['"]/g, (m, imp) => {
|
|
72
|
+
const resolved = imp.endsWith('.js') ? imp : imp + '.js';
|
|
73
|
+
return `'../../../dist/lib/${resolved}'`;
|
|
74
|
+
});
|
|
75
|
+
updated = updated.replace(/import\(\s*['"]\.\.\/\.\.\/src\/lib\/([^'"]+)['"]\s*\)/g, (m, imp) => {
|
|
76
|
+
const resolved = imp.endsWith('.js') ? imp : imp + '.js';
|
|
77
|
+
return `import('../../../dist/lib/${resolved}')`;
|
|
78
|
+
});
|
|
61
79
|
// Specific fix for tokenRefresh/providers
|
|
62
80
|
if (filePath.includes('tokenRefresh')) {
|
|
63
81
|
updated = updated.replace(/\.\.\/\.\.\/\.\.\/dist\/lib\/oauth\/kiroExternalIdp.js/g, '../../../dist/lib/oauth/kiroExternalIdp.js');
|
package/bin/rewriteSseImports.js
CHANGED
|
@@ -52,6 +52,22 @@ function rewrite(file) {
|
|
|
52
52
|
.replace(/import\(\s*['\"]\.\.\/\.\.\/\.\.\/src\/lib\/([^'"]+)['\"]\s*\)/g, (m, imp) => {
|
|
53
53
|
const resolved = imp.endsWith(".js") ? imp : imp + ".js";
|
|
54
54
|
return `import('${prefix}lib/${resolved}')`;
|
|
55
|
+
})
|
|
56
|
+
.replace(/['"]\.\.\/\.\.\/src\/shared\/([^'"]+)['"]/g, (m, imp) => {
|
|
57
|
+
const resolved = imp.endsWith(".js") ? imp : imp + ".js";
|
|
58
|
+
return `'${prefix}shared/${resolved}'`;
|
|
59
|
+
})
|
|
60
|
+
.replace(/['"]\.\.\/\.\.\/src\/utils\/([^'"]+)['"]/g, (m, imp) => {
|
|
61
|
+
const resolved = imp.endsWith(".js") ? imp : imp + ".js";
|
|
62
|
+
return `'${prefix}utils/${resolved}'`;
|
|
63
|
+
})
|
|
64
|
+
.replace(/['"]\.\.\/\.\.\/src\/services\/([^'"]+)['"]/g, (m, imp) => {
|
|
65
|
+
const resolved = imp.endsWith(".js") ? imp : imp + ".js";
|
|
66
|
+
return `'${prefix}services/${resolved}'`;
|
|
67
|
+
})
|
|
68
|
+
.replace(/['"]\.\.\/\.\.\/src\/store\/([^'"]+)['"]/g, (m, imp) => {
|
|
69
|
+
const resolved = imp.endsWith(".js") ? imp : imp + ".js";
|
|
70
|
+
return `'${prefix}store/${resolved}'`;
|
|
55
71
|
});
|
|
56
72
|
|
|
57
73
|
if (content !== orig) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseExecutor } from "./base.js";
|
|
2
2
|
import { PROVIDERS } from "../config/providers.js";
|
|
3
3
|
import { OAUTH_ENDPOINTS, buildKimiHeaders, getKimchiVersionSync } from "../config/appConstants.js";
|
|
4
|
-
import { buildClineHeaders } from
|
|
4
|
+
import { buildClineHeaders } from '../../dist/shared/utils/clineAuth.js';
|
|
5
5
|
import { getCachedClaudeHeaders } from "../utils/claudeHeaderCache.js";
|
|
6
6
|
import { proxyAwareFetch } from "../utils/proxyFetch.js";
|
|
7
7
|
import { injectReasoningContent } from "../utils/reasoningContentInjector.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCodexRequestDefaults } from "../../lib/providers/requestDefaults.ts";
|
|
2
2
|
import { getProviderConnections } from "../../lib/db/providers.ts";
|
|
3
|
-
import { AI_PROVIDERS, NOAUTH_PROVIDERS } from
|
|
3
|
+
import { AI_PROVIDERS, NOAUTH_PROVIDERS } from '../../dist/shared/constants/providers.ts.js';
|
|
4
4
|
function toRecord(value) {
|
|
5
5
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
6
6
|
}
|
|
@@ -83,8 +83,8 @@ import {
|
|
|
83
83
|
clampMcpAccessibilityConfig
|
|
84
84
|
} from "../services/compression/engines/mcpAccessibility/constants.ts";
|
|
85
85
|
import { getDbInstance } from "../../lib/db/core.ts";
|
|
86
|
-
import { normalizeQuotaResponse } from
|
|
87
|
-
import { resolveOmniRouteBaseUrl } from
|
|
86
|
+
import { normalizeQuotaResponse } from '../../dist/shared/contracts/quota.ts.js';
|
|
87
|
+
import { resolveOmniRouteBaseUrl } from '../../dist/shared/utils/resolveOmniRouteBaseUrl.ts.js';
|
|
88
88
|
import { getMcpModelsCatalog } from "./catalog.ts";
|
|
89
89
|
import { getMcpModelsCatalog as getMcpModelsCatalog2 } from "./catalog.ts";
|
|
90
90
|
const OMNIROUTE_BASE_URL = resolveOmniRouteBaseUrl();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_TIMER_TIMEOUT_MS } from
|
|
1
|
+
import { MAX_TIMER_TIMEOUT_MS } from '../../dist/shared/utils/runtimeTimeouts.ts.js';
|
|
2
2
|
const PRE_SCREEN_CONCURRENCY = 5;
|
|
3
3
|
const DEFAULT_COMBO_TARGET_TIMEOUT_MS = 12e4;
|
|
4
4
|
const DEFAULT_COMBO_QUEUE_DEPTH = 20;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseExecutor } from "./base.js";
|
|
2
2
|
import { PROVIDERS } from "../config/providers.js";
|
|
3
3
|
import { OAUTH_ENDPOINTS, buildKimiHeaders, getKimchiVersionSync } from "../config/appConstants.js";
|
|
4
|
-
import { buildClineHeaders } from
|
|
4
|
+
import { buildClineHeaders } from '../../dist/shared/utils/clineAuth.js';
|
|
5
5
|
import { getCachedClaudeHeaders } from "../utils/claudeHeaderCache.js";
|
|
6
6
|
import { proxyAwareFetch } from "../utils/proxyFetch.js";
|
|
7
7
|
import { injectReasoningContent } from "../utils/reasoningContentInjector.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCodexRequestDefaults } from "../../src/lib/providers/requestDefaults.ts";
|
|
2
2
|
import { getProviderConnections } from "../../src/lib/db/providers.ts";
|
|
3
|
-
import { AI_PROVIDERS, NOAUTH_PROVIDERS } from
|
|
3
|
+
import { AI_PROVIDERS, NOAUTH_PROVIDERS } from '../../dist/shared/constants/providers.ts.js';
|
|
4
4
|
function toRecord(value) {
|
|
5
5
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
6
6
|
}
|
|
@@ -83,8 +83,8 @@ import {
|
|
|
83
83
|
clampMcpAccessibilityConfig
|
|
84
84
|
} from "../services/compression/engines/mcpAccessibility/constants.ts";
|
|
85
85
|
import { getDbInstance } from "../../src/lib/db/core.ts";
|
|
86
|
-
import { normalizeQuotaResponse } from
|
|
87
|
-
import { resolveOmniRouteBaseUrl } from
|
|
86
|
+
import { normalizeQuotaResponse } from '../../dist/shared/contracts/quota.ts.js';
|
|
87
|
+
import { resolveOmniRouteBaseUrl } from '../../dist/shared/utils/resolveOmniRouteBaseUrl.ts.js';
|
|
88
88
|
import { getMcpModelsCatalog } from "./catalog.ts";
|
|
89
89
|
import { getMcpModelsCatalog as getMcpModelsCatalog2 } from "./catalog.ts";
|
|
90
90
|
const OMNIROUTE_BASE_URL = resolveOmniRouteBaseUrl();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_TIMER_TIMEOUT_MS } from
|
|
1
|
+
import { MAX_TIMER_TIMEOUT_MS } from '../../dist/shared/utils/runtimeTimeouts.ts.js';
|
|
2
2
|
const PRE_SCREEN_CONCURRENCY = 5;
|
|
3
3
|
const DEFAULT_COMBO_TARGET_TIMEOUT_MS = 12e4;
|
|
4
4
|
const DEFAULT_COMBO_QUEUE_DEPTH = 20;
|