@wix/sdk-runtime
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -15,2 +15,15 @@ import { wixContext } from '@wix/sdk-context'; | ||
initWixModules(wixModules, elevated) { | ||
if (elevated) { | ||
const elevatedClient = typeof $wixContext !== 'undefined' | ||
? $wixContext.elevatedClient | ||
: typeof wixContext.elevatedClient !== 'undefined' | ||
? wixContext.elevatedClient | ||
: typeof globalThis.__wix_context__ !== 'undefined' | ||
? globalThis.__wix_context__.elevatedClient | ||
: undefined; | ||
if (!elevatedClient) { | ||
throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules'); | ||
} | ||
return elevatedClient.use(wixModules); | ||
} | ||
return contextualClient.use(wixModules); | ||
@@ -17,0 +30,0 @@ }, |
@@ -18,2 +18,15 @@ "use strict"; | ||
initWixModules(wixModules, elevated) { | ||
if (elevated) { | ||
const elevatedClient = typeof $wixContext !== 'undefined' | ||
? $wixContext.elevatedClient | ||
: typeof sdk_context_1.wixContext.elevatedClient !== 'undefined' | ||
? sdk_context_1.wixContext.elevatedClient | ||
: typeof globalThis.__wix_context__ !== 'undefined' | ||
? globalThis.__wix_context__.elevatedClient | ||
: undefined; | ||
if (!elevatedClient) { | ||
throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules'); | ||
} | ||
return elevatedClient.use(wixModules); | ||
} | ||
return contextualClient.use(wixModules); | ||
@@ -20,0 +33,0 @@ }, |
{ | ||
"name": "@wix/sdk-runtime", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"license": "UNLICENSED", | ||
@@ -92,3 +92,3 @@ "sideEffects": false, | ||
}, | ||
"falconPackageHash": "d816d36bd8a315dc9738d8761a266a697d7d34158b0e0905e8d896dc" | ||
"falconPackageHash": "47532e4a9375fe949430df5c15effbb706bb7c742a9b0c2977f6b976" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152045
3960
3
27623