@palettelab/sdk 0.1.5 → 0.1.6

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.
@@ -122,7 +122,13 @@ function usePluginDataRooms() {
122
122
  var import_react4 = require("react");
123
123
 
124
124
  // src/api.ts
125
- var _baseUrl = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
125
+ function defaultBaseUrl() {
126
+ if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_API_URL) {
127
+ return process.env.NEXT_PUBLIC_API_URL;
128
+ }
129
+ return "http://localhost:8000";
130
+ }
131
+ var _baseUrl = defaultBaseUrl();
126
132
  function getBaseUrl() {
127
133
  return _baseUrl;
128
134
  }
@@ -92,7 +92,13 @@ function usePluginDataRooms() {
92
92
  import { useCallback as useCallback3, useRef, useState as useState3 } from "react";
93
93
 
94
94
  // src/api.ts
95
- var _baseUrl = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
95
+ function defaultBaseUrl() {
96
+ if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_API_URL) {
97
+ return process.env.NEXT_PUBLIC_API_URL;
98
+ }
99
+ return "http://localhost:8000";
100
+ }
101
+ var _baseUrl = defaultBaseUrl();
96
102
  function getBaseUrl() {
97
103
  return _baseUrl;
98
104
  }
package/dist/index.js CHANGED
@@ -43,7 +43,13 @@ __export(src_exports, {
43
43
  module.exports = __toCommonJS(src_exports);
44
44
 
45
45
  // src/api.ts
46
- var _baseUrl = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
46
+ function defaultBaseUrl() {
47
+ if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_API_URL) {
48
+ return process.env.NEXT_PUBLIC_API_URL;
49
+ }
50
+ return "http://localhost:8000";
51
+ }
52
+ var _baseUrl = defaultBaseUrl();
47
53
  function setBaseUrl(url) {
48
54
  _baseUrl = url;
49
55
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,11 @@
1
1
  // src/api.ts
2
- var _baseUrl = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
2
+ function defaultBaseUrl() {
3
+ if (typeof process !== "undefined" && process.env?.NEXT_PUBLIC_API_URL) {
4
+ return process.env.NEXT_PUBLIC_API_URL;
5
+ }
6
+ return "http://localhost:8000";
7
+ }
8
+ var _baseUrl = defaultBaseUrl();
3
9
  function setBaseUrl(url) {
4
10
  _baseUrl = url;
5
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Palette Platform SDK for building plugins and apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",