@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;AAuJxD,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"}
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, extraire seulement la partie après
19
- if (path.includes("api/public/v1/")) {
20
- return path.split("api/public/v1/")[1] || 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lastbrain/ai-ui-core",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Framework-agnostic core library for LastBrain AI UI Kit",
5
5
  "private": false,
6
6
  "type": "module",
@@ -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, extraire seulement la partie après
25
- if (path.includes("api/public/v1/")) {
26
- return path.split("api/public/v1/")[1] || 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