@insforge/sdk 1.3.0-ssr.3 → 1.3.0
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/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/ssr.js +13 -4
- package/dist/ssr.js.map +1 -1
- package/dist/ssr.mjs +13 -4
- package/dist/ssr.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2601,10 +2601,11 @@ function createClient(config = {}) {
|
|
|
2601
2601
|
return new InsForgeClient(config);
|
|
2602
2602
|
}
|
|
2603
2603
|
function createAdminClient(config) {
|
|
2604
|
-
|
|
2604
|
+
const { apiKey: rawApiKey, ...clientConfig } = config ?? {};
|
|
2605
|
+
const apiKey = rawApiKey?.trim();
|
|
2606
|
+
if (!apiKey) {
|
|
2605
2607
|
throw new Error("Missing apiKey. Pass apiKey to createAdminClient().");
|
|
2606
2608
|
}
|
|
2607
|
-
const { apiKey, ...clientConfig } = config;
|
|
2608
2609
|
return new InsForgeClient({
|
|
2609
2610
|
...clientConfig,
|
|
2610
2611
|
edgeFunctionToken: apiKey,
|