@sanvika/ui 0.3.3 → 0.3.4
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/package.json +1 -1
- package/src/react-native/index.js +0 -1
- package/src/server/index.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanvika/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Sanvika Production — shared UI component library for 50+ projects (pure JS, CSS Modules, props-driven) + cloud-driven Navbar/Theme presets via ui.sanvikaproduction.com",
|
package/src/server/index.js
CHANGED
|
@@ -23,12 +23,12 @@ export class SanvikaUI {
|
|
|
23
23
|
#secret;
|
|
24
24
|
|
|
25
25
|
constructor({ url, clientId, serviceKey, secret } = {}) {
|
|
26
|
-
const finalUrl = url || _readEnv("UI_URL");
|
|
26
|
+
const finalUrl = url || _readEnv("UI_URL") || "https://ui.sanvikaproduction.com";
|
|
27
27
|
const finalClientId = clientId || _readEnv("CLIENT_ID") || _readEnv("UI_CLIENT_ID");
|
|
28
28
|
const finalServiceKey = serviceKey || _readEnv("SANVIKA_SERVICE_KEY") || "";
|
|
29
29
|
const finalSecret = secret || _readEnv("UI_CLIENT_SECRET") || ""; // Tier 2 fallback (optional)
|
|
30
|
-
if (!
|
|
31
|
-
throw new Error("@sanvika/ui/server:
|
|
30
|
+
if (!finalClientId) {
|
|
31
|
+
throw new Error("@sanvika/ui/server: CLIENT_ID is required");
|
|
32
32
|
}
|
|
33
33
|
this.#url = finalUrl.replace(/\/$/, "");
|
|
34
34
|
this.#clientId = finalClientId;
|