@softchef/cdk-iot-device-management
Version:
IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.
18 lines (17 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCacheKey = void 0;
const getCacheKey = async (commandName, config, options) => {
const { accessKeyId } = await config.credentials();
const { identifiers } = options;
return JSON.stringify({
...(accessKeyId && { accessKeyId }),
...(identifiers && {
commandName,
identifiers: Object.entries(identifiers)
.sort()
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
}),
});
};
exports.getCacheKey = getCacheKey;