UNPKG

sls-dev-tools

Version:

The Dev Tools for the Serverless World

31 lines (28 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.switchTableConfig = exports.RESOURCE_TABLE_CONFIG = exports.RESOURCE_TABLE_TYPE = void 0; const RESOURCE_TABLE_TYPE = { LAMBDA: "LAMBDA", ALL_RESOURCES: "ALL_RESOURCES" }; exports.RESOURCE_TABLE_TYPE = RESOURCE_TABLE_TYPE; const RESOURCE_TABLE_CONFIG = { [RESOURCE_TABLE_TYPE.LAMBDA]: { label: "<- Lambda Functions ->", columnWidth: [30, 30, 10, 10, 20, 10] }, [RESOURCE_TABLE_TYPE.ALL_RESOURCES]: { label: "<- All Resources ->", columnWidth: [50, 30] } }; exports.RESOURCE_TABLE_CONFIG = RESOURCE_TABLE_CONFIG; const switchTableConfig = (application, tableType) => { application.type = tableType; application.table.setLabel(RESOURCE_TABLE_CONFIG[tableType].label); application.options.columnWidth = RESOURCE_TABLE_CONFIG[tableType].columnWidth; (void 0).table.options.columnWidth = [30, 30, 10, 10, 20, 10]; }; exports.switchTableConfig = switchTableConfig;