@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.js
CHANGED
|
@@ -2653,10 +2653,11 @@ function createClient(config = {}) {
|
|
|
2653
2653
|
return new InsForgeClient(config);
|
|
2654
2654
|
}
|
|
2655
2655
|
function createAdminClient(config) {
|
|
2656
|
-
|
|
2656
|
+
const { apiKey: rawApiKey, ...clientConfig } = config ?? {};
|
|
2657
|
+
const apiKey = rawApiKey?.trim();
|
|
2658
|
+
if (!apiKey) {
|
|
2657
2659
|
throw new Error("Missing apiKey. Pass apiKey to createAdminClient().");
|
|
2658
2660
|
}
|
|
2659
|
-
const { apiKey, ...clientConfig } = config;
|
|
2660
2661
|
return new InsForgeClient({
|
|
2661
2662
|
...clientConfig,
|
|
2662
2663
|
edgeFunctionToken: apiKey,
|