@inneropen/marvin-sdk 2.0.0-next.21 → 2.0.0-next.22
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/{chunk-TZ2TZFWP.js → chunk-SGZG7U7V.js} +10 -4
- package/dist/index.cjs +10 -4
- package/dist/index.js +1 -1
- package/dist/platform.cjs +8 -2
- package/dist/platform.d.cts +0 -3
- package/dist/platform.d.ts +0 -3
- package/dist/platform.js +8 -2
- package/dist/publish.cjs +10 -4
- package/dist/publish.js +1 -1
- package/package.json +1 -1
|
@@ -111,15 +111,21 @@ Change to: ${config.apiUrl.replace(url.protocol, "https:")}`
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
+
function getEnv(key) {
|
|
115
|
+
if (typeof process !== "undefined" && process.env) {
|
|
116
|
+
return process.env[key];
|
|
117
|
+
}
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
114
120
|
function createConfigFromEnv(overrides) {
|
|
115
121
|
return {
|
|
116
|
-
apiUrl: overrides?.apiUrl ||
|
|
117
|
-
siteClientToken: overrides?.siteClientToken ||
|
|
118
|
-
workspaceSlug: overrides?.workspaceSlug ||
|
|
122
|
+
apiUrl: overrides?.apiUrl || getEnv("MARVIN_API_URL") || "",
|
|
123
|
+
siteClientToken: overrides?.siteClientToken || getEnv("MARVIN_SITE_CLIENT_TOKEN") || "",
|
|
124
|
+
workspaceSlug: overrides?.workspaceSlug || getEnv("MARVIN_WORKSPACE_SLUG") || "",
|
|
119
125
|
autoInitialize: overrides?.autoInitialize ?? false,
|
|
120
126
|
cacheDuration: overrides?.cacheDuration ?? 5 * 60 * 1e3,
|
|
121
127
|
// 5 minutes
|
|
122
|
-
debug: overrides?.debug ??
|
|
128
|
+
debug: overrides?.debug ?? getEnv("MARVIN_DEBUG") === "true",
|
|
123
129
|
logger: overrides?.logger ?? console
|
|
124
130
|
};
|
|
125
131
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -122,15 +122,21 @@ Change to: ${config.apiUrl.replace(url.protocol, "https:")}`
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
function getEnv(key) {
|
|
126
|
+
if (typeof process !== "undefined" && process.env) {
|
|
127
|
+
return process.env[key];
|
|
128
|
+
}
|
|
129
|
+
return void 0;
|
|
130
|
+
}
|
|
125
131
|
function createConfigFromEnv(overrides) {
|
|
126
132
|
return {
|
|
127
|
-
apiUrl: overrides?.apiUrl ||
|
|
128
|
-
siteClientToken: overrides?.siteClientToken ||
|
|
129
|
-
workspaceSlug: overrides?.workspaceSlug ||
|
|
133
|
+
apiUrl: overrides?.apiUrl || getEnv("MARVIN_API_URL") || "",
|
|
134
|
+
siteClientToken: overrides?.siteClientToken || getEnv("MARVIN_SITE_CLIENT_TOKEN") || "",
|
|
135
|
+
workspaceSlug: overrides?.workspaceSlug || getEnv("MARVIN_WORKSPACE_SLUG") || "",
|
|
130
136
|
autoInitialize: overrides?.autoInitialize ?? false,
|
|
131
137
|
cacheDuration: overrides?.cacheDuration ?? 5 * 60 * 1e3,
|
|
132
138
|
// 5 minutes
|
|
133
|
-
debug: overrides?.debug ??
|
|
139
|
+
debug: overrides?.debug ?? getEnv("MARVIN_DEBUG") === "true",
|
|
134
140
|
logger: overrides?.logger ?? console
|
|
135
141
|
};
|
|
136
142
|
}
|
package/dist/index.js
CHANGED
package/dist/platform.cjs
CHANGED
|
@@ -1781,10 +1781,16 @@ var FormsModule = class {
|
|
|
1781
1781
|
};
|
|
1782
1782
|
|
|
1783
1783
|
// src/platform/client.ts
|
|
1784
|
+
function getEnv2(key) {
|
|
1785
|
+
if (typeof process !== "undefined" && process.env) {
|
|
1786
|
+
return process.env[key];
|
|
1787
|
+
}
|
|
1788
|
+
return void 0;
|
|
1789
|
+
}
|
|
1784
1790
|
function createPlatformConfigFromEnv(overrides) {
|
|
1785
1791
|
return {
|
|
1786
|
-
apiUrl: overrides?.apiUrl ||
|
|
1787
|
-
userToken: overrides?.userToken ||
|
|
1792
|
+
apiUrl: overrides?.apiUrl || getEnv2("MARVIN_API_URL") || "http://localhost:8080",
|
|
1793
|
+
userToken: overrides?.userToken || getEnv2("MARVIN_USER_TOKEN"),
|
|
1788
1794
|
credentials: overrides?.credentials || "include"
|
|
1789
1795
|
};
|
|
1790
1796
|
}
|
package/dist/platform.d.cts
CHANGED
|
@@ -4646,9 +4646,6 @@ interface PlatformClientConfig {
|
|
|
4646
4646
|
userToken?: string;
|
|
4647
4647
|
credentials?: RequestCredentials;
|
|
4648
4648
|
}
|
|
4649
|
-
/**
|
|
4650
|
-
* Create Platform API config from environment
|
|
4651
|
-
*/
|
|
4652
4649
|
declare function createPlatformConfigFromEnv(overrides?: Partial<PlatformClientConfig>): PlatformClientConfig;
|
|
4653
4650
|
declare class PlatformClient extends HttpClient {
|
|
4654
4651
|
entries: EntriesModule;
|
package/dist/platform.d.ts
CHANGED
|
@@ -4646,9 +4646,6 @@ interface PlatformClientConfig {
|
|
|
4646
4646
|
userToken?: string;
|
|
4647
4647
|
credentials?: RequestCredentials;
|
|
4648
4648
|
}
|
|
4649
|
-
/**
|
|
4650
|
-
* Create Platform API config from environment
|
|
4651
|
-
*/
|
|
4652
4649
|
declare function createPlatformConfigFromEnv(overrides?: Partial<PlatformClientConfig>): PlatformClientConfig;
|
|
4653
4650
|
declare class PlatformClient extends HttpClient {
|
|
4654
4651
|
entries: EntriesModule;
|
package/dist/platform.js
CHANGED
|
@@ -1338,10 +1338,16 @@ var FormsModule = class {
|
|
|
1338
1338
|
};
|
|
1339
1339
|
|
|
1340
1340
|
// src/platform/client.ts
|
|
1341
|
+
function getEnv2(key) {
|
|
1342
|
+
if (typeof process !== "undefined" && process.env) {
|
|
1343
|
+
return process.env[key];
|
|
1344
|
+
}
|
|
1345
|
+
return void 0;
|
|
1346
|
+
}
|
|
1341
1347
|
function createPlatformConfigFromEnv(overrides) {
|
|
1342
1348
|
return {
|
|
1343
|
-
apiUrl: overrides?.apiUrl ||
|
|
1344
|
-
userToken: overrides?.userToken ||
|
|
1349
|
+
apiUrl: overrides?.apiUrl || getEnv2("MARVIN_API_URL") || "http://localhost:8080",
|
|
1350
|
+
userToken: overrides?.userToken || getEnv2("MARVIN_USER_TOKEN"),
|
|
1345
1351
|
credentials: overrides?.credentials || "include"
|
|
1346
1352
|
};
|
|
1347
1353
|
}
|
package/dist/publish.cjs
CHANGED
|
@@ -122,15 +122,21 @@ Change to: ${config.apiUrl.replace(url.protocol, "https:")}`
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
function getEnv(key) {
|
|
126
|
+
if (typeof process !== "undefined" && process.env) {
|
|
127
|
+
return process.env[key];
|
|
128
|
+
}
|
|
129
|
+
return void 0;
|
|
130
|
+
}
|
|
125
131
|
function createConfigFromEnv(overrides) {
|
|
126
132
|
return {
|
|
127
|
-
apiUrl: overrides?.apiUrl ||
|
|
128
|
-
siteClientToken: overrides?.siteClientToken ||
|
|
129
|
-
workspaceSlug: overrides?.workspaceSlug ||
|
|
133
|
+
apiUrl: overrides?.apiUrl || getEnv("MARVIN_API_URL") || "",
|
|
134
|
+
siteClientToken: overrides?.siteClientToken || getEnv("MARVIN_SITE_CLIENT_TOKEN") || "",
|
|
135
|
+
workspaceSlug: overrides?.workspaceSlug || getEnv("MARVIN_WORKSPACE_SLUG") || "",
|
|
130
136
|
autoInitialize: overrides?.autoInitialize ?? false,
|
|
131
137
|
cacheDuration: overrides?.cacheDuration ?? 5 * 60 * 1e3,
|
|
132
138
|
// 5 minutes
|
|
133
|
-
debug: overrides?.debug ??
|
|
139
|
+
debug: overrides?.debug ?? getEnv("MARVIN_DEBUG") === "true",
|
|
134
140
|
logger: overrides?.logger ?? console
|
|
135
141
|
};
|
|
136
142
|
}
|
package/dist/publish.js
CHANGED