cdk-insights 0.7.3 → 0.7.4
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/cli/entry.js +4 -4
- package/package.json +1 -1
package/dist/cli/entry.js
CHANGED
|
@@ -82487,15 +82487,15 @@ var decodeJWTPayload = (token) => {
|
|
|
82487
82487
|
var hashLicenseKey = (licenseKey) => {
|
|
82488
82488
|
return crypto6.createHash("sha256").update(licenseKey).digest("hex").slice(0, 16);
|
|
82489
82489
|
};
|
|
82490
|
-
var fetchLicenseInfo = async (
|
|
82490
|
+
var fetchLicenseInfo = async (licenseKey, apiBase) => {
|
|
82491
82491
|
try {
|
|
82492
82492
|
const quotaUrl = `${apiBase}/license/quota`;
|
|
82493
|
-
cliLogger.debug("\u{1F4E1} Fetching fresh license info
|
|
82493
|
+
cliLogger.debug("\u{1F4E1} Fetching fresh license info", {
|
|
82494
82494
|
url: quotaUrl
|
|
82495
82495
|
});
|
|
82496
82496
|
const response = await axios_default.get(quotaUrl, {
|
|
82497
82497
|
headers: {
|
|
82498
|
-
Authorization: `Bearer ${
|
|
82498
|
+
Authorization: `Bearer ${licenseKey}`,
|
|
82499
82499
|
"Content-Type": "application/json"
|
|
82500
82500
|
},
|
|
82501
82501
|
timeout: 1e4
|
|
@@ -82593,7 +82593,7 @@ async function authenticateUser(licenseKey, fingerprint, project2) {
|
|
|
82593
82593
|
hasJwtFingerprint: !!jwtFingerprint,
|
|
82594
82594
|
apiUrl: apiBase2
|
|
82595
82595
|
});
|
|
82596
|
-
const freshLicenseInfo = apiBase2 ? await fetchLicenseInfo(
|
|
82596
|
+
const freshLicenseInfo = apiBase2 ? await fetchLicenseInfo(licenseKey, apiBase2) : void 0;
|
|
82597
82597
|
return {
|
|
82598
82598
|
token: cachedToken.token,
|
|
82599
82599
|
usageData: void 0,
|