@inneropen/marvin-sdk 1.10.1 → 1.10.3
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/platform.cjs +18 -1
- package/dist/platform.d.cts +1 -0
- package/dist/platform.d.ts +1 -0
- package/dist/platform.js +18 -1
- package/package.json +1 -1
package/dist/platform.cjs
CHANGED
|
@@ -668,9 +668,26 @@ var InvitesModule = class {
|
|
|
668
668
|
}
|
|
669
669
|
/**
|
|
670
670
|
* Generate invitation URL from a token
|
|
671
|
+
* Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
|
|
671
672
|
*/
|
|
672
673
|
getInvitationUrl(token, baseUrl) {
|
|
673
|
-
|
|
674
|
+
let base = baseUrl;
|
|
675
|
+
if (!base) {
|
|
676
|
+
base = process.env.MARVIN_FRONTEND_URL;
|
|
677
|
+
if (!base && process.env.MARVIN_API_URL) {
|
|
678
|
+
const apiUrl = process.env.MARVIN_API_URL;
|
|
679
|
+
if (apiUrl.includes(":8080")) {
|
|
680
|
+
base = apiUrl.replace(":8080", ":4321");
|
|
681
|
+
} else if (apiUrl.includes(":3000")) {
|
|
682
|
+
base = apiUrl.replace(":3000", ":4321");
|
|
683
|
+
} else {
|
|
684
|
+
base = apiUrl;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
if (!base) {
|
|
688
|
+
base = "http://localhost:4321";
|
|
689
|
+
}
|
|
690
|
+
}
|
|
674
691
|
return `${base}/register?token=${token}`;
|
|
675
692
|
}
|
|
676
693
|
};
|
package/dist/platform.d.cts
CHANGED
|
@@ -2894,6 +2894,7 @@ declare class InvitesModule {
|
|
|
2894
2894
|
delete(tokenId: string): Promise<void>;
|
|
2895
2895
|
/**
|
|
2896
2896
|
* Generate invitation URL from a token
|
|
2897
|
+
* Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
|
|
2897
2898
|
*/
|
|
2898
2899
|
getInvitationUrl(token: string, baseUrl?: string): string;
|
|
2899
2900
|
}
|
package/dist/platform.d.ts
CHANGED
|
@@ -2894,6 +2894,7 @@ declare class InvitesModule {
|
|
|
2894
2894
|
delete(tokenId: string): Promise<void>;
|
|
2895
2895
|
/**
|
|
2896
2896
|
* Generate invitation URL from a token
|
|
2897
|
+
* Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
|
|
2897
2898
|
*/
|
|
2898
2899
|
getInvitationUrl(token: string, baseUrl?: string): string;
|
|
2899
2900
|
}
|
package/dist/platform.js
CHANGED
|
@@ -448,9 +448,26 @@ var InvitesModule = class {
|
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* Generate invitation URL from a token
|
|
451
|
+
* Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
|
|
451
452
|
*/
|
|
452
453
|
getInvitationUrl(token, baseUrl) {
|
|
453
|
-
|
|
454
|
+
let base = baseUrl;
|
|
455
|
+
if (!base) {
|
|
456
|
+
base = process.env.MARVIN_FRONTEND_URL;
|
|
457
|
+
if (!base && process.env.MARVIN_API_URL) {
|
|
458
|
+
const apiUrl = process.env.MARVIN_API_URL;
|
|
459
|
+
if (apiUrl.includes(":8080")) {
|
|
460
|
+
base = apiUrl.replace(":8080", ":4321");
|
|
461
|
+
} else if (apiUrl.includes(":3000")) {
|
|
462
|
+
base = apiUrl.replace(":3000", ":4321");
|
|
463
|
+
} else {
|
|
464
|
+
base = apiUrl;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (!base) {
|
|
468
|
+
base = "http://localhost:4321";
|
|
469
|
+
}
|
|
470
|
+
}
|
|
454
471
|
return `${base}/register?token=${token}`;
|
|
455
472
|
}
|
|
456
473
|
};
|