UNPKG

@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.

21 lines (20 loc) 911 B
import { __assign, __awaiter, __generator } from "tslib"; import { loadSharedConfigFiles, } from "@aws-sdk/shared-ini-file-loader"; export var ENV_PROFILE = "AWS_PROFILE"; export var DEFAULT_PROFILE = "default"; export var parseKnownFiles = function (init) { return __awaiter(void 0, void 0, void 0, function () { var _a, loadedConfig, parsedFiles; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = init.loadedConfig, loadedConfig = _a === void 0 ? loadSharedConfigFiles(init) : _a; return [4, loadedConfig]; case 1: parsedFiles = _b.sent(); return [2, __assign(__assign({}, parsedFiles.configFile), parsedFiles.credentialsFile)]; } }); }); }; export var getMasterProfileName = function (init) { return init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; };