@lastbrain/ai-ui-core 1.0.13 → 1.0.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-gateway.d.ts","sourceRoot":"","sources":["../../../src/route-handlers/nextjs/enhanced-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"enhanced-gateway.d.ts","sourceRoot":"","sources":["../../../src/route-handlers/nextjs/enhanced-gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmJxD,wBAAsB,GAAG,CACvB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAGjD;AAED,wBAAsB,IAAI,CACxB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAGjD;AAED,wBAAsB,GAAG,CACvB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAGjD"}
|
|
@@ -15,12 +15,9 @@ if (!LB_API_KEY) {
|
|
|
15
15
|
* Maps internal auth routes to public API routes
|
|
16
16
|
*/
|
|
17
17
|
function mapAuthRouteToPublicRoute(path) {
|
|
18
|
-
// Si le path contient déjà api/public/v1,
|
|
19
|
-
if (path.includes("api/public/v1
|
|
20
|
-
return path.
|
|
21
|
-
}
|
|
22
|
-
if (path.startsWith("api/public/v1")) {
|
|
23
|
-
return path.slice("api/public/v1".length).replace(/^\//, "") || path;
|
|
18
|
+
// Si le path contient déjà api/public/v1, le retourner tel quel (sans double-prefixe)
|
|
19
|
+
if (path.includes("api/public/v1")) {
|
|
20
|
+
return path.replace(/^\//, "");
|
|
24
21
|
}
|
|
25
22
|
// Remove leading 'ai/' if present
|
|
26
23
|
const cleanPath = path.startsWith("ai/") ? path.slice(3) : path;
|
package/package.json
CHANGED
|
@@ -21,13 +21,9 @@ if (!LB_API_KEY) {
|
|
|
21
21
|
* Maps internal auth routes to public API routes
|
|
22
22
|
*/
|
|
23
23
|
function mapAuthRouteToPublicRoute(path: string): string {
|
|
24
|
-
// Si le path contient déjà api/public/v1,
|
|
25
|
-
if (path.includes("api/public/v1
|
|
26
|
-
return path.
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (path.startsWith("api/public/v1")) {
|
|
30
|
-
return path.slice("api/public/v1".length).replace(/^\//, "") || path;
|
|
24
|
+
// Si le path contient déjà api/public/v1, le retourner tel quel (sans double-prefixe)
|
|
25
|
+
if (path.includes("api/public/v1")) {
|
|
26
|
+
return path.replace(/^\//, "");
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
// Remove leading 'ai/' if present
|