feat: enhance EntityGrid with function props and improve code formatting

- Add configurable entity display logic via function props to EntityGrid
- Implement comprehensive test suite for EntityGrid function props in TestView
- Apply consistent code formatting across 15 components and views
- Fix linting issues with trailing commas and line breaks
- Add new EntityGridFunctionPropTest.vue for component testing
- Update endorserServer with improved error handling and logging
- Streamline PlatformServiceMixin with better cache management
- Enhance component documentation and type safety

Changes span 15 files with 159 additions and 69 deletions, focusing on
component flexibility, code quality, and testing infrastructure.
This commit is contained in:
Matthew Raymer
2025-07-18 06:16:35 +00:00
parent 45e9bba80a
commit 73a472d8b7
16 changed files with 383 additions and 69 deletions

View File

@@ -425,10 +425,14 @@ export async function getHeaders(
) {
// there's an active current passkey token
token = passkeyAccessToken;
logger.debug(`[getHeaders] Using cached passkey token for DID ${did}`);
logger.debug(
`[getHeaders] Using cached passkey token for DID ${did}`,
);
} else {
// there's no current passkey token or it's expired
logger.debug(`[getHeaders] Generating new access token for DID ${did}`);
logger.debug(
`[getHeaders] Generating new access token for DID ${did}`,
);
token = await accessToken(did);
passkeyAccessToken = token;
@@ -437,11 +441,15 @@ export async function getHeaders(
Date.now() / 1000 + passkeyExpirationSeconds;
}
} else {
logger.debug(`[getHeaders] No passkey, generating access token for DID ${did}`);
logger.debug(
`[getHeaders] No passkey, generating access token for DID ${did}`,
);
token = await accessToken(did);
}
headers["Authorization"] = "Bearer " + token;
logger.debug(`[getHeaders] Successfully generated headers for DID ${did}`);
logger.debug(
`[getHeaders] Successfully generated headers for DID ${did}`,
);
} catch (error) {
// This rarely happens: we've seen it when they have account info but the
// encryption secret got lost. But in most cases we want users to at
@@ -465,7 +473,9 @@ export async function getHeaders(
}
} else {
// it's usually OK to request without auth; we assume we're only here when allowed
logger.debug(`[getHeaders] No DID provided, proceeding without authentication`);
logger.debug(
`[getHeaders] No DID provided, proceeding without authentication`,
);
}
return headers;
}
@@ -1493,7 +1503,10 @@ export async function fetchEndorserRateLimits(
const response = await axios.get(url, { headers } as AxiosRequestConfig);
return response;
} catch (error) {
logger.error(`[fetchEndorserRateLimits] Error for DID ${issuerDid}:`, errorStringForLog(error));
logger.error(
`[fetchEndorserRateLimits] Error for DID ${issuerDid}:`,
errorStringForLog(error),
);
throw error;
}
}